diff options
| -rwxr-xr-x | app/controllers/configureController.php | 2 | ||||
| -rwxr-xr-x | app/controllers/feedController.php | 10 | ||||
| -rwxr-xr-x | app/controllers/indexController.php | 2 | ||||
| -rwxr-xr-x | app/models/Category.php | 6 | ||||
| -rwxr-xr-x | app/models/Entry.php | 14 | ||||
| -rw-r--r-- | app/models/Feed.php | 14 | ||||
| -rw-r--r-- | lib/minz/Cache.php | 2 | ||||
| -rw-r--r-- | lib/minz/Dispatcher.php | 6 | ||||
| -rwxr-xr-x | lib/minz/FrontController.php | 6 | ||||
| -rwxr-xr-x | lib/minz/Log.php | 14 | ||||
| -rwxr-xr-x | lib/minz/View.php | 12 |
11 files changed, 44 insertions, 44 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php index b91582520..abd546504 100755 --- a/app/controllers/configureController.php +++ b/app/controllers/configureController.php @@ -244,7 +244,7 @@ class configureController extends ActionController { Request::_param ('feeds', $feeds); Request::forward (array ('c' => 'feed', 'a' => 'massiveImport')); } catch (OpmlException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $notif = array ( 'type' => 'bad', diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index 4631e1e7e..21ea2aadd 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -86,14 +86,14 @@ class feedController extends ActionController { $params['id'] = $feed->id (); } } catch (BadUrlException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $notif = array ( 'type' => 'bad', 'content' => Translate::t ('invalid_url', $url) ); Session::_param ('notification', $notif); } catch (FeedException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $notif = array ( 'type' => 'bad', 'content' => Translate::t ('internal_problem_feed') @@ -101,7 +101,7 @@ class feedController extends ActionController { Session::_param ('notification', $notif); } catch (FileNotExistException $e) { // Répertoire de cache n'existe pas - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $notif = array ( 'type' => 'bad', 'content' => Translate::t ('internal_problem_feed') @@ -160,7 +160,7 @@ class feedController extends ActionController { $feedDAO->updateLastUpdate ($feed->id ()); $flux_update++; } catch (FeedException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $feedDAO->isInError ($feed->id ()); } @@ -264,7 +264,7 @@ class feedController extends ActionController { } } catch (FeedException $e) { $error = true; - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); } } diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 594d379fb..d23db01a3 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -59,7 +59,7 @@ class indexController extends ActionController { $this->view->entryPaginator = $entries; } catch(EntriesGetterException $e) { - Log::record ($e->getMessage (), Log::NOTICE); + Minz_Log::record ($e->getMessage (), Minz_Log::NOTICE); Error::error ( 404, array ('error' => array (Translate::t ('page_not_found'))) diff --git a/app/models/Category.php b/app/models/Category.php index 0c991588d..197c4df26 100755 --- a/app/models/Category.php +++ b/app/models/Category.php @@ -78,7 +78,7 @@ class CategoryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -97,7 +97,7 @@ class CategoryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -112,7 +112,7 @@ class CategoryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } diff --git a/app/models/Entry.php b/app/models/Entry.php index ac1004fb6..1382a0d16 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -245,7 +245,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::NOTICE); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::NOTICE); return false; } } @@ -273,7 +273,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -288,7 +288,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -302,7 +302,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -316,7 +316,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -343,7 +343,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -361,7 +361,7 @@ class EntryDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } diff --git a/app/models/Feed.php b/app/models/Feed.php index 4c6a3d229..9d1047bd4 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -258,7 +258,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -286,7 +286,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -304,7 +304,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -321,7 +321,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -345,7 +345,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -360,7 +360,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } @@ -374,7 +374,7 @@ class FeedDAO extends Model_pdo { return true; } else { $info = $stm->errorInfo(); - Log::record ('SQL error : ' . $info[2], Log::ERROR); + Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::ERROR); return false; } } diff --git a/lib/minz/Cache.php b/lib/minz/Cache.php index 69143a70c..6848e3350 100644 --- a/lib/minz/Cache.php +++ b/lib/minz/Cache.php @@ -7,7 +7,7 @@ /** * La classe Cache permet de gérer facilement les pages en cache */ -class Cache { +class Minz_Cache { /** * $expire timestamp auquel expire le cache de $url */ diff --git a/lib/minz/Dispatcher.php b/lib/minz/Dispatcher.php index 9d08c142b..0cfdd8e75 100644 --- a/lib/minz/Dispatcher.php +++ b/lib/minz/Dispatcher.php @@ -41,14 +41,14 @@ class Dispatcher { * @exception MinzException */ public function run () { - $cache = new Cache(); + $cache = new Minz_Cache(); // Le ob_start est dupliqué : sans ça il y a un bug sous Firefox // ici on l'appelle avec 'ob_gzhandler', après sans. // Vraisemblablement la compression fonctionne mais c'est sale // J'ignore les effets de bord :( ob_start ('ob_gzhandler'); - if (Cache::isEnabled () && !$cache->expired ()) { + if (Minz_Cache::isEnabled () && !$cache->expired ()) { ob_start (); $cache->render (); $text = ob_get_clean(); @@ -80,7 +80,7 @@ class Dispatcher { } } - if (Cache::isEnabled ()) { + if (Minz_Cache::isEnabled ()) { $cache->cache ($text); } } diff --git a/lib/minz/FrontController.php b/lib/minz/FrontController.php index ab951263d..489e3fa33 100755 --- a/lib/minz/FrontController.php +++ b/lib/minz/FrontController.php @@ -45,13 +45,13 @@ class FrontController { $this->router = new Router (); $this->router->init (); } catch (RouteNotFoundException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); Error::error ( 404, array ('error' => array ($e->getMessage ())) ); } catch (MinzException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $this->killApp (); } @@ -94,7 +94,7 @@ class FrontController { $this->dispatcher->run (); Response::send (); } catch (MinzException $e) { - Log::record ($e->getMessage (), Log::ERROR); + Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); if ($e instanceof FileNotExistException || $e instanceof ControllerNotExistException || diff --git a/lib/minz/Log.php b/lib/minz/Log.php index 30e4eb6a4..c6f23d900 100755 --- a/lib/minz/Log.php +++ b/lib/minz/Log.php @@ -7,7 +7,7 @@ /** * La classe Log permet de logger des erreurs */ -class Log { +class Minz_Log { /** * Les différents niveau de log * ERROR erreurs bloquantes de l'application @@ -33,19 +33,19 @@ class Log { if (! ($env == Configuration::SILENT || ($env == Configuration::PRODUCTION - && ($level == Log::WARNING || $level == Log::NOTICE)))) { + && ($level == Minz_Log::WARNING || $level == Minz_Log::NOTICE)))) { if (is_null ($file_name)) { $file_name = LOG_PATH . '/application.log'; } switch ($level) { - case Log::ERROR : + case Minz_Log::ERROR : $level_label = 'error'; break; - case Log::WARNING : + case Minz_Log::WARNING : $level_label = 'warning'; break; - case Log::NOTICE : + case Minz_Log::NOTICE : $level_label = 'notice'; break; default : @@ -86,7 +86,7 @@ class Log { $msg_get = str_replace("\n", '', '$_GET content : ' . print_r($_GET, true)); $msg_post = str_replace("\n", '', '$_POST content : ' . print_r($_POST, true)); - self::record($msg_get, Log::NOTICE, $file_name); - self::record($msg_post, Log::NOTICE, $file_name); + self::record($msg_get, Minz_Log::NOTICE, $file_name); + self::record($msg_post, Minz_Log::NOTICE, $file_name); } } diff --git a/lib/minz/View.php b/lib/minz/View.php index 2bb747aa9..1bfa0a61f 100755 --- a/lib/minz/View.php +++ b/lib/minz/View.php @@ -69,9 +69,9 @@ class View { if (file_exists ($this->view_filename)) { include ($this->view_filename); } else { - Log::record ('File doesn\'t exist : `' + Minz_Log::record ('File doesn\'t exist : `' . $this->view_filename . '`', - Log::NOTICE); + Minz_Log::NOTICE); } } @@ -87,9 +87,9 @@ class View { if (file_exists ($fic_partial)) { include ($fic_partial); } else { - Log::record ('File doesn\'t exist : `' + Minz_Log::record ('File doesn\'t exist : `' . $fic_partial . '`', - Log::WARNING); + Minz_Log::WARNING); } } @@ -105,9 +105,9 @@ class View { if (file_exists ($fic_helper)) { include ($fic_helper); } else { - Log::record ('File doesn\'t exist : `' + Minz_Log::record ('File doesn\'t exist : `' . $fic_helper . '`', - Log::WARNING); + Minz_Log::WARNING); } } |
