enable static analysis for all themes
This commit is contained in:
parent
62e4354598
commit
dba8acea02
3 changed files with 5 additions and 3 deletions
|
@ -4,6 +4,6 @@ parameters:
|
|||
- ../core
|
||||
- ../ext
|
||||
- ../tests
|
||||
- ../themes/default
|
||||
- ../themes
|
||||
ignoreErrors:
|
||||
- '#Access to an undefined property Shimmie2\\Image::\$#'
|
||||
|
|
|
@ -6,6 +6,8 @@ namespace Shimmie2;
|
|||
|
||||
class CustomIndexTheme extends IndexTheme
|
||||
{
|
||||
public static array $_search_query = [];
|
||||
|
||||
protected function build_table(array $images, ?string $query): string
|
||||
{
|
||||
global $user;
|
||||
|
@ -27,7 +29,7 @@ class CustomIndexTheme extends IndexTheme
|
|||
|
||||
$nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
|
||||
if (!empty($this->search_terms)) {
|
||||
$page->_search_query = $this->search_terms;
|
||||
static::$_search_query = $this->search_terms;
|
||||
}
|
||||
$page->add_block(new Block("Navigation", $nav, "left", 0));
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Page extends BasePage
|
|||
}
|
||||
}
|
||||
|
||||
$query = !empty($this->_search_query) ? html_escape(Tag::implode($this->_search_query)) : "";
|
||||
$query = !empty(CustomIndexTheme::$_search_query) ? html_escape(Tag::implode(CustomIndexTheme::$_search_query)) : "";
|
||||
assert(!is_null($query)); # used in header.inc, do not remove :P
|
||||
$flash_html = $this->flash ? "<b id='flash'>".nl2br(html_escape(implode("\n", $this->flash)))."</b>" : "";
|
||||
$generated = autodate(date('c'));
|
||||
|
|
Reference in a new issue