Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 68 → Rev 66

/trunk/Db/Database.php
152,9 → 152,9
* were set. That is, definitions in the class file
* override those in the configuration file.
*
* @return array|boolean
* The configuration array if the configuration
* file could be read, <code>false</code> otherwise.
* @return boolean|array
* <code>true</code> if the configuration
* file could be read, the configuration array otherwise.
*/
public function readConfig ()
{
165,11 → 165,7
if (isset($config[$section]))
{
$dbconfig = $config[$section];
$options = array(
'host', 'port', 'dbname', 'username', 'password', 'charset'
);
 
foreach ($options as $key)
foreach (array('host', 'dbname', 'username', 'password', 'charset') as $key)
{
$property = "_$key";
if (isset($dbconfig[$key])
180,8 → 176,6
$this->$property = $dbconfig[$key];
}
}
 
return $config[$section];
}
}