2012-02-23 12:13:00 +01:00
|
|
|
<?php
|
2021-10-11 16:10:47 +02:00
|
|
|
|
2012-02-23 12:13:00 +01:00
|
|
|
class UsersettingsController extends Zend_Controller_Action
|
|
|
|
{
|
|
|
|
public function init()
|
|
|
|
{
|
2021-10-11 16:10:47 +02:00
|
|
|
// Initialize action controller here
|
2012-02-23 12:13:00 +01:00
|
|
|
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
2012-03-28 16:14:02 +02:00
|
|
|
$ajaxContext->addActionContext('get-now-playing-screen-settings', 'json')
|
2021-10-11 16:10:47 +02:00
|
|
|
->addActionContext('set-now-playing-screen-settings', 'json')
|
|
|
|
->addActionContext('get-library-datatable', 'json')
|
|
|
|
->addActionContext('set-library-datatable', 'json')
|
|
|
|
->addActionContext('get-timeline-datatable', 'json')
|
|
|
|
->addActionContext('set-timeline-datatable', 'json')
|
|
|
|
->addActionContext('remindme', 'json')
|
|
|
|
->addActionContext('remindme-never', 'json')
|
|
|
|
->addActionContext('donotshowregistrationpopup', 'json')
|
|
|
|
->addActionContext('set-library-screen-settings', 'json')
|
2022-01-23 19:15:55 +01:00
|
|
|
->initContext();
|
2012-02-23 12:13:00 +01:00
|
|
|
}
|
2012-07-11 00:53:06 +02:00
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function setNowPlayingScreenSettingsAction()
|
|
|
|
{
|
|
|
|
$request = $this->getRequest();
|
2021-10-11 16:10:47 +02:00
|
|
|
$settings = $request->getParam('settings');
|
2012-07-11 00:53:06 +02:00
|
|
|
|
2012-09-17 17:03:36 +02:00
|
|
|
Application_Model_Preference::setNowPlayingScreenSettings($settings);
|
2012-03-28 16:14:02 +02:00
|
|
|
}
|
2012-07-11 00:53:06 +02:00
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function getNowPlayingScreenSettingsAction()
|
|
|
|
{
|
2012-09-14 18:09:40 +02:00
|
|
|
$data = Application_Model_Preference::getNowPlayingScreenSettings();
|
|
|
|
if (!is_null($data)) {
|
|
|
|
$this->view->settings = $data;
|
2012-07-16 03:17:13 +02:00
|
|
|
}
|
2012-03-28 16:14:02 +02:00
|
|
|
}
|
2012-02-23 12:13:00 +01:00
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function setLibraryDatatableAction()
|
|
|
|
{
|
2012-02-23 12:13:00 +01:00
|
|
|
$request = $this->getRequest();
|
2021-10-11 16:10:47 +02:00
|
|
|
$settings = $request->getParam('settings');
|
2012-02-23 12:13:00 +01:00
|
|
|
|
2012-09-14 18:09:40 +02:00
|
|
|
Application_Model_Preference::setCurrentLibraryTableSetting($settings);
|
2012-02-23 12:13:00 +01:00
|
|
|
}
|
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function getLibraryDatatableAction()
|
|
|
|
{
|
2012-09-14 20:53:25 +02:00
|
|
|
$data = Application_Model_Preference::getCurrentLibraryTableSetting();
|
|
|
|
if (!is_null($data)) {
|
2017-03-24 16:21:39 +01:00
|
|
|
$this->_helper->json($data);
|
|
|
|
} else {
|
|
|
|
$this->_helper->json(false);
|
2012-02-23 12:13:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function setTimelineDatatableAction()
|
|
|
|
{
|
2012-02-23 12:13:00 +01:00
|
|
|
$request = $this->getRequest();
|
2021-10-11 16:10:47 +02:00
|
|
|
$settings = $request->getParam('settings');
|
2013-02-19 16:58:48 +01:00
|
|
|
|
2012-09-14 18:09:40 +02:00
|
|
|
Application_Model_Preference::setTimelineDatatableSetting($settings);
|
2012-02-23 12:13:00 +01:00
|
|
|
}
|
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function getTimelineDatatableAction()
|
|
|
|
{
|
2012-09-14 18:09:40 +02:00
|
|
|
$data = Application_Model_Preference::getTimelineDatatableSetting();
|
|
|
|
if (!is_null($data)) {
|
|
|
|
$this->view->settings = $data;
|
2012-02-23 12:13:00 +01:00
|
|
|
}
|
|
|
|
}
|
2012-07-11 00:53:06 +02:00
|
|
|
|
2012-07-16 03:17:13 +02:00
|
|
|
public function remindmeAction()
|
|
|
|
{
|
|
|
|
// unset session
|
2015-09-25 18:03:10 +02:00
|
|
|
SessionHelper::reopenSessionForWriting();
|
2012-07-16 03:17:13 +02:00
|
|
|
Zend_Session::namespaceUnset('referrer');
|
|
|
|
Application_Model_Preference::SetRemindMeDate();
|
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
|
2012-08-28 23:30:34 +02:00
|
|
|
public function remindmeNeverAction()
|
|
|
|
{
|
2015-09-25 18:03:10 +02:00
|
|
|
SessionHelper::reopenSessionForWriting();
|
2012-08-28 23:30:34 +02:00
|
|
|
Zend_Session::namespaceUnset('referrer');
|
2022-03-14 11:15:04 +01:00
|
|
|
// pass in true to indicate 'Remind me never' was clicked
|
2012-08-28 23:30:34 +02:00
|
|
|
Application_Model_Preference::SetRemindMeDate(true);
|
|
|
|
}
|
2012-07-16 03:17:13 +02:00
|
|
|
|
|
|
|
public function donotshowregistrationpopupAction()
|
|
|
|
{
|
|
|
|
// unset session
|
2015-09-25 18:03:10 +02:00
|
|
|
SessionHelper::reopenSessionForWriting();
|
2012-07-16 03:17:13 +02:00
|
|
|
Zend_Session::namespaceUnset('referrer');
|
2012-03-29 15:34:58 +02:00
|
|
|
}
|
2013-02-19 16:58:48 +01:00
|
|
|
|
|
|
|
public function setLibraryScreenSettingsAction()
|
|
|
|
{
|
|
|
|
$request = $this->getRequest();
|
2021-10-11 16:10:47 +02:00
|
|
|
$settings = $request->getParam('settings');
|
2013-02-19 16:58:48 +01:00
|
|
|
Application_Model_Preference::setLibraryScreenSettings($settings);
|
|
|
|
}
|
2012-07-16 03:17:13 +02:00
|
|
|
}
|