From feb6ee25ddd2577357cabb78e9d453f4ffa7a2cb Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 20 Mar 2022 19:20:38 +0100 Subject: [PATCH] Misc/Fixups * lost changes --- includes/community.class.php | 2 +- pages/compare.php | 2 +- pages/enchantments.php | 2 +- pages/search.php | 2 +- pages/talent.php | 2 +- pages/user.php | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/community.class.php b/includes/community.class.php index 77340567..8ea1ad34 100644 --- a/includes/community.class.php +++ b/includes/community.class.php @@ -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 diff --git a/pages/compare.php b/pages/compare.php index ee5d6d8d..8dd896f3 100644 --- a/pages/compare.php +++ b/pages/compare.php @@ -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)) diff --git a/pages/enchantments.php b/pages/enchantments.php index 25bf598f..877bd7bd 100644 --- a/pages/enchantments.php +++ b/pages/enchantments.php @@ -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]]; diff --git a/pages/search.php b/pages/search.php index c93a365d..b42868b1 100644 --- a/pages/search.php +++ b/pages/search.php @@ -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 diff --git a/pages/talent.php b/pages/talent.php index 555973ac..79df675a 100644 --- a/pages/talent.php +++ b/pages/talent.php @@ -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'] ); diff --git a/pages/user.php b/pages/user.php index fbdd5303..05431286 100644 --- a/pages/user.php +++ b/pages/user.php @@ -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]