Subversion Repositories Applications.framework

Rev

Rev 402 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 402 Rev 448
Line 10... Line 10...
10
 * @package	Framework
10
 * @package	Framework
11
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
11
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
12
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
12
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
13
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
13
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
14
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
14
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
15
 * @version	$Id: Config.php 402 2011-12-29 10:44:54Z jpm $
15
 * @version	$Id: Config.php 448 2013-12-19 13:37:39Z jpm $
16
 * @link		/doc/framework/
16
 * @link		/doc/framework/
17
 */
17
 */
Line 18... Line 18...
18
 
18
 
Line 92... Line 92...
92
		$retour = false;
92
		$retour = false;
93
		if (file_exists($fichier_ini)) {
93
		if (file_exists($fichier_ini)) {
94
			$ini = parse_ini_file($fichier_ini, true);
94
			$ini = parse_ini_file($fichier_ini, true);
95
			$ini = self::analyserTableauIni($ini);
95
			$ini = self::analyserTableauIni($ini);
96
			$retour = true;
96
			$retour = true;
-
 
97
		} else {
-
 
98
			error_log("Fichier de configuration introuvable : $fichier_ini");
97
		}
99
		}
98
		return $retour;
100
		return $retour;
99
	}
101
	}
Line 100... Line 102...
100
 
102
 
Line 120... Line 122...
120
				return $config[$param];
122
				return $config[$param];
121
			} else if (strpos($param, '.') !== false) {
123
			} else if (strpos($param, '.') !== false) {
122
				$pieces = explode('.', $param, 2);
124
				$pieces = explode('.', $param, 2);
123
				if (strlen($pieces[0]) && strlen($pieces[1])) {
125
				if (strlen($pieces[0]) && strlen($pieces[1])) {
124
					if (isset($config[$pieces[0]])) {
126
					if (isset($config[$pieces[0]])) {
125
					   if (is_array($config[$pieces[0]])) {
127
						if (is_array($config[$pieces[0]])) {
126
					   		return self::getValeur($pieces[1], $config[$pieces[0]]);
128
							return self::getValeur($pieces[1], $config[$pieces[0]]);
127
					   }
129
						}
128
					}
130
					}
129
				}
131
				}
130
			} else {
132
			} else {
131
				return null;
133
				return null;
132
			}
134
			}