Browse Source

Ajout authentification + titre pour page stats

Marien Fressinaud 12 years ago
parent
commit
ec48755fc1
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/Controllers/indexController.php

+ 9 - 0
app/Controllers/indexController.php

@@ -194,6 +194,15 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 	}
 	
 	public function statsAction () {
+		if (!$this->view->loginOk) {
+			Minz_Error::error (
+				403,
+				array ('error' => array (Minz_Translate::t ('access_denied')))
+			);
+		}
+
+		Minz_View::prependTitle (Minz_Translate::t ('stats') . ' · ');
+
 		$statsDAO = new FreshRSS_StatsDAO ();
 		Minz_View::appendScript (Minz_Url::display ('/scripts/flotr2.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/flotr2.min.js')));
 		$this->view->repartition = $statsDAO->calculateEntryRepartition();