diff options
| author | 2014-10-09 15:53:10 +0200 | |
|---|---|---|
| committer | 2014-10-09 15:53:10 +0200 | |
| commit | f97d4b3b6cca4a55636bbd50158f3c57666b0f08 (patch) | |
| tree | 3ca9dd42155228292f0842d65b9b6d90e9140639 /app/controllers/entryController.php | |
| parent | e51ceb6812e3736aa9b9ce1f2d5181f5b4b6aaa3 (diff) | |
| parent | 444b1552364b39761c3278c7da5152fd3998f216 (diff) | |
Merge branch 'master' into hotfixes
Diffstat (limited to 'app/controllers/entryController.php')
| -rwxr-xr-x | app/controllers/entryController.php | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/app/controllers/entryController.php b/app/controllers/entryController.php deleted file mode 100755 index 4c9eb9d1b..000000000 --- a/app/controllers/entryController.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -class entryController extends ActionController { - public function firstAction () { - if (login_is_conf ($this->view->conf) && !is_logged ()) { - Error::error ( - 403, - array ('error' => array (Translate::t ('access_denied'))) - ); - } - - $this->params = array (); - $this->redirect = false; - $ajax = Request::param ('ajax'); - if ($ajax) { - $this->view->_useLayout (false); - } - } - public function lastAction () { - $ajax = Request::param ('ajax'); - if (!$ajax && $this->redirect) { - Request::forward (array ( - 'c' => 'index', - 'a' => 'index', - 'params' => $this->params - ), true); - } else { - Request::_param ('ajax'); - } - } - - public function readAction () { - $this->redirect = true; - - $id = Request::param ('id'); - $is_read = Request::param ('is_read'); - $get = Request::param ('get'); - $nextGet = Request::param ('nextGet', $get); - $dateMax = Request::param ('dateMax', 0); - - $is_read = !!$is_read; - - $entryDAO = new EntryDAO (); - if ($id == false) { - if (!$get) { - $entryDAO->markReadEntries ($is_read, $dateMax); - } else { - $typeGet = $get[0]; - $get = substr ($get, 2); - - if ($typeGet == 'c') { - $entryDAO->markReadCat ($get, $is_read, $dateMax); - $this->params = array ('get' => $nextGet); - } elseif ($typeGet == 'f') { - $entryDAO->markReadFeed ($get, $is_read, $dateMax); - $this->params = array ('get' => $nextGet); - } - } - - // notif - $notif = array ( - 'type' => 'good', - 'content' => Translate::t ('feeds_marked_read') - ); - Session::_param ('notification', $notif); - } else { - $entryDAO->updateEntry ($id, array ('is_read' => $is_read)); - } - } - - public function bookmarkAction () { - $this->redirect = true; - - $id = Request::param ('id'); - $is_fav = Request::param ('is_favorite'); - - if ($is_fav) { - $is_fav = true; - } else { - $is_fav = false; - } - - $entryDAO = new EntryDAO (); - if ($id != false) { - $entry = $entryDAO->searchById ($id); - - if ($entry != false) { - $values = array ( - 'is_favorite' => $is_fav, - ); - - $entryDAO->updateEntry ($entry->id (), $values); - } - } - } - - public function optimizeAction() { - // La table des entrées a tendance à grossir énormément - // Cette action permet d'optimiser cette table permettant de grapiller un peu de place - // Cette fonctionnalité n'est à appeler qu'occasionnellement - $entryDAO = new EntryDAO(); - $entryDAO->optimizeTable(); - - $notif = array ( - 'type' => 'good', - 'content' => Translate::t ('optimization_complete') - ); - Session::_param ('notification', $notif); - - Request::forward(array( - 'c' => 'configure', - 'a' => 'display' - ), true); - } -} |
