From 05c036bd9fa36c2d0d3fe4d67189b9a3500e3d92 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 3 Jul 2024 17:29:10 +0200 Subject: [PATCH] Misc/Fixup * fix Conditions derived from spell_area * Type Statistic should not be random searchable and excluded from "missing screenshots" UtilityPage * do not cut off querys in log --- includes/database.class.php | 2 +- includes/utilities.php | 2 +- pages/spell.php | 6 +++--- pages/utility.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/database.class.php b/includes/database.class.php index 9ca5c4c4..b8ec0dbe 100644 --- a/includes/database.class.php +++ b/includes/database.class.php @@ -95,7 +95,7 @@ class DB public static function profiler($self, $query, $trace) { if ($trace) // actual query - self::$logs[] = [substr(str_replace("\n", ' ', $query), 0, 200)]; + self::$logs[] = [str_replace("\n", ' ', $query)]; else // the statistics { end(self::$logs); diff --git a/includes/utilities.php b/includes/utilities.php index 62aee8dc..eeac4811 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -1768,7 +1768,7 @@ abstract class Type self::CHR_CLASS => ['CharClassList', 'class', 'g_classes', 0x1], self::CHR_RACE => ['CharRaceList', 'race', 'g_races', 0x1], self::SKILL => ['SkillList', 'skill', 'g_skills', 0x1], - self::STATISTIC => ['AchievementList', 'achievement', 'g_achievements', 0x1], // alias for achievements; exists only for Markup + self::STATISTIC => ['AchievementList', 'achievement', 'g_achievements', 0x0], // alias for achievements; exists only for Markup self::CURRENCY => ['CurrencyList', 'currency', 'g_gatheredcurrencies',0x1], self::SOUND => ['SoundList', 'sound', 'g_sounds', 0x1], self::ICON => ['IconList', 'icon', 'g_icons', 0x1], diff --git a/pages/spell.php b/pages/spell.php index 5f61ec5f..9a36306a 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -1005,13 +1005,13 @@ class SpellPage extends GenericPage $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::QUESTSTATE, $questStart, $questStartState]); if ($questEnd && $questEnd != $questStart) - $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::QUESTSTATE, $questEnd, $questEndState]); + $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::QUESTSTATE, $questEnd, $questEndState]); if ($raceMask) - $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::CHR_RACE, $raceMask]); + $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::CHR_RACE, $raceMask]); if ($gender != 2) // 2: both - $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::GENDER, $gender + 1]); + $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::GENDER, $gender]); // remove temp storage from result unset($resultLv[$idx]['__condition']); diff --git a/pages/utility.php b/pages/utility.php index 0444fbd9..d08c702e 100644 --- a/pages/utility.php +++ b/pages/utility.php @@ -193,7 +193,7 @@ class UtilityPage extends GenericPage $cnd[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; - foreach (Type::getClassesFor(Type::FLAG_NONE, 'contribute', CONTRIBUTE_SS) as $type => $classStr) + foreach (Type::getClassesFor(Type::FLAG_RANDOM_SEARCHABLE, 'contribute', CONTRIBUTE_SS) as $type => $classStr) { $typeObj = new $classStr($cnd); if (!$typeObj->error)