mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc
* fixed some recuring errors from db-log (mostly missing checks)
This commit is contained in:
@@ -121,6 +121,8 @@ class CommunityContent
|
||||
case TYPE_RACE: $obj = new CharRaceList($cnd); break;
|
||||
case TYPE_SKILL: $obj = new SkillList($cnd); break;
|
||||
case TYPE_CURRENCY: $obj = new CurrencyList($cnd); break;
|
||||
case TYPE_EMOTE: $obj = new EmoteList($cnd); break;
|
||||
case TYPE_ENCHANTMENT: $obj = new EnchantmentList($cnd); break;
|
||||
default: continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -888,7 +888,7 @@ abstract class Filter
|
||||
|
||||
protected function modularizeString(array $fields, $string = '')
|
||||
{
|
||||
if (!$string)
|
||||
if (!$string && !empty($this->fiData['v']['na']))
|
||||
$string = $this->fiData['v']['na'];
|
||||
|
||||
$qry = [];
|
||||
|
||||
@@ -92,6 +92,7 @@ class GameObjectList extends BaseType
|
||||
|
||||
$x = '<table>';
|
||||
$x .= '<tr><td><b class="q">'.$this->getField('name', true).'</b></td></tr>';
|
||||
if ($this->curTpl['typeCat'])
|
||||
if ($_ = Lang::gameObject('type', $this->curTpl['typeCat']))
|
||||
$x .= '<tr><td>'.$_.'</td></tr>';
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ class ItemList extends BaseType
|
||||
$x .= '<span class="q1"><a href="?enchantment='.$geId.'">'.Util::localizedString($gemEnch, 'name').'</a></span><br />';
|
||||
|
||||
// activation conditions for meta gems
|
||||
if ($gemEnch['conditionId'])
|
||||
if (!empty($gemEnch['conditionId']))
|
||||
{
|
||||
if ($gemCnd = DB::Aowow()->selectRow('SELECT * FROM ?_itemenchantmentcondition WHERE id = ?d', $gemEnch['conditionId']))
|
||||
{
|
||||
@@ -1469,7 +1469,7 @@ class ItemList extends BaseType
|
||||
for ($i = 1; $i < 6; $i++)
|
||||
{
|
||||
$enchId = $data['enchantId'.$i];
|
||||
if ($enchId <= 0)
|
||||
if ($enchId <= 0 || empty($this->rndEnchIds[$enchId]))
|
||||
continue;
|
||||
|
||||
if ($data['allocationPct'.$i] > 0) // RandomSuffix: scaling Enchantment; enchId < 0
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang = array(
|
||||
'or' => " oder ",
|
||||
'back' => "Zurück",
|
||||
'reputationTip' => "Rufpunkte",
|
||||
'byUserTimeAgo' => "Von <a href=\"".HOST_URL."/?user=%s\">%1s</a> vor %s",
|
||||
'byUserTimeAgo' => 'Von <a href="'.HOST_URL.'/?user=%s">%1$s</a> vor %s',
|
||||
|
||||
// filter
|
||||
'extSearch' => "Erweiterte Suche",
|
||||
@@ -470,7 +470,7 @@ $lang = array(
|
||||
'titleReward' => 'Euch wird der Titel "<a href="?title=%d">%s</a>" verliehen',
|
||||
'slain' => "getötet",
|
||||
'reqNumCrt' => "Benötigt",
|
||||
'rfAvailable' => "Verfügbar auf Realm:",
|
||||
'rfAvailable' => "Verfügbar auf Realm: ",
|
||||
'_transfer' => 'Dieser Erfolg wird mit <a href="?achievement=%d" class="q%d icontiny tinyspecial" style="background-image: url('.STATIC_URL.'/images/wow/icons/tiny/%s.gif)">%s</a> vertauscht, wenn Ihr zur <span class="icon-%s">%s</span> wechselt.',
|
||||
),
|
||||
'chrClass' => array(
|
||||
|
||||
@@ -46,7 +46,7 @@ $lang = array(
|
||||
'or' => " or ",
|
||||
'back' => "Back",
|
||||
'reputationTip' => "Reputation points",
|
||||
'byUserTimeAgo' => "By <a href=\"".HOST_URL."/?user=%s\">%1s</a> %s ago",
|
||||
'byUserTimeAgo' => 'By <a href="'.HOST_URL.'/?user=%s">%1$s</a> %s ago',
|
||||
|
||||
// filter
|
||||
'extSearch' => "Extended search",
|
||||
@@ -465,7 +465,7 @@ $lang = array(
|
||||
'titleReward' => 'You shall be granted the title "<a href="?title=%d">%s</a>"',
|
||||
'slain' => "slain",
|
||||
'reqNumCrt' => "Requires",
|
||||
'rfAvailable' => "Available on realm:",
|
||||
'rfAvailable' => "Available on realm: ",
|
||||
'_transfer' => 'This achievement will be converted to <a href="?achievement=%d" class="q%d icontiny tinyspecial" style="background-image: url('.STATIC_URL.'/images/wow/icons/tiny/%s.gif)">%s</a> if you transfer to <span class="icon-%s">%s</span>.',
|
||||
),
|
||||
'chrClass' => array(
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang = array(
|
||||
'or' => " o ",
|
||||
'back' => "Arrière",
|
||||
'reputationTip' => "Puntos de reputación",
|
||||
'byUserTimeAgo' => "Por <a href=\"".HOST_URL."/?user=%s\">%1s</a> hace %s",
|
||||
'byUserTimeAgo' => 'Por <a href="'.HOST_URL.'/?user=%s">%1$s</a> hace %s',
|
||||
|
||||
// filter
|
||||
'extSearch' => "Extender búsqueda",
|
||||
@@ -469,7 +469,7 @@ $lang = array(
|
||||
'titleReward' => 'Deberías obtener el título "<a href="?title=%d">%s</a>"',
|
||||
'slain' => "matado",
|
||||
'reqNumCrt' => "Requiere",
|
||||
'rfAvailable' => "Disponible en reino:",
|
||||
'rfAvailable' => "Disponible en reino: ",
|
||||
'_transfer' => 'Este logro será convertido a <a href="?achievement=%d" class="q%d icontiny tinyspecial" style="background-image: url('.STATIC_URL.'/images/wow/icons/tiny/%s.gif)">%s</a> si lo transfieres a la <span class="icon-%s">%s</span>.',
|
||||
),
|
||||
'chrClass' => array(
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang = array(
|
||||
'or' => " ou ",
|
||||
'back' => "Redro",
|
||||
'reputationTip' => "Points de réputation",
|
||||
'byUserTimeAgo' => "Par <a href=\"".HOST_URL."/?user=%s\">%1s</a> il y a %s",
|
||||
'byUserTimeAgo' => 'Par <a href="'.HOST_URL.'/?user=%s">%1$s</a> il y a %s',
|
||||
|
||||
// filter
|
||||
'extSearch' => "Recherche avancée",
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang = array(
|
||||
'or' => " или ",
|
||||
'back' => "Назад",
|
||||
'reputationTip' => "Очки репутации",
|
||||
'byUserTimeAgo' => "От <a href=\"".HOST_URL."/?user=%s\">%1s</a> %s назад",
|
||||
'byUserTimeAgo' => 'От <a href="'.HOST_URL.'/?user=%s">%1s</a> %s назад',
|
||||
|
||||
// filter
|
||||
'extSearch' => "Расширенный поиск",
|
||||
@@ -468,7 +468,7 @@ $lang = array(
|
||||
'titleReward' => 'Наградное звание: "<a href="?title=%d">%s</a>"',
|
||||
'slain' => "убито",
|
||||
'reqNumCrt' => "Требуется",
|
||||
'rfAvailable' => "[Available on realm]:",
|
||||
'rfAvailable' => "[Available on realm]: ",
|
||||
'_transfer' => 'Этот предмет превратится в <a href="?achievement=%d" class="q%d icontiny tinyspecial" style="background-image: url('.STATIC_URL.'/images/wow/icons/tiny/%s.gif)">%s</a>, если вы перейдете за <span class="icon-%s">%s</span>.',
|
||||
),
|
||||
'chrClass' => array(
|
||||
|
||||
@@ -103,13 +103,13 @@ class AchievementPage extends GenericPage
|
||||
if ($this->subject->getField('flags') & 0x100 && DB::isConnectable(DB_AUTH))
|
||||
{
|
||||
$avlb = [];
|
||||
foreach (DB::Auth()->selectCol('SELECT id AS ARRAY_KEY, name FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', WOW_VERSION) AS $rId => $name)
|
||||
foreach (DB::Auth()->selectCol('SELECT id AS ARRAY_KEY, name FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', WOW_BUILD) AS $rId => $name)
|
||||
{
|
||||
if (!DB::isConnectable(DB_CHARACTERS . $rId))
|
||||
continue;
|
||||
|
||||
if (!DB::Characters($rId)->selectCell('SELECT 1 FROM character_achievement WHERE achievement = ?d LIMIT 1', $this->typeId))
|
||||
$avlb[] = $name;
|
||||
$avlb[] = Util::ucWords($name);
|
||||
}
|
||||
|
||||
if ($avlb)
|
||||
|
||||
@@ -74,6 +74,7 @@ class ComparePage extends GenericPage
|
||||
if (empty($data[$itemId]))
|
||||
continue;
|
||||
|
||||
if (!empty($data[$itemId]['subitems']))
|
||||
foreach ($data[$itemId]['subitems'] as &$si)
|
||||
$si['enchantment'] = implode(', ', $si['enchantment']);
|
||||
|
||||
|
||||
@@ -100,6 +100,8 @@ class SearchPage extends GenericPage
|
||||
if (CFG_MAINTENANCE && !User::isInGroup(U_GROUP_EMPLOYEE) && !($this->searchMask & SEARCH_TYPE_REGULAR))
|
||||
$this->notFound();
|
||||
|
||||
parent::__construct($pageCall, $pageParam); // just to set g_user and g_locale
|
||||
|
||||
// fill include, exclude and ignore
|
||||
$this->tokenizeQuery();
|
||||
|
||||
@@ -109,8 +111,6 @@ class SearchPage extends GenericPage
|
||||
$this->mode = CACHE_TYPE_NONE;
|
||||
$this->notFound();
|
||||
}
|
||||
|
||||
parent::__construct($pageCall, $pageParam); // just to set g_user and g_locale
|
||||
}
|
||||
|
||||
private function tokenizeQuery()
|
||||
|
||||
@@ -1022,7 +1022,7 @@ class SpellPage extends GenericPage
|
||||
SELECT IF(t1.ID > 200000, t2.ID, t1.ID)
|
||||
FROM npc_trainer t1
|
||||
LEFT JOIN npc_trainer t2 ON t2.SpellID = -t1.ID
|
||||
WHERE t1.SpellID IN (?a)',
|
||||
WHERE t1.SpellID = ?d',
|
||||
$this->typeId
|
||||
);
|
||||
}
|
||||
@@ -1667,7 +1667,7 @@ class SpellPage extends GenericPage
|
||||
$foo['name'] .= $_;
|
||||
break;
|
||||
case 33: // Open Lock
|
||||
$_ = Lang::spell('lockType', $effMV);
|
||||
$_ = $effMV ? Lang::spell('lockType', $effMV) : $effMV;
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
|
||||
Reference in New Issue
Block a user