Revert changes on MainAppPage: splitting getParams
This commit is contained in:
40
lib/Spot.php
40
lib/Spot.php
@@ -162,7 +162,7 @@ class Spot extends Main
|
||||
);
|
||||
}
|
||||
|
||||
public function getAppParams($bInternal=false) {
|
||||
public function getAppMainPage() {
|
||||
|
||||
//Cache Page List
|
||||
$asPages = array_diff($this->asMasks, array('email_update', 'email_conf'));
|
||||
@@ -170,35 +170,27 @@ class Spot extends Main
|
||||
$asPages = array_diff($asPages, array('admin', 'upload'));
|
||||
}
|
||||
|
||||
$asGlobalVars = array(
|
||||
'vars' => array(
|
||||
'chunk_size' => self::FEED_CHUNK_SIZE,
|
||||
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
||||
'projects' => $this->oProject->getProjects(),
|
||||
'user' => $this->oUser->getUserInfo()
|
||||
),
|
||||
'consts' => array(
|
||||
'modes' => Project::MODES,
|
||||
'clearances' => User::CLEARANCES,
|
||||
'default_timezone' => Settings::TIMEZONE
|
||||
)
|
||||
);
|
||||
|
||||
$asParams = parent::getParams($asGlobalVars, self::MAIN_PAGE, $asPages);
|
||||
return $bInternal?$asParams:self::getJsonResult(true, '', $asParams);
|
||||
}
|
||||
|
||||
public function getAppMainPage()
|
||||
{
|
||||
return parent::getMainPage(
|
||||
array(
|
||||
'vars' => array(
|
||||
'chunk_size' => self::FEED_CHUNK_SIZE,
|
||||
'default_project_codename' => $this->oProject->getProjectCodeName(),
|
||||
'projects' => $this->oProject->getProjects(),
|
||||
'user' => $this->oUser->getUserInfo()
|
||||
),
|
||||
'consts' => array(
|
||||
'modes' => Project::MODES,
|
||||
'clearances' => User::CLEARANCES,
|
||||
'default_timezone' => Settings::TIMEZONE
|
||||
)
|
||||
),
|
||||
self::MAIN_PAGE,
|
||||
array(
|
||||
'language' => $this->oLang->getLanguage(),
|
||||
'host_url' => $this->asContext['serv_name'],
|
||||
'filepath_css' => self::addTimestampToFilePath('spot.css'),
|
||||
'filepath_js' => self::addTimestampToFilePath('../dist/app.js'),
|
||||
'params' => json_encode($this->getAppParams(true))
|
||||
)
|
||||
),
|
||||
$asPages
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user