Misc/Fixups

* lost changes
This commit is contained in:
Sarjuuk
2022-03-20 19:20:38 +01:00
parent a8edf6c912
commit feb6ee25dd
6 changed files with 7 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ class CommunityContent
}
}
public static function getCommentPreviews(array $params = [], int &$nFound = 0, bool $dateFmt = true) : array
public static function getCommentPreviews(array $params = [], ?int &$nFound = 0, bool $dateFmt = true) : array
{
/*
purged:0, <- doesnt seem to be used anymore

View File

@@ -102,7 +102,7 @@ class ComparePage extends GenericPage
protected function generatePath() {}
private function checkCompareString(string $val) : string
protected static function checkCompareString(string $val) : string
{
$val = urldecode($val);
if (preg_match('/[^\d\.:;]/', $val))

View File

@@ -15,7 +15,7 @@ class EnchantmentsPage extends GenericPage
protected $path = [0, 101];
protected $tabId = 0;
protected $mode = CACHE_TYPE_PAGE;
protected $js =[JS_FILE, 'filters.js']];
protected $js = [[JS_FILE, 'filters.js']];
protected $_get = ['filter' => ['filter' => FILTER_UNSAFE_RAW]];

View File

@@ -562,7 +562,7 @@ class SearchPage extends GenericPage
$cnd[] = ['i.class', [ITEM_CLASS_WEAPON, ITEM_CLASS_GEM, ITEM_CLASS_ARMOR]];
$cnd[] = $cndAdd;
if ($_ = array_filter($this->_get['slots']))
if ($_ = array_filter($this->_get['slots'] ?? []))
$cnd[] = ['slot', $_];
// trick ItemListFilter into evaluating weights

View File

@@ -38,7 +38,7 @@ class TalentPage extends GenericPage
if ($this->isPetCalc)
$this->addScript(
[JS_FILE, 'swfobject.css'],
[JS_FILE, 'swfobject.js'],
[CSS_FILE, 'petcalc.css']
);

View File

@@ -87,7 +87,7 @@ class UserPage extends GenericPage
$buff[] = '[tooltip=tooltip_pending]'.$ss['nPending'].'[/tooltip]';
}
$contrib[] = Lang::user('screenshots').Lang::main('colon').$ss['sum'].($buff ? ' [small]('.implode($buff, ' + ').')[/small]' : null);
$contrib[] = Lang::user('screenshots').Lang::main('colon').$ss['sum'].($buff ? ' [small]('.implode(' + ', $buff).')[/small]' : null);
}
$vi = DB::Aowow()->selectRow('SELECT COUNT(id) AS sum, SUM(IF(status & ?d, 1, 0)) AS nSticky, SUM(IF(status & ?d, 0, 1)) AS nPending FROM ?_videos WHERE userIdOwner = ?d AND (status & ?d) = 0',
@@ -111,7 +111,7 @@ class UserPage extends GenericPage
$buff[] = '[tooltip=tooltip_pending]'.$vi['nPending'].'[/tooltip]';
}
$contrib[] = Lang::user('videos').Lang::main('colon').$vi['sum'].($buff ? ' [small]('.implode($buff, ' + ').')[/small]' : null);
$contrib[] = Lang::user('videos').Lang::main('colon').$vi['sum'].($buff ? ' [small]('.implode(' + ', $buff).')[/small]' : null);
}
// contrib -> Forum posts: 5769 [small]([tooltip=topics]579[/tooltip] + [tooltip=replies]5190[/tooltip])[/small]