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:
Sarjuuk
2018-05-26 11:00:22 +02:00
parent 9645ad0877
commit 7dc283f649
9 changed files with 30 additions and 18 deletions

View File

@@ -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'],

View File

@@ -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'))

View File

@@ -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');

View File

@@ -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' => $_
);
}

View File

@@ -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)
{

View File

@@ -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;
}

View File

@@ -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']));
}

View File

@@ -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;

View File

@@ -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;