CC-4434: Make Application_Model_Preference::getValue and setValue private methods
-initial commit
This commit is contained in:
parent
cd530fc556
commit
e3c1a3ac0e
6 changed files with 71 additions and 32 deletions
|
@ -35,14 +35,14 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-library', '' );");
|
||||
}
|
||||
|
||||
$data = Application_Model_Preference::getValue("timeline_datatable", true);
|
||||
if ($data != "") {
|
||||
$data = Application_Model_Preference::getTimelineDatatableSetting();
|
||||
if (!is_null($data)) {
|
||||
$timelineTable = json_encode(unserialize($data));
|
||||
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', JSON.stringify($timelineTable) );");
|
||||
} else {
|
||||
$this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );");
|
||||
}
|
||||
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
@ -127,11 +127,10 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$showLib = false;
|
||||
if (!$user->isGuest()) {
|
||||
$disableLib = false;
|
||||
$data = Application_Model_Preference::getValue("nowplaying_screen", true);
|
||||
if ($data != "") {
|
||||
$settings = unserialize($data);
|
||||
|
||||
if ($settings["library"] == "true") {
|
||||
$data = Application_Model_Preference::getNowPlayingScreenSettings();
|
||||
if (!is_null($data)) {
|
||||
if ($data["library"] == "true") {
|
||||
$showLib = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,15 +23,14 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$settings = $request->getParam("settings");
|
||||
|
||||
$data = serialize($settings);
|
||||
Application_Model_Preference::setValue("nowplaying_screen", $data, true);
|
||||
Application_Model_Preference::setNowPlayingScreenSettings($data);
|
||||
}
|
||||
|
||||
public function getNowPlayingScreenSettingsAction()
|
||||
{
|
||||
$data = Application_Model_Preference::getValue("nowplaying_screen", true);
|
||||
if ($data != "") {
|
||||
$this->view->settings = unserialize($data);
|
||||
$data = Application_Model_Preference::getNowPlayingScreenSettings();
|
||||
if (!is_null($data)) {
|
||||
$this->view->settings = $data;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,8 +39,7 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$settings = $request->getParam("settings");
|
||||
|
||||
$data = serialize($settings);
|
||||
Application_Model_Preference::setValue("library_datatable", $data, true);
|
||||
Application_Model_Preference::setCurrentLibraryTableSetting($settings);
|
||||
}
|
||||
|
||||
public function getLibraryDatatableAction()
|
||||
|
@ -59,9 +57,7 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$settings = $request->getParam("settings");
|
||||
|
||||
$data = serialize($settings);
|
||||
Application_Model_Preference::setValue("timeline_datatable", $data, true);
|
||||
|
||||
Application_Model_Preference::setTimelineDatatableSetting($settings);
|
||||
$end = microtime(true);
|
||||
|
||||
Logging::debug("saving timeline datatables info took:");
|
||||
|
@ -72,9 +68,9 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
{
|
||||
$start = microtime(true);
|
||||
|
||||
$data = Application_Model_Preference::getValue("timeline_datatable", true);
|
||||
if ($data != "") {
|
||||
$this->view->settings = unserialize($data);
|
||||
$data = Application_Model_Preference::getTimelineDatatableSetting();
|
||||
if (!is_null($data)) {
|
||||
$this->view->settings = $data;
|
||||
}
|
||||
|
||||
$end = microtime(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue