mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Pages/Scripts
* do not skip generic page constructor ... ever
This commit is contained in:
@@ -25,6 +25,8 @@ class ArenaTeamPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
@@ -34,8 +36,6 @@ class ArenaTeamPage extends GenericPage
|
|||||||
if (isset($params[1]))
|
if (isset($params[1]))
|
||||||
$params[1] = Profiler::urlize($params[1]);
|
$params[1] = Profiler::urlize($params[1]);
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
|
|
||||||
if (count($params) == 1 && intval($params[0]))
|
if (count($params) == 1 && intval($params[0]))
|
||||||
{
|
{
|
||||||
$this->subject = new LocalArenaTeamList(array(['at.id', intval($params[0])]));
|
$this->subject = new LocalArenaTeamList(array(['at.id', intval($params[0])]));
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ class ArenaTeamsPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
@@ -43,8 +45,6 @@ class ArenaTeamsPage extends GenericPage
|
|||||||
$this->sumSubjects += DB::Characters($idx)->selectCell('SELECT count(*) FROM arena_team');
|
$this->sumSubjects += DB::Characters($idx)->selectCell('SELECT count(*) FROM arena_team');
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
|
|
||||||
$this->name = Lang::profiler('arenaTeams');
|
$this->name = Lang::profiler('arenaTeams');
|
||||||
$this->subCat = $pageParam ? '='.$pageParam : '';
|
$this->subCat = $pageParam ? '='.$pageParam : '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ class GuildPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
@@ -34,8 +36,6 @@ class GuildPage extends GenericPage
|
|||||||
if (isset($params[1]))
|
if (isset($params[1]))
|
||||||
$params[1] = Profiler::urlize($params[1]);
|
$params[1] = Profiler::urlize($params[1]);
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
|
|
||||||
if (count($params) == 1 && intval($params[0]))
|
if (count($params) == 1 && intval($params[0]))
|
||||||
{
|
{
|
||||||
$this->subject = new LocalGuildList(array(['g.id', intval($params[0])]));
|
$this->subject = new LocalGuildList(array(['g.id', intval($params[0])]));
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ class GuildsPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
@@ -39,8 +41,6 @@ class GuildsPage extends GenericPage
|
|||||||
$this->sumSubjects += DB::Characters($idx)->selectCell('SELECT COUNT(*) FROM guild');
|
$this->sumSubjects += DB::Characters($idx)->selectCell('SELECT COUNT(*) FROM guild');
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
|
|
||||||
$this->name = Lang::profiler('guilds');
|
$this->name = Lang::profiler('guilds');
|
||||||
$this->subCat = $pageParam ? '='.$pageParam : '';
|
$this->subCat = $pageParam ? '='.$pageParam : '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ class ProfilePage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
@@ -51,8 +53,6 @@ class ProfilePage extends GenericPage
|
|||||||
if (isset($params[1]))
|
if (isset($params[1]))
|
||||||
$params[1] = Profiler::urlize($params[1], true);
|
$params[1] = Profiler::urlize($params[1], true);
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
|
|
||||||
// temp locale
|
// temp locale
|
||||||
if ($this->mode == CACHE_TYPE_TOOLTIP && $this->_get['domain'])
|
if ($this->mode == CACHE_TYPE_TOOLTIP && $this->_get['domain'])
|
||||||
Util::powerUseLocale($this->_get['domain']);
|
Util::powerUseLocale($this->_get['domain']);
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ class ProfilerPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generateContent()
|
protected function generateContent()
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ class ProfilesPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
|
$this->getSubjectFromUrl($pageParam);
|
||||||
|
|
||||||
if (!CFG_PROFILER_ENABLE)
|
if (!CFG_PROFILER_ENABLE)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
$this->getSubjectFromUrl($pageParam);
|
|
||||||
|
|
||||||
$realms = [];
|
$realms = [];
|
||||||
foreach (Profiler::getRealms() as $idx => $r)
|
foreach (Profiler::getRealms() as $idx => $r)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ class SearchPage extends GenericPage
|
|||||||
|
|
||||||
public function __construct($pageCall, $pageParam)
|
public function __construct($pageCall, $pageParam)
|
||||||
{
|
{
|
||||||
// restricted access
|
|
||||||
if ($this->reqUGroup && !User::isInGroup($this->reqUGroup))
|
|
||||||
$this->error();
|
|
||||||
|
|
||||||
parent::__construct($pageCall, $pageParam); // just to set g_user and g_locale
|
parent::__construct($pageCall, $pageParam); // just to set g_user and g_locale
|
||||||
|
|
||||||
$this->search =
|
$this->search =
|
||||||
|
|||||||
Reference in New Issue
Block a user