diff options
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/ActionController.php | 6 | ||||
| -rw-r--r-- | lib/Minz/ActionException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/Configuration.php | 4 | ||||
| -rw-r--r-- | lib/Minz/ControllerNotActionControllerException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/ControllerNotExistException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/CurrentPagePaginationException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/Dispatcher.php | 2 | ||||
| -rw-r--r-- | lib/Minz/FileNotExistException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/FrontController.php | 4 | ||||
| -rw-r--r-- | lib/Minz/Helper.php | 4 | ||||
| -rw-r--r-- | lib/Minz/Model.php | 2 | ||||
| -rw-r--r-- | lib/Minz/ModelArray.php | 3 | ||||
| -rw-r--r-- | lib/Minz/ModelPdo.php | 2 | ||||
| -rw-r--r-- | lib/Minz/PDOConnectionException.php | 2 | ||||
| -rw-r--r-- | lib/Minz/Paginator.php | 8 | ||||
| -rw-r--r-- | lib/Minz/Translate.php | 4 | ||||
| -rw-r--r-- | lib/Minz/View.php | 2 |
17 files changed, 24 insertions, 29 deletions
diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php index b47c54554..232a4ef9b 100644 --- a/lib/Minz/ActionController.php +++ b/lib/Minz/ActionController.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ @@ -24,7 +24,7 @@ class Minz_ActionController { public function view () { return $this->view; } - + /** * Méthodes à redéfinir (ou non) par héritage * firstAction est la première méthode exécutée par le Dispatcher @@ -34,5 +34,3 @@ class Minz_ActionController { public function firstAction () { } public function lastAction () { } } - - diff --git a/lib/Minz/ActionException.php b/lib/Minz/ActionException.php index c566a076f..f1f70c1bc 100644 --- a/lib/Minz/ActionException.php +++ b/lib/Minz/ActionException.php @@ -3,7 +3,7 @@ class Minz_ActionException extends Minz_Exception { public function __construct ($controller_name, $action_name, $code = self::ERROR) { $message = '`' . $action_name . '` cannot be invoked on `' . $controller_name . '`'; - + parent::__construct ($message, $code); } } diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index d695d4a53..5470dc85f 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -104,7 +104,7 @@ class Minz_Configuration { /** * Create a new Minz_Configuration object. - * + * * @param $namespace the name of the current configuration. * @param $config_filename the file containing configuration values. * @param $default_filename the file containing default values, null by default. @@ -145,7 +145,7 @@ class Minz_Configuration { /** * Return the value of the given param. - * + * * @param $key the name of the param. * @param $default default value to return if key does not exist. * @return the value corresponding to the key. diff --git a/lib/Minz/ControllerNotActionControllerException.php b/lib/Minz/ControllerNotActionControllerException.php index 535a1377e..1a8e0729c 100644 --- a/lib/Minz/ControllerNotActionControllerException.php +++ b/lib/Minz/ControllerNotActionControllerException.php @@ -3,7 +3,7 @@ class Minz_ControllerNotActionControllerException extends Minz_Exception { public function __construct ($controller_name, $code = self::ERROR) { $message = 'Controller `' . $controller_name . '` isn\'t instance of ActionController'; - + parent::__construct ($message, $code); } } diff --git a/lib/Minz/ControllerNotExistException.php b/lib/Minz/ControllerNotExistException.php index 523867d11..24a09a635 100644 --- a/lib/Minz/ControllerNotExistException.php +++ b/lib/Minz/ControllerNotExistException.php @@ -3,7 +3,7 @@ class Minz_ControllerNotExistException extends Minz_Exception { public function __construct ($controller_name, $code = self::ERROR) { $message = 'Controller `' . $controller_name . '` doesn\'t exist'; - + parent::__construct ($message, $code); } } diff --git a/lib/Minz/CurrentPagePaginationException.php b/lib/Minz/CurrentPagePaginationException.php index 74214d879..3e3d9d1b4 100644 --- a/lib/Minz/CurrentPagePaginationException.php +++ b/lib/Minz/CurrentPagePaginationException.php @@ -2,7 +2,7 @@ class Minz_CurrentPagePaginationException extends Minz_Exception { public function __construct ($page) { $message = 'Page number `' . $page . '` doesn\'t exist'; - + parent::__construct ($message, self::ERROR); } } diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php index 125ce5757..bdb1c76f6 100644 --- a/lib/Minz/Dispatcher.php +++ b/lib/Minz/Dispatcher.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ diff --git a/lib/Minz/FileNotExistException.php b/lib/Minz/FileNotExistException.php index f8dfbdf66..f97f161af 100644 --- a/lib/Minz/FileNotExistException.php +++ b/lib/Minz/FileNotExistException.php @@ -2,7 +2,7 @@ class Minz_FileNotExistException extends Minz_Exception { public function __construct ($file_name, $code = self::ERROR) { $message = 'File not found: `' . $file_name.'`'; - + parent::__construct ($message, $code); } } diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php index 952d983c9..066278b7c 100644 --- a/lib/Minz/FrontController.php +++ b/lib/Minz/FrontController.php @@ -119,12 +119,12 @@ class Minz_FrontController { switch($conf->environment) { case 'production': error_reporting(E_ALL); - ini_set('display_errors','Off'); + ini_set('display_errors', 'Off'); ini_set('log_errors', 'On'); break; case 'development': error_reporting(E_ALL); - ini_set('display_errors','On'); + ini_set('display_errors', 'On'); ini_set('log_errors', 'On'); break; case 'silent': diff --git a/lib/Minz/Helper.php b/lib/Minz/Helper.php index f4a547c4e..c328d9e6b 100644 --- a/lib/Minz/Helper.php +++ b/lib/Minz/Helper.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ @@ -13,7 +13,7 @@ class Minz_Helper { * @param $var variable à traiter (tableau ou simple variable) */ public static function stripslashes_r($var) { - if (is_array($var)){ + if (is_array($var)) { return array_map(array('Minz_Helper', 'stripslashes_r'), $var); } else { return stripslashes($var); diff --git a/lib/Minz/Model.php b/lib/Minz/Model.php index adbaba942..1310888cf 100644 --- a/lib/Minz/Model.php +++ b/lib/Minz/Model.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php index ff23dbc83..1ac2b313d 100644 --- a/lib/Minz/ModelArray.php +++ b/lib/Minz/ModelArray.php @@ -25,8 +25,7 @@ class Minz_ModelArray { protected function loadArray() { if (!file_exists($this->filename)) { throw new Minz_FileNotExistException($this->filename, Minz_Exception::WARNING); - } - elseif (($handle = $this->getLock()) === false) { + } elseif (($handle = $this->getLock()) === false) { throw new Minz_PermissionDeniedException($this->filename); } else { $data = include($this->filename); diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index caab1d114..d769e0ff4 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -39,7 +39,7 @@ class Minz_ModelPdo { if ($currentUser === null) { $currentUser = Minz_Session::param('currentUser'); } - if (self::$useSharedBd && self::$sharedBd != null && + if (self::$useSharedBd && self::$sharedBd != null && ($currentUser == null || $currentUser === self::$sharedCurrentUser)) { $this->bd = self::$sharedBd; $this->prefix = self::$sharedPrefix; diff --git a/lib/Minz/PDOConnectionException.php b/lib/Minz/PDOConnectionException.php index faf2e0fe9..064748708 100644 --- a/lib/Minz/PDOConnectionException.php +++ b/lib/Minz/PDOConnectionException.php @@ -3,7 +3,7 @@ class Minz_PDOConnectionException extends Minz_Exception { public function __construct ($string_connection, $user, $code = self::ERROR) { $message = 'Access to database is denied for `' . $user . '`' . ' (`' . $string_connection . '`)'; - + parent::__construct ($message, $code); } } diff --git a/lib/Minz/Paginator.php b/lib/Minz/Paginator.php index 5858e76a5..795085a30 100644 --- a/lib/Minz/Paginator.php +++ b/lib/Minz/Paginator.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ @@ -51,7 +51,7 @@ class Minz_Paginator { */ public function render ($view, $getteur) { $view = APP_PATH . '/views/helpers/'.$view; - + if (file_exists ($view)) { include ($view); } @@ -129,7 +129,7 @@ class Minz_Paginator { $begin = ($this->currentPage - 1) * $this->nbItemsPerPage; $counter = 0; $i = 0; - + foreach ($this->items as $key => $item) { if ($i >= $begin) { $array[$key] = $item; @@ -164,7 +164,7 @@ class Minz_Paginator { if (is_array ($items)) { $this->items = $items; } - + $this->_nbPage (); } public function _nbItemsPerPage ($nbItemsPerPage) { diff --git a/lib/Minz/Translate.php b/lib/Minz/Translate.php index baddcb424..d9cd59f7e 100644 --- a/lib/Minz/Translate.php +++ b/lib/Minz/Translate.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ @@ -153,7 +153,7 @@ class Minz_Translate { * @param additional parameters for variable keys. * @return the value corresponding to the key. * If no value is found, return the key itself. - */ + */ public static function t($key) { $group = explode('.', $key); diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 8c5230ab6..d6bf6ea2c 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -262,5 +262,3 @@ class Minz_View { } } } - - |
