diff options
| author | 2014-06-15 11:48:08 -0400 | |
|---|---|---|
| committer | 2014-06-15 11:48:08 -0400 | |
| commit | 177b398784da22854d39a1790514353f41a97450 (patch) | |
| tree | f6f7420ed021ff7de587a6a54c2865b098afeb64 /app/Controllers/statsController.php | |
| parent | 1affa91312e9edc23e11f9454190dd5c35c9adf8 (diff) | |
Fix syntax
Diffstat (limited to 'app/Controllers/statsController.php')
| -rw-r--r-- | app/Controllers/statsController.php | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index 655d453c6..cbc67cac3 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -3,13 +3,7 @@ class FreshRSS_stats_Controller extends Minz_ActionController { public function mainAction() { - if (!$this->view->loginOk) { - Minz_Error::error( - 403, array('error' => array(Minz_Translate::t('access_denied'))) - ); - } - - Minz_View::prependTitle(Minz_Translate::t('stats') . ' · '); + $this->initAction(); $statsDAO = new FreshRSS_StatsDAO (); Minz_View::appendScript (Minz_Url::display ('/scripts/flotr2.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/flotr2.min.js'))); @@ -21,13 +15,7 @@ class FreshRSS_stats_Controller extends Minz_ActionController { } public function idleAction() { - if (!$this->view->loginOk) { - Minz_Error::error( - 403, array('error' => array(Minz_Translate::t('access_denied'))) - ); - } - - Minz_View::prependTitle(Minz_Translate::t('stats') . ' · '); + $this->initAction(); $statsDAO = new FreshRSS_StatsDAO (); $feeds = $statsDAO->calculateFeedLastDate(); @@ -69,5 +57,15 @@ class FreshRSS_stats_Controller extends Minz_ActionController { $this->view->idleFeeds = array_reverse($idleFeeds); } + + private function initAction() { + if (!$this->view->loginOk) { + Minz_Error::error( + 403, array('error' => array(Minz_Translate::t('access_denied'))) + ); + } + + Minz_View::prependTitle(Minz_Translate::t('stats') . ' · '); + } } |
