mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc/Fixups
* squash multiple notices from error log * fixed copy&paste error preventing view on custom profiles * fixed display of spell requirements if mount was required after changs to mount sorting * properly get/send error code in profile synchronisation * use clear:left after floating mail block in template
This commit is contained in:
@@ -256,14 +256,14 @@ class Profiler
|
||||
// error out all profiles with status WORKING, that are older than 60sec
|
||||
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d, errorCode = ?d WHERE status = ?d AND requestTime < ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_UNK, PR_QUEUE_STATUS_WORKING, time() - MINUTE);
|
||||
|
||||
$subjectStatus = DB::Aowow()->select('SELECT typeId AS ARRAY_KEY, status, realm FROM ?_profiler_sync WHERE `type` = ?d AND typeId IN (?a)', $type, $subjectGUIDs);
|
||||
$subjectStatus = DB::Aowow()->select('SELECT typeId AS ARRAY_KEY, status, realm, errorCode FROM ?_profiler_sync WHERE `type` = ?d AND typeId IN (?a)', $type, $subjectGUIDs);
|
||||
$queue = DB::Aowow()->selectCol('SELECT CONCAT(type, ":", typeId) FROM ?_profiler_sync WHERE status = ?d AND requestTime < UNIX_TIMESTAMP() ORDER BY requestTime ASC', PR_QUEUE_STATUS_WAITING);
|
||||
foreach ($subjectGUIDs as $guid)
|
||||
{
|
||||
if (empty($subjectStatus[$guid])) // whelp, thats some error..
|
||||
$response[] = [PR_QUEUE_STATUS_ERROR, 0, 0, PR_QUEUE_ERROR_UNK];
|
||||
else if ($subjectStatus[$guid]['status'] == PR_QUEUE_STATUS_ERROR)
|
||||
$response[] = [PR_QUEUE_STATUS_ERROR, 0, 0, $subjectStatus[$guid]['errCode']];
|
||||
$response[] = [PR_QUEUE_STATUS_ERROR, 0, 0, $subjectStatus[$guid]['errorCode']];
|
||||
else
|
||||
$response[] = array(
|
||||
$subjectStatus[$guid]['status'],
|
||||
|
||||
@@ -167,7 +167,7 @@ class ProfileList extends BaseType
|
||||
if (!$this->isCustom() || User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU))
|
||||
return true;
|
||||
|
||||
if ($this->subject->getField('cuFlags') & PROFILER_CU_DELETED)
|
||||
if ($this->getField('cuFlags') & PROFILER_CU_DELETED)
|
||||
return false;
|
||||
|
||||
if (User::$id == $this->getField('user'))
|
||||
|
||||
@@ -252,7 +252,7 @@ class Lang
|
||||
}
|
||||
|
||||
if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me!
|
||||
return self::spell('cat', -5);
|
||||
return self::spell('cat', -5, 0);
|
||||
|
||||
$tmp = [];
|
||||
$strs = self::spell($class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass');
|
||||
|
||||
@@ -567,20 +567,22 @@ class AchievementPage extends GenericPage
|
||||
|
||||
$reqCss = true;
|
||||
$mail = array(
|
||||
'delay' => null,
|
||||
'sender' => null,
|
||||
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject', true)),
|
||||
'text' => Util::parseHtmlText(Util::localizedString($letter, 'text', true))
|
||||
'delay' => null,
|
||||
'sender' => null,
|
||||
'attachments' => [],
|
||||
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject', true)),
|
||||
'text' => Util::parseHtmlText(Util::localizedString($letter, 'text', true))
|
||||
);
|
||||
}
|
||||
else if ($_ = Util::parseHtmlText($this->subject->getField('text', true, true)))
|
||||
{
|
||||
$reqCss = true;
|
||||
$mail = array(
|
||||
'delay' => null,
|
||||
'sender' => null,
|
||||
'subject' => Util::parseHtmlText($this->subject->getField('subject', true, true)),
|
||||
'text' => $_
|
||||
'delay' => null,
|
||||
'sender' => null,
|
||||
'attachments' => [],
|
||||
'subject' => Util::parseHtmlText($this->subject->getField('subject', true, true)),
|
||||
'text' => $_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1217,10 +1217,11 @@ class QuestPage extends GenericPage
|
||||
$letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailtemplate WHERE id = ?d', $rmtId);
|
||||
|
||||
$mail = array(
|
||||
'delay' => $delay ? sprintf(Lang::quest('mailIn'), Util::formatTime($delay * 1000)) : null,
|
||||
'sender' => null,
|
||||
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
|
||||
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
|
||||
'delay' => $delay ? sprintf(Lang::quest('mailIn'), Util::formatTime($delay * 1000)) : null,
|
||||
'sender' => null,
|
||||
'attachments' => [],
|
||||
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
|
||||
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
|
||||
);
|
||||
|
||||
foreach ($startEnd as $se)
|
||||
@@ -1239,7 +1240,6 @@ class QuestPage extends GenericPage
|
||||
$mailLoot = new Loot();
|
||||
if ($mailLoot->getByContainer(LOOT_MAIL, $rmtId))
|
||||
{
|
||||
$mail['attachments'] = [];
|
||||
$this->extendGlobalData($mailLoot->jsGlobals);
|
||||
foreach ($mailLoot->getResult() as $loot)
|
||||
{
|
||||
|
||||
@@ -2062,7 +2062,7 @@ class SpellPage extends GenericPage
|
||||
|
||||
}
|
||||
else if ($effAura > 0)
|
||||
$foo['name'] .= Lang::main('colon').'Unknown Aura ('.$effAura.')';
|
||||
$foo['name'] .= 'Unknown Aura ('.$effAura.')';
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ class UserPage extends GenericPage
|
||||
|
||||
protected $typeId = 0;
|
||||
protected $pageName = '';
|
||||
protected $user = [];
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
@@ -37,6 +38,10 @@ class UserPage extends GenericPage
|
||||
|
||||
protected function generateContent()
|
||||
{
|
||||
if (!$this->user) // shouldn't happen .. but did
|
||||
return;
|
||||
|
||||
|
||||
/***********/
|
||||
/* Infobox */
|
||||
/***********/
|
||||
@@ -245,6 +250,9 @@ class UserPage extends GenericPage
|
||||
|
||||
protected function generateTitle()
|
||||
{
|
||||
if (!$this->user) // shouldn't happen .. but did
|
||||
return;
|
||||
|
||||
array_unshift($this->title, sprintf(Lang::user('profileTitle'), $this->user['displayName']));
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ endif;
|
||||
$this->brick('mail');
|
||||
|
||||
if (!empty($this->transfer)):
|
||||
echo " <div style=\"clear: left\"></div>";
|
||||
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
|
||||
endif;
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ endif;
|
||||
$this->brick('mail', ['offset' => ++$offset]);
|
||||
|
||||
if (!empty($this->transfer)):
|
||||
echo " <div style=\"clear: left\"></div>";
|
||||
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user