diff --git a/includes/ajaxHandler/account.class.php b/includes/ajaxHandler/account.class.php
index 5a7c354e..b7545874 100644
--- a/includes/ajaxHandler/account.class.php
+++ b/includes/ajaxHandler/account.class.php
@@ -64,7 +64,7 @@ class AjaxAccount extends AjaxHandler
foreach ($ids as $typeId)
DB::Aowow()->query('INSERT INTO ?_account_excludes (`userId`, `type`, `typeId`, `mode`) VALUES (?a) ON DUPLICATE KEY UPDATE mode = (mode ^ 0x3)', array(
- User::$id, $type, $typeId, in_array($includes, $typeId) ? 2 : 1
+ User::$id, $type, $typeId, in_array($typeId, $includes) ? 2 : 1
));
return;
diff --git a/includes/ajaxHandler/comment.class.php b/includes/ajaxHandler/comment.class.php
index 728a8e4f..9fbf2b11 100644
--- a/includes/ajaxHandler/comment.class.php
+++ b/includes/ajaxHandler/comment.class.php
@@ -411,7 +411,8 @@ class AjaxComment extends AjaxHandler
return;
}
- Util::createReport(1, 19, $this->_post['id'][0], '[General Reply Report]');
+ $report = new Report(Report::MODE_COMMENT, Report::CO_INAPPROPRIATE, $this->_post['id'][0]);
+ $report->create('Report Reply Button Click');
}
protected function handleReplyUpvote() : void
diff --git a/includes/ajaxHandler/gotocomment.class.php b/includes/ajaxHandler/gotocomment.class.php
index 54637470..bc9481fa 100644
--- a/includes/ajaxHandler/gotocomment.class.php
+++ b/includes/ajaxHandler/gotocomment.class.php
@@ -29,7 +29,7 @@ class AjaxGotocomment extends AjaxHandler
if ($_ = DB::Aowow()->selectRow('SELECT IFNULL(c2.id, c1.id) AS id, IFNULL(c2.type, c1.type) AS type, IFNULL(c2.typeId, c1.typeId) AS typeId FROM ?_comments c1 LEFT JOIN ?_comments c2 ON c1.replyTo = c2.id WHERE c1.id = ?d', $this->_get['id']))
return '?'.Type::getFileString(intVal($_['type'])).'='.$_['typeId'].'#comments:id='.$_['id'].($_['id'] != $this->_get['id'] ? ':reply='.$this->_get['id'] : null);
else
- trigger_error('AjaxGotocomment::handleGoToComment - could not find comment #'.$this->get['id'], E_USER_ERROR);
+ trigger_error('AjaxGotocomment::handleGoToComment - could not find comment #'.$this->_get['id'], E_USER_ERROR);
return '.';
}
diff --git a/includes/basetype.class.php b/includes/basetype.class.php
index 11e60343..a989bedf 100644
--- a/includes/basetype.class.php
+++ b/includes/basetype.class.php
@@ -19,6 +19,7 @@ abstract class BaseType
private $itrStack = [];
+ public static $dataTable = '';
public static $contribute = CONTRIBUTE_ANY;
/*
@@ -925,6 +926,8 @@ abstract class Filter
*/
protected $genericFilter = [];
+ protected $enums = []; // criteriumID => [validOptionList]
+
/*
fieldId => [checkType, checkValue[, fieldIsArray]]
*/
diff --git a/includes/defines.php b/includes/defines.php
index a2bc250f..6872e93e 100644
--- a/includes/defines.php
+++ b/includes/defines.php
@@ -352,6 +352,11 @@ define('SIDE_ALLIANCE', 1);
define('SIDE_HORDE', 2);
define('SIDE_BOTH', 3);
+// Expansion
+define('EXP_CLASSIC', 0);
+define('EXP_BC', 1);
+define('EXP_WOTLK', 2);
+
// ClassMask
define('CLASS_WARRIOR', 0x001);
define('CLASS_PALADIN', 0x002);
diff --git a/includes/libs/DbSimple/Database.php b/includes/libs/DbSimple/Database.php
index 467a98a1..ee861d88 100644
--- a/includes/libs/DbSimple/Database.php
+++ b/includes/libs/DbSimple/Database.php
@@ -93,6 +93,8 @@ require_once __DIR__ . '/CacherImpl.php';
*/
abstract class DbSimple_Database extends DbSimple_LastError
{
+ private $attributes;
+
/**
* Public methods.
*/
diff --git a/includes/libs/DbSimple/Mysqli.php b/includes/libs/DbSimple/Mysqli.php
index dd674248..cda3f866 100644
--- a/includes/libs/DbSimple/Mysqli.php
+++ b/includes/libs/DbSimple/Mysqli.php
@@ -26,6 +26,8 @@ class DbSimple_Mysqli extends DbSimple_Database
{
var $link;
+ private $_lastQuery;
+
/**
* constructor(string $dsn)
* Connect to MySQL server.
diff --git a/includes/smartAI.class.php b/includes/smartAI.class.php
index 80ca755b..67b7649e 100644
--- a/includes/smartAI.class.php
+++ b/includes/smartAI.class.php
@@ -15,6 +15,8 @@ class SmartAI
private $srcType = 0;
private $entry = 0;
+ private $rowKey = '';
+
private $miscData = [];
private $quotes = [];
private $summons = null;
diff --git a/includes/types/arenateam.class.php b/includes/types/arenateam.class.php
index 002719fe..fda41359 100644
--- a/includes/types/arenateam.class.php
+++ b/includes/types/arenateam.class.php
@@ -122,6 +122,7 @@ class RemoteArenaTeamList extends ArenaTeamList
);
private $members = [];
+ private $rankOrder = [];
public function __construct($conditions = [], $miscData = null)
{
diff --git a/includes/types/item.class.php b/includes/types/item.class.php
index 643611ce..8699c01d 100644
--- a/includes/types/item.class.php
+++ b/includes/types/item.class.php
@@ -22,6 +22,9 @@ class ItemList extends BaseType
private $vendors = [];
private $jsGlobals = []; // getExtendedCost creates some and has no access to template
+ private $enhanceR = [];
+ private $relEnchant = [];
+
protected $queryBase = 'SELECT i.*, i.block AS tplBlock, i.armor AS tplArmor, i.dmgMin1 AS tplDmgMin1, i.dmgMax1 AS tplDmgMax1, i.id AS ARRAY_KEY, i.id AS id FROM ?_items i';
protected $queryOpts = array( // 3 => Type::ITEM
'i' => [['is', 'src', 'ic'], 'o' => 'i.quality DESC, i.itemLevel DESC'],
diff --git a/includes/types/profile.class.php b/includes/types/profile.class.php
index 9c60a3ce..63d3194c 100644
--- a/includes/types/profile.class.php
+++ b/includes/types/profile.class.php
@@ -509,6 +509,8 @@ class RemoteProfileList extends ProfileList
'at' => [['atm'], 'j' => 'arena_team at ON atm.arenaTeamId = at.arenaTeamId', 's' => ', at.name AS arenateam, IF(at.captainGuid = c.guid, 1, 0) AS captain']
);
+ private $rnItr = []; // rename iterator [name => nCharsWithThisName]
+
public function __construct($conditions = [], $miscData = null)
{
// select DB by realm
diff --git a/includes/utilities.php b/includes/utilities.php
index 5fbac5f4..8836cb79 100644
--- a/includes/utilities.php
+++ b/includes/utilities.php
@@ -1033,7 +1033,7 @@ abstract class Util
return $success;
}
- public static function createHash($length = 40) // just some random numbers for unsafe identifictaion purpose
+ public static function createHash($length = 40) // just some random numbers for unsafe identification purpose
{
static $seed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$hash = '';
@@ -2010,21 +2010,21 @@ class Report
{
if ($mode < 0 || $reason <= 0 || !$subject)
{
- trigger_error('AjaxContactus::handleContactUs - malformed contact request received', E_USER_ERROR);
+ trigger_error('Report - malformed contact request received', E_USER_ERROR);
$this->errorCode = self::ERR_MISCELLANEOUS;
return;
}
if (!isset($this->context[$mode][$reason]))
{
- trigger_error('AjaxContactus::handleContactUs - report has invalid context (mode:'.$mode.' / reason:'.$reason.')', E_USER_ERROR);
+ trigger_error('Report - report has invalid context (mode:'.$mode.' / reason:'.$reason.')', E_USER_ERROR);
$this->errorCode = self::ERR_MISCELLANEOUS;
return;
}
if (!User::$id && !User::$ip)
{
- trigger_error('AjaxContactus::handleContactUs - could not determine IP for anonymous user', E_USER_ERROR);
+ trigger_error('Report - could not determine IP for anonymous user', E_USER_ERROR);
$this->errorCode = self::ERR_MISCELLANEOUS;
return;
}
diff --git a/pages/account.php b/pages/account.php
index 6e0f3d53..8e970709 100644
--- a/pages/account.php
+++ b/pages/account.php
@@ -7,6 +7,13 @@ if (!defined('AOWOW_REVISION'))
// exclude & weightscales are handled as Ajax
class AccountPage extends GenericPage
{
+ protected $text = '';
+ protected $head = '';
+ protected $token = '';
+ protected $infobox = [];
+ protected $resetPass = false;
+ protected $forceTabs = false;
+
protected $tpl = 'acc-dashboard';
protected $scripts = array(
[SC_JS_FILE, 'js/user.js'],
diff --git a/pages/achievement.php b/pages/achievement.php
index 5ba3e0d8..38eb921f 100644
--- a/pages/achievement.php
+++ b/pages/achievement.php
@@ -25,6 +25,12 @@ class AchievementPage extends GenericPage
{
use TrDetailPage;
+ protected $mail = [];
+ protected $series = null;
+ protected $description = '';
+ protected $criteria = [];
+ protected $rewards = [];
+
protected $type = Type::ACHIEVEMENT;
protected $typeId = 0;
protected $tpl = 'achievement';
@@ -151,9 +157,9 @@ class AchievementPage extends GenericPage
/* Main Content */
/****************/
- $this->mail = $this->createMail($reqBook);
$this->headIcons = [$this->subject->getField('iconString')];
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
+ $this->mail = $this->createMail($reqBook);
$this->series = $series ? [[array_values($series), null]] : null;
$this->description = $this->subject->getField('description', true);
$this->redButtons = array(
diff --git a/pages/admin.php b/pages/admin.php
index 92259b90..2b388c7b 100644
--- a/pages/admin.php
+++ b/pages/admin.php
@@ -6,6 +6,14 @@ if (!defined('AOWOW_REVISION'))
class AdminPage extends GenericPage
{
+ protected $getAll = null;
+ protected $ssPages = [];
+ protected $ssData = [];
+ protected $ssNFound = int;
+ protected $lvTabs = [];
+ protected $extraText = '';
+ protected $extraHTML = '';
+
protected $tpl = null; // depends on the subject
protected $reqUGroup = U_GROUP_NONE; // actual group dependant on the subPage
protected $reqAuth = true;
diff --git a/pages/arenateam.php b/pages/arenateam.php
index a78beadf..da932243 100644
--- a/pages/arenateam.php
+++ b/pages/arenateam.php
@@ -10,14 +10,18 @@ class ArenaTeamPage extends GenericPage
{
use TrProfiler;
- protected $lvTabs = [];
+ protected $lvTabs = [];
- protected $type = Type::ARENA_TEAM;
+ protected $type = Type::ARENA_TEAM;
- protected $tabId = 1;
- protected $path = [1, 5, 3];
- protected $tpl = 'roster';
- protected $scripts = array(
+ protected $subject = null;
+ protected $redButtons = [];
+ protected $extraHTML = null;
+
+ protected $tabId = 1;
+ protected $path = [1, 5, 3];
+ protected $tpl = 'roster';
+ protected $scripts = array(
[SC_JS_FILE, 'js/profile_all.js'],
[SC_JS_FILE, 'js/profile.js'],
[SC_CSS_FILE, 'css/Profiler.css']
@@ -65,7 +69,6 @@ class ArenaTeamPage extends GenericPage
if ($this->subject->error)
$this->notFound();
- $this->profile = $params;
$this->name = sprintf(Lang::profiler('arenaRoster'), $this->subject->getField('name'));
}
// 2) not yet synced but exists on realm (wont work if we get passed an urlized name, but there is nothing we can do about it)
diff --git a/pages/arenateams.php b/pages/arenateams.php
index 12d3bf77..21cea897 100644
--- a/pages/arenateams.php
+++ b/pages/arenateams.php
@@ -10,6 +10,12 @@ class ArenaTeamsPage extends GenericPage
{
use TrProfiler;
+ private $filterObj = null;
+
+ protected $subCat = '';
+ protected $filter = [];
+ protected $lvTabs = [];
+
protected $type = Type::ARENA_TEAM;
protected $tabId = 1;
diff --git a/pages/enchantment.php b/pages/enchantment.php
index b76579fb..07591cf8 100644
--- a/pages/enchantment.php
+++ b/pages/enchantment.php
@@ -10,6 +10,9 @@ class EnchantmentPage extends GenericPage
{
use TrDetailPage;
+ protected $effects = [];
+ protected $activation = [];
+
protected $type = Type::ENCHANTMENT;
protected $typeId = 0;
protected $tpl = 'enchantment';
@@ -169,7 +172,7 @@ class EnchantmentPage extends GenericPage
}
}
- $this->activateCondition = $x;
+ $this->activation = $x;
}
/**************/
diff --git a/pages/event.php b/pages/event.php
index 108efb94..c9e3ceb5 100644
--- a/pages/event.php
+++ b/pages/event.php
@@ -10,6 +10,8 @@ class EventPage extends GenericPage
{
use TrDetailPage;
+ protected $dates = [];
+
protected $type = Type::WORLDEVENT;
protected $typeId = 0;
protected $tpl = 'detail-page-generic';
diff --git a/pages/events.php b/pages/events.php
index 4ca7c8f3..5661b428 100644
--- a/pages/events.php
+++ b/pages/events.php
@@ -10,6 +10,8 @@ class EventsPage extends GenericPage
{
use TrListPage;
+ private $dependency = [];
+
protected $type = Type::WORLDEVENT;
protected $tpl = 'list-page-generic';
protected $path = [0, 11];
@@ -47,10 +49,9 @@ class EventsPage extends GenericPage
$events = new WorldEventList($condition);
$this->extendGlobalData($events->getJSGlobals());
- $this->deps = [];
foreach ($events->iterate() as $__)
if ($d = $events->getField('requires'))
- $this->deps[$events->id] = $d;
+ $this->dependency[$events->id] = $d;
$data = array_values($events->getListviewData());
@@ -86,7 +87,7 @@ class EventsPage extends GenericPage
foreach ($views[1]['data'] as &$data)
{
// is a followUp-event
- if (!empty($this->deps[$data['id']]))
+ if (!empty($this->dependency[$data['id']]))
{
$data['startDate'] = $data['endDate'] = false;
unset($data['_date']);
diff --git a/pages/genericPage.class.php b/pages/genericPage.class.php
index efd7a035..73a47887 100644
--- a/pages/genericPage.class.php
+++ b/pages/genericPage.class.php
@@ -15,6 +15,18 @@ trait TrDetailPage
protected $subject = null; // so it will not get cached
+ // template vars
+ protected $extraText = '';
+ protected $infobox = [];
+ protected $transfer = []; // faction transfer equivalent data
+ protected $redButtons = []; // see template/redButtons.tpl.php
+ protected $smartAI = null;
+ protected $map = null;
+ protected $article = [];
+ protected $headIcons = [];
+ protected $expansion = EXP_CLASSIC;
+
+
protected $contribute = CONTRIBUTE_ANY;
protected function generateCacheKey(bool $withStaff = true) : string
@@ -49,9 +61,11 @@ trait TrDetailPage
trait TrListPage
{
- protected $category = null;
- protected $filter = [];
- protected $lvTabs = []; // most pages have this
+ protected $category = null;
+ protected $subCat = '';
+ protected $filter = [];
+ protected $lvTabs = []; // most pages have this
+ protected $redButtons = []; // see template/redButtons.tpl.php
private $filterObj = null;
@@ -574,7 +588,7 @@ class GenericPage
$this->article['params']['prepend'] = '
'.Lang::main('langOnly', [Lang::lang($article['locale'])]).'
';
if (method_exists($this, 'postArticle')) // e.g. update variables in article
- $this->postArticle();
+ $this->postArticle($this->article['text']);
}
}
diff --git a/pages/guide.php b/pages/guide.php
index 3f08826a..50c885ef 100644
--- a/pages/guide.php
+++ b/pages/guide.php
@@ -17,6 +17,9 @@ class GuidePage extends GenericPage
const VALID_URL = '/^[a-z0-9=_&\.\/\-]{2,64}$/i';
+ protected /* array */ $guideRating = [];
+ protected /* ?string */$extraHTML = null;
+
protected /* int */ $type = Type::GUIDE;
protected /* int */ $typeId = 0;
protected /* int */ $guideRevision = -1;
@@ -33,6 +36,7 @@ class GuidePage extends GenericPage
private /* string */ $extra = '';
private /* string */ $powerTpl = '$WowheadPower.registerGuide(%s, %d, %s);';
private /* array */ $editorFields = [];
+ private /* bool */ $save = false;
protected /* array */ $_get = array(
'id' => ['filter' => FILTER_CALLBACK, 'options' => 'GenericPage::checkInt'],
@@ -296,7 +300,7 @@ class GuidePage extends GenericPage
if ($this->subject->getField('nvotes') < 5)
$qf[] = Lang::guide('rating').Lang::main('colon').Lang::guide('noVotes');
else
- $qf[] = Lang::guide('rating').Lang::main('colon').Lang::guide('votes', [round($this->rating['avg'], 1), $this->rating['n']]);
+ $qf[] = Lang::guide('rating').Lang::main('colon').Lang::guide('votes', [round($this->subject->getField('rating'), 1), $this->subject->getField('nvotes')]);
}
break;
case GUIDE_STATUS_ARCHIVED:
diff --git a/pages/guild.php b/pages/guild.php
index 4fb56556..42691f1c 100644
--- a/pages/guild.php
+++ b/pages/guild.php
@@ -10,14 +10,18 @@ class GuildPage extends GenericPage
{
use TrProfiler;
- protected $lvTabs = [];
+ protected $lvTabs = [];
- protected $type = Type::GUILD;
+ protected $type = Type::GUILD;
- protected $tabId = 1;
- protected $path = [1, 5, 2];
- protected $tpl = 'roster';
- protected $scripts = array(
+ protected $subject = null;
+ protected $redButtons = [];
+ protected $extraHTML = null;
+
+ protected $tabId = 1;
+ protected $path = [1, 5, 2];
+ protected $tpl = 'roster';
+ protected $scripts = array(
[SC_JS_FILE, 'js/profile_all.js'],
[SC_JS_FILE, 'js/profile.js'],
[SC_CSS_FILE, 'css/Profiler.css']
@@ -65,7 +69,6 @@ class GuildPage extends GenericPage
if ($this->subject->error)
$this->notFound();
- $this->profile = $params;
$this->name = sprintf(Lang::profiler('guildRoster'), $this->subject->getField('name'));
}
// 2) not yet synced but exists on realm (wont work if we get passed an urlized name, but there is nothing we can do about it)
diff --git a/pages/guilds.php b/pages/guilds.php
index 0277ee6f..3615f284 100644
--- a/pages/guilds.php
+++ b/pages/guilds.php
@@ -10,6 +10,12 @@ class GuildsPage extends GenericPage
{
use TrProfiler;
+ private $filterObj = null;
+
+ protected $subCat = '';
+ protected $filter = [];
+ protected $lvTabs = [];
+
protected $type = Type::GUILD;
protected $tabId = 1;
diff --git a/pages/icon.php b/pages/icon.php
index 7b9aa4d5..9cef9ae3 100644
--- a/pages/icon.php
+++ b/pages/icon.php
@@ -10,6 +10,8 @@ class IconPage extends GenericPage
{
use TrDetailPage;
+ protected $icon = '';
+
protected $type = Type::ICON;
protected $typeId = 0;
protected $tpl = 'icon';
diff --git a/pages/item.php b/pages/item.php
index c3a17928..9f847463 100644
--- a/pages/item.php
+++ b/pages/item.php
@@ -10,6 +10,11 @@ class ItemPage extends genericPage
{
use TrDetailPage;
+ protected $pageText = [];
+ protected $tooltip = null;
+ protected $unavailable = false;
+ protected $subItems = [];
+
protected $type = Type::ITEM;
protected $typeId = 0;
protected $tpl = 'item';
@@ -372,7 +377,7 @@ class ItemPage extends genericPage
);
// availablility
- $this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE;
+ $this->unavailable = !!($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE);
// subItems
$this->subject->initSubItems();
diff --git a/pages/items.php b/pages/items.php
index 0521a372..e510b67d 100644
--- a/pages/items.php
+++ b/pages/items.php
@@ -10,6 +10,9 @@ class ItemsPage extends GenericPage
{
use TrListPage;
+ protected $forceTabs = false;
+ protected $gemScores = [];
+
protected $type = Type::ITEM;
protected $tpl = 'items';
protected $path = [0, 0];
@@ -76,6 +79,7 @@ class ItemsPage extends GenericPage
13 => true
);
+ private $filterOpts = [];
private $sharedLV = array( // common listview components across all tabs
'hiddenCols' => [],
'visibleCols' => [],
@@ -485,7 +489,7 @@ class ItemsPage extends GenericPage
$this->sharedLV['computeDataFunc'] = '$fi_scoreSockets';
$q = intVal($this->filter['gm']);
- $mask = 14;
+ $mask = 0xE;
$cnd = [10, ['class', ITEM_CLASS_GEM], ['gemColorMask', &$mask, '&'], ['quality', &$q]];
if (!isset($this->filter['jc']))
$cnd[] = ['itemLimitCategory', 0]; // Jeweler's Gems
@@ -503,7 +507,7 @@ class ItemsPage extends GenericPage
for ($i = 0; $i < 4; $i++)
{
$mask = 1 << $i;
- $q = !$i ? 3 : intVal($this->filter['gm']); // meta gems are always included.. ($q is backReferenced)
+ $q = !$i ? ITEM_QUALITY_RARE : intVal($this->filter['gm']); // meta gems are always included.. ($q is backReferenced)
$byColor = new ItemList($cnd, ['extraOpts' => $this->filterObj->extraOpts]);
if (!$byColor->error)
{
diff --git a/pages/itemset.php b/pages/itemset.php
index 5cdf7bb9..bdae580d 100644
--- a/pages/itemset.php
+++ b/pages/itemset.php
@@ -10,6 +10,13 @@ class ItemsetPage extends GenericPage
{
use TrDetailPage;
+ protected $summary = [];
+ protected $bonusExt = '';
+ protected $description = '';
+ protected $unavailable = false;
+ protected $pieces = [];
+ protected $spells = [];
+
protected $type = Type::ITEMSET;
protected $typeId = 0;
protected $tpl = 'itemset';
@@ -18,8 +25,6 @@ class ItemsetPage extends GenericPage
protected $mode = CACHE_TYPE_PAGE;
protected $scripts = [[SC_JS_FILE, 'js/swfobject.js'], [SC_JS_FILE, 'js/Summary.js']];
- protected $summary = [];
-
protected $_get = ['domain' => ['filter' => FILTER_CALLBACK, 'options' => 'GenericPage::checkDomain']];
private $powerTpl = '$WowheadPower.registerItemSet(%d, %d, %s);';
@@ -160,11 +165,11 @@ class ItemsetPage extends GenericPage
$this->bonusExt = $skill;
$this->description = $_ta ? sprintf(Lang::itemset('_desc'), $this->name, Lang::itemset('notes', $_ta), $_cnt) : sprintf(Lang::itemset('_descTagless'), $this->name, $_cnt);
- $this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE;
+ $this->unavailable = !!($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE);
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->pieces = $pieces;
$this->spells = $this->subject->getBonuses();
- $this->expansion = 0;
+ // $this->expansion = $this->subject->getField('expansion'); NYI - todo: add col to table
$this->redButtons = array(
BUTTON_WOWHEAD => $this->typeId > 0, // bool only
BUTTON_LINKS => ['type' => $this->type, 'typeId' => $this->typeId],
diff --git a/pages/more.php b/pages/more.php
index d072617b..a3bb3c9f 100644
--- a/pages/more.php
+++ b/pages/more.php
@@ -10,14 +10,21 @@ if (!defined('AOWOW_REVISION'))
class MorePage extends GenericPage
{
- protected $tpl = 'list-page-generic';
- protected $path = [];
- protected $tabId = 0;
- protected $mode = CACHE_TYPE_NONE;
- protected $scripts = [[SC_JS_FILE, 'js/swfobject.js']];
+ protected $articleUrl = '';
+ protected $tabsTitle = '';
+ protected $privReqPoints = '';
+ protected $forceTabs = true;
+ protected $lvTabs = [];
+ protected $privileges = [];
- private $page = [];
- private $req2priv = array(
+ protected $tpl = 'list-page-generic';
+ protected $path = [];
+ protected $tabId = 0;
+ protected $mode = CACHE_TYPE_NONE;
+ protected $scripts = [[SC_JS_FILE, 'js/swfobject.js']];
+
+ private $page = [];
+ private $req2priv = array(
1 => CFG_REP_REQ_COMMENT, // write comments
2 => 0, // NYI post external links
4 => 0, // NYI no captcha
@@ -56,9 +63,9 @@ class MorePage extends GenericPage
{
$pageData = $this->validPages[$pageCall];
- $this->tab = $pageData[0];
- $this->path = $pageData[1];
- $this->page = [$pageCall, $subPage];
+ $this->tabId = $pageData[0];
+ $this->path = $pageData[1];
+ $this->page = [$pageCall, $subPage];
if ($subPage && isset($pageData[2]))
{
@@ -109,14 +116,13 @@ class MorePage extends GenericPage
}
}
- protected function postArticle()
+ protected function postArticle(string &$txt) : void
{
if ($this->page[0] != 'reputation' &&
$this->page[0] != 'privileges' &&
$this->page[0] != 'privilege')
return;
- $txt = &$this->article['text'];
$consts = get_defined_constants(true);
foreach ($consts['user'] as $k => $v)
{
@@ -145,7 +151,6 @@ class MorePage extends GenericPage
$r['when'] = date(Util::$dateFormatInternal, $r['when']);
$this->tabsTitle = Lang::main('yourRepHistory');
- $this->forceTabs = true;
$this->lvTabs[] = ['reputationhistory', array(
'id' => 'reputation-history',
'name' => '$LANG.reputationhistory',
diff --git a/pages/npc.php b/pages/npc.php
index 91b6c0cc..81a8ad6b 100644
--- a/pages/npc.php
+++ b/pages/npc.php
@@ -10,6 +10,12 @@ class NpcPage extends GenericPage
{
use TrDetailPage;
+ protected $placeholder = null;
+ protected $accessory = [];
+ protected $quotes = [];
+ protected $reputation = [];
+ protected $subname = '';
+
protected $type = Type::NPC;
protected $typeId = 0;
protected $tpl = 'npc';
diff --git a/pages/npcs.php b/pages/npcs.php
index bdb35ecf..65b70784 100644
--- a/pages/npcs.php
+++ b/pages/npcs.php
@@ -10,6 +10,8 @@ class NpcsPage extends GenericPage
{
use TrListPage;
+ protected $petFamPanel = false;
+
protected $type = Type::NPC;
protected $tpl = 'npcs';
protected $path = [0, 4];
@@ -45,8 +47,6 @@ class NpcsPage extends GenericPage
$conditions[] = ['type', $this->category[0]];
$this->petFamPanel = $this->category[0] == 1;
}
- else
- $this->petFamPanel = false;
if ($_ = $this->filterObj->getConditions())
$conditions[] = $_;
diff --git a/pages/object.php b/pages/object.php
index c217fe3b..e785018d 100644
--- a/pages/object.php
+++ b/pages/object.php
@@ -10,6 +10,9 @@ class ObjectPage extends GenericPage
{
use TrDetailPage;
+ protected $pageText = [];
+ protected $relBoss = null;
+
protected $type = Type::OBJECT;
protected $typeId = 0;
protected $tpl = 'object';
@@ -213,7 +216,7 @@ class ObjectPage extends GenericPage
/****************/
// pageText
- if ($this->pageText = Game::getPageText($next = $this->subject->getField('pageTextId')))
+ if ($this->pageText = Game::getPageText($this->subject->getField('pageTextId')))
$this->addScript(
[SC_JS_FILE, 'js/Book.js'],
[SC_CSS_FILE, 'css/Book.css']
diff --git a/pages/profiles.php b/pages/profiles.php
index e5924272..91e2dabe 100644
--- a/pages/profiles.php
+++ b/pages/profiles.php
@@ -10,6 +10,11 @@ class ProfilesPage extends GenericPage
{
use TrProfiler;
+ private $filterObj = null;
+
+ protected $subCat = '';
+ protected $filter = [];
+ protected $lvTabs = [];
protected $roster = 0; // $_GET['roster'] = 1|2|3|4 .. 2,3,4 arenateam-size (4 => 5-man), 1 guild .. it puts a resync button on the lv...
protected $type = Type::PROFILE;
diff --git a/pages/quest.php b/pages/quest.php
index 5ad48baf..977dea71 100644
--- a/pages/quest.php
+++ b/pages/quest.php
@@ -10,6 +10,21 @@ class QuestPage extends GenericPage
{
use TrDetailPage;
+ protected $objectiveList = [];
+ protected $providedItem = [];
+ protected $series = [];
+ protected $gains = [];
+ protected $mail = [];
+ protected $rewards = [];
+ protected $objectives = '';
+ protected $details = '';
+ protected $offerReward = '';
+ protected $requestItems = '';
+ protected $completed = '';
+ protected $end = '';
+ protected $suggestedPl = 1;
+ protected $unavailable = false;
+
protected $type = Type::QUEST;
protected $typeId = 0;
protected $tpl = 'quest';
@@ -369,9 +384,6 @@ class QuestPage extends GenericPage
/* Objectives List */
/*******************/
- $this->objectiveList = [];
- $this->providedItem = [];
-
// gather ids for lookup
$olItems = $olNPCs = $olGOs = $olFactions = [];
$olItemData = $olNPCData = $olGOData = null;
diff --git a/pages/screenshot.php b/pages/screenshot.php
index af5e262f..fcff8f61 100644
--- a/pages/screenshot.php
+++ b/pages/screenshot.php
@@ -11,6 +11,10 @@ class ScreenshotPage extends GenericPage
const MAX_W = 488;
const MAX_H = 325;
+ protected $infobox = [];
+ protected $cropper = [];
+ protected $extraHTML = null;
+
protected $tpl = 'screenshot';
protected $scripts = [[SC_JS_FILE, 'js/Cropper.js'], [SC_CSS_FILE, 'css/Cropper.css']];
protected $reqAuth = true;
@@ -20,6 +24,7 @@ class ScreenshotPage extends GenericPage
private $pendingPath = 'static/uploads/screenshots/pending/';
private $destination = null;
private $minSize = CFG_SCREENSHOT_MIN_SIZE;
+ private $command = '';
protected $validCats = ['add', 'crop', 'complete', 'thankyou'];
protected $destType = 0;
@@ -243,7 +248,7 @@ class ScreenshotPage extends GenericPage
// write to db
$newId = DB::Aowow()->query(
- 'INSERT INTO ?_screenshots (type, typeId, userIdOwner, date, width, height, caption) VALUES (?d, ?d, ?d, UNIX_TIMESTAMP(), ?d, ?d, ?)',
+ 'INSERT INTO ?_screenshots (`type`, `typeId`, `userIdOwner`, `date`, `width`, `height`, `caption`, `status`) VALUES (?d, ?d, ?d, UNIX_TIMESTAMP(), ?d, ?d, ?, 0)',
$this->destType, $this->destTypeId,
User::$id,
$w, $h,
diff --git a/pages/sound.php b/pages/sound.php
index 4cb0193c..c0c2d987 100644
--- a/pages/sound.php
+++ b/pages/sound.php
@@ -10,7 +10,10 @@ class SoundPage extends GenericPage
{
use TrDetailPage;
+ protected $articleUrl = '';
+
protected $type = Type::SOUND;
+ protected $typeId = 0;
protected $tpl = 'sound';
protected $path = [0, 19];
protected $tabId = 0;
diff --git a/pages/spell.php b/pages/spell.php
index f02492ba..d3b79a9e 100644
--- a/pages/spell.php
+++ b/pages/spell.php
@@ -10,6 +10,26 @@ class SpellPage extends GenericPage
{
use TrDetailPage;
+ protected $reagents = [];
+ protected $scaling = [];
+ protected $items = [];
+ protected $tools = [];
+ protected $effects = [];
+ protected $attributes = [];
+ protected $powerCost = [];
+ protected $castTime = [];
+ protected $level = [];
+ protected $rangeName = [];
+ protected $range = [];
+ protected $gcd = [];
+ protected $gcdCat = null; // todo (low): nyi; find out how this works [n/a; normal; ..]
+ protected $school = [];
+ protected $dispel = [];
+ protected $mechanic = [];
+ protected $stances = [];
+ protected $cooldown = [];
+ protected $duration = [];
+
protected $type = Type::SPELL;
protected $typeId = 0;
protected $tpl = 'spell';
@@ -278,20 +298,19 @@ class SpellPage extends GenericPage
$this->tools = $this->createTools();
$this->effects = $effects;
$this->attributes = $this->createAttributesList();
- $this->infobox = $infobox;
$this->powerCost = $this->subject->createPowerCostForCurrent();
$this->castTime = $this->subject->createCastTimeForCurrent(false, false);
- $this->name = $this->subject->getField('name', true);
- $this->headIcons = [$this->subject->getField('iconString'), $this->subject->getField('stackAmount') ?: ($this->subject->getField('procCharges') > 1 ? $this->subject->getField('procCharges') : '')];
$this->level = $this->subject->getField('spellLevel');
$this->rangeName = $this->subject->getField('rangeText', true);
$this->range = $this->subject->getField('rangeMaxHostile');
$this->gcd = Util::formatTime($this->subject->getField('startRecoveryTime'));
- $this->gcdCat = null; // todo (low): nyi; find out how this works [n/a; normal; ..]
$this->school = [Util::asHex($this->subject->getField('schoolMask')), Lang::getMagicSchools($this->subject->getField('schoolMask'))];
$this->dispel = $this->subject->getField('dispelType') ? Lang::game('dt', $this->subject->getField('dispelType')) : null;
$this->mechanic = $this->subject->getField('mechanic') ? Lang::game('me', $this->subject->getField('mechanic')) : null;
+ $this->name = $this->subject->getField('name', true);
+ $this->headIcons = [$this->subject->getField('iconString'), $this->subject->getField('stackAmount') ?: ($this->subject->getField('procCharges') > 1 ? $this->subject->getField('procCharges') : '')];
$this->redButtons = $redButtons;
+ $this->infobox = $infobox;
// minRange exists.. prepend
if ($_ = $this->subject->getField('rangeMinHostile'))
diff --git a/pages/spells.php b/pages/spells.php
index 4d024371..391b3a8b 100644
--- a/pages/spells.php
+++ b/pages/spells.php
@@ -10,6 +10,9 @@ class SpellsPage extends GenericPage
{
use TrListPage;
+ protected $classPanel = false;
+ protected $glyphPanel = false;
+
protected $type = Type::SPELL;
protected $tpl = 'spells';
protected $path = [0, 1];
@@ -95,9 +98,6 @@ class SpellsPage extends GenericPage
$this->name = Util::ucFirst(Lang::game('spells'));
$this->subCat = $pageParam !== '' ? '='.$pageParam : '';
-
- $this->classPanel = false;
- $this->glyphPanel = false;
}
protected function generateContent()
diff --git a/pages/talent.php b/pages/talent.php
index ec36cf91..240b7878 100644
--- a/pages/talent.php
+++ b/pages/talent.php
@@ -18,6 +18,7 @@ class TalentPage extends GenericPage
[SC_CSS_FILE, 'css/talent.css']
);
+ protected $tcType = 'tc'; // tc: TalentCalculator; pc: PetCalculator
private $isPetCalc = false;
public function __construct($pageCall, $__)
diff --git a/pages/user.php b/pages/user.php
index 104145d2..be38b3a6 100644
--- a/pages/user.php
+++ b/pages/user.php
@@ -6,6 +6,11 @@ if (!defined('AOWOW_REVISION'))
class UserPage extends GenericPage
{
+ protected $lvTabs = [];
+ protected $forceTabs = true;
+ protected $infobox = [];
+ protected $contributions = '';
+
protected $tpl = 'user';
protected $scripts = array(
[SC_JS_FILE, 'js/user.js'],
@@ -14,7 +19,6 @@ class UserPage extends GenericPage
);
protected $mode = CACHE_TYPE_NONE;
- protected $typeId = 0;
protected $pageName = '';
protected $user = [];
@@ -136,9 +140,6 @@ class UserPage extends GenericPage
/* Extra Tabs */
/**************/
- $this->lvTabs = [];
- $this->forceTabs = true;
-
// [unused] Site Achievements
// Reputation changelog (params only for comment-events)
diff --git a/pages/utility.php b/pages/utility.php
index c14ada2f..d1c486e0 100644
--- a/pages/utility.php
+++ b/pages/utility.php
@@ -8,6 +8,10 @@ if (!defined('AOWOW_REVISION'))
// tabId 1: Tools g_initHeader()
class UtilityPage extends GenericPage
{
+ protected $lvTabs = [];
+ protected $category = [];
+ protected $h1Links = '';
+
protected $tpl = 'list-page-generic';
protected $path = [1, 8];
protected $tabId = 1;
@@ -42,8 +46,6 @@ class UtilityPage extends GenericPage
else
$this->name .= Lang::main('colon') . Lang::main('mostComments', 0);
}
-
- $this->lvTabs = [];
}
public function display(string $override = '') : void
diff --git a/pages/zone.php b/pages/zone.php
index dc64371f..294af586 100644
--- a/pages/zone.php
+++ b/pages/zone.php
@@ -13,6 +13,7 @@ class ZonePage extends GenericPage
protected $path = [0, 6];
protected $tabId = 0;
protected $type = Type::ZONE;
+ protected $typeId = 0;
protected $tpl = 'detail-page-generic';
protected $scripts = [[SC_JS_FILE, 'js/ShowOnMap.js']];
diff --git a/pages/zones.php b/pages/zones.php
index 97582b7a..ffe7130b 100644
--- a/pages/zones.php
+++ b/pages/zones.php
@@ -10,6 +10,8 @@ class ZonesPage extends GenericPage
{
use TrListPage;
+ protected $map = null;
+
protected $type = Type::ZONE;
protected $tpl = 'list-page-generic';
protected $path = [0, 6];
@@ -82,7 +84,6 @@ class ZonesPage extends GenericPage
if ($hiddenCols)
$tabData['hiddenCols'] = $hiddenCols;
- $this->map = null;
$this->lvTabs[] = [ZoneList::$brickFile, $tabData];
// create flight map
diff --git a/template/bricks/contribute.tpl.php b/template/bricks/contribute.tpl.php
index c4291f8b..87f61733 100644
--- a/template/bricks/contribute.tpl.php
+++ b/template/bricks/contribute.tpl.php
@@ -3,7 +3,7 @@ if (!empty($this->contribute)):
?>
-
+=Lang::main('contribute'); ?>
diff --git a/template/bricks/footer.tpl.php b/template/bricks/footer.tpl.php
index 58e23688..c1f8bf9d 100644
--- a/template/bricks/footer.tpl.php
+++ b/template/bricks/footer.tpl.php
@@ -28,7 +28,7 @@ endif;
diff --git a/template/bricks/infobox.tpl.php b/template/bricks/infobox.tpl.php
index 6726ba2e..21799c6d 100644
--- a/template/bricks/infobox.tpl.php
+++ b/template/bricks/infobox.tpl.php
@@ -4,12 +4,12 @@ echo "
\n";
if (!empty($this->infobox)):
?>
- |
+ | =Lang::main('quickFacts'); ?> |
|
|
\n";
if (!empty($this->contributions)):
?>
- |
+ | =Lang::user('contributions'); ?> |
|
|
\n";
if ($this->contribute & CONTRIBUTE_SS):
?>
- |
+ | =Lang::main('screenshots'); ?> |
|
contribute & CONTRIBUTE_VI && (User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO) || !empty($this->community['vi']))):
?>
- |
+ | =Lang::main('videos'); ?> |
|
+=Lang::spell('reagents'); ?>
|
-
-
+
+
|
|
+ | =$listTitle ?: Lang::achievement('series'); ?> |
diff --git a/template/bricks/tooltip.tpl.php b/template/bricks/tooltip.tpl.php
index d09dbb1a..c976db46 100644
--- a/template/bricks/tooltip.tpl.php
+++ b/template/bricks/tooltip.tpl.php
@@ -9,7 +9,7 @@ $hasBuff = !empty($this->jsGlobals[Type::SPELL][2][$this->typeId]['buff']); // n
if ($hasBuff):
?>
-
+ =Lang::spell('_aura'); ?>
@@ -43,7 +43,7 @@
if (User::canUploadScreenshot()):
?>
-
diff --git a/template/pages/acc-signUp.tpl.php b/template/pages/acc-signUp.tpl.php
index b029652a..e3ff75ef 100644
--- a/template/pages/acc-signUp.tpl.php
+++ b/template/pages/acc-signUp.tpl.php
@@ -11,9 +11,9 @@
text)): ?>
- |