From 01a1dd09a8ee02250905a80d2662bfe811c09f09 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 28 Dec 2013 17:29:38 +0100 Subject: Minz : refactorisation ModelArray et Log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Utilisation de fonctions natives de PHP comme file_put_contents et var_export Évite de garder un descripteur de fichier ouvert tout le temps Et ModelTxt n'est plus utilisé --- app/Controllers/indexController.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 0c229aedb..4677787c1 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -225,14 +225,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { file_put_contents(LOG_PATH . '/application.log', ''); } - $logs = array(); - try { - $logDAO = new FreshRSS_LogDAO (); - $logs = $logDAO->lister (); - $logs = array_reverse ($logs); - } catch (Minz_FileNotExistException $e) { - - } + $logs = FreshRSS_LogDAO::lines(); //TODO: ask only the necessary lines //gestion pagination $page = Minz_Request::param ('page', 1); -- cgit v1.2.3