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 // 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); 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); $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) foreach ($subjectGUIDs as $guid)
{ {
if (empty($subjectStatus[$guid])) // whelp, thats some error.. if (empty($subjectStatus[$guid])) // whelp, thats some error..
$response[] = [PR_QUEUE_STATUS_ERROR, 0, 0, PR_QUEUE_ERROR_UNK]; $response[] = [PR_QUEUE_STATUS_ERROR, 0, 0, PR_QUEUE_ERROR_UNK];
else if ($subjectStatus[$guid]['status'] == PR_QUEUE_STATUS_ERROR) 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 else
$response[] = array( $response[] = array(
$subjectStatus[$guid]['status'], $subjectStatus[$guid]['status'],

View File

@@ -167,7 +167,7 @@ class ProfileList extends BaseType
if (!$this->isCustom() || User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU)) if (!$this->isCustom() || User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU))
return true; return true;
if ($this->subject->getField('cuFlags') & PROFILER_CU_DELETED) if ($this->getField('cuFlags') & PROFILER_CU_DELETED)
return false; return false;
if (User::$id == $this->getField('user')) if (User::$id == $this->getField('user'))

View File

@@ -252,7 +252,7 @@ class Lang
} }
if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me! if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me!
return self::spell('cat', -5); return self::spell('cat', -5, 0);
$tmp = []; $tmp = [];
$strs = self::spell($class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass'); $strs = self::spell($class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass');

View File

@@ -569,6 +569,7 @@ class AchievementPage extends GenericPage
$mail = array( $mail = array(
'delay' => null, 'delay' => null,
'sender' => null, 'sender' => null,
'attachments' => [],
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject', true)), 'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject', true)),
'text' => Util::parseHtmlText(Util::localizedString($letter, 'text', true)) 'text' => Util::parseHtmlText(Util::localizedString($letter, 'text', true))
); );
@@ -579,6 +580,7 @@ class AchievementPage extends GenericPage
$mail = array( $mail = array(
'delay' => null, 'delay' => null,
'sender' => null, 'sender' => null,
'attachments' => [],
'subject' => Util::parseHtmlText($this->subject->getField('subject', true, true)), 'subject' => Util::parseHtmlText($this->subject->getField('subject', true, true)),
'text' => $_ 'text' => $_
); );

View File

@@ -1219,6 +1219,7 @@ class QuestPage extends GenericPage
$mail = array( $mail = array(
'delay' => $delay ? sprintf(Lang::quest('mailIn'), Util::formatTime($delay * 1000)) : null, 'delay' => $delay ? sprintf(Lang::quest('mailIn'), Util::formatTime($delay * 1000)) : null,
'sender' => null, 'sender' => null,
'attachments' => [],
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null, 'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject')) 'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
); );
@@ -1239,7 +1240,6 @@ class QuestPage extends GenericPage
$mailLoot = new Loot(); $mailLoot = new Loot();
if ($mailLoot->getByContainer(LOOT_MAIL, $rmtId)) if ($mailLoot->getByContainer(LOOT_MAIL, $rmtId))
{ {
$mail['attachments'] = [];
$this->extendGlobalData($mailLoot->jsGlobals); $this->extendGlobalData($mailLoot->jsGlobals);
foreach ($mailLoot->getResult() as $loot) foreach ($mailLoot->getResult() as $loot)
{ {

View File

@@ -2062,7 +2062,7 @@ class SpellPage extends GenericPage
} }
else if ($effAura > 0) else if ($effAura > 0)
$foo['name'] .= Lang::main('colon').'Unknown Aura ('.$effAura.')'; $foo['name'] .= 'Unknown Aura ('.$effAura.')';
break; break;
} }

View File

@@ -13,6 +13,7 @@ class UserPage extends GenericPage
protected $typeId = 0; protected $typeId = 0;
protected $pageName = ''; protected $pageName = '';
protected $user = [];
public function __construct($pageCall, $pageParam) public function __construct($pageCall, $pageParam)
{ {
@@ -37,6 +38,10 @@ class UserPage extends GenericPage
protected function generateContent() protected function generateContent()
{ {
if (!$this->user) // shouldn't happen .. but did
return;
/***********/ /***********/
/* Infobox */ /* Infobox */
/***********/ /***********/
@@ -245,6 +250,9 @@ class UserPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
if (!$this->user) // shouldn't happen .. but did
return;
array_unshift($this->title, sprintf(Lang::user('profileTitle'), $this->user['displayName'])); array_unshift($this->title, sprintf(Lang::user('profileTitle'), $this->user['displayName']));
} }

View File

@@ -107,6 +107,7 @@ endif;
$this->brick('mail'); $this->brick('mail');
if (!empty($this->transfer)): if (!empty($this->transfer)):
echo " <div style=\"clear: left\"></div>";
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n"; echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
endif; endif;

View File

@@ -203,6 +203,7 @@ endif;
$this->brick('mail', ['offset' => ++$offset]); $this->brick('mail', ['offset' => ++$offset]);
if (!empty($this->transfer)): if (!empty($this->transfer)):
echo " <div style=\"clear: left\"></div>";
echo " <div class=\"pad\"></div>\n ".$this->transfer."\n"; echo " <div class=\"pad\"></div>\n ".$this->transfer."\n";
endif; endif;