Cleaned up some PHP notices and updated all the INI files to contain every entry (even if false) to clean up other notices.
git-svn-id: http://svn.cleancode.org/svn/pickles@7 4d10bc64-7434-11dc-a737-d2d0f8310089
This commit is contained in:
parent
045ac57182
commit
e40b31e7e4
8 changed files with 18 additions and 8 deletions
|
@ -10,7 +10,7 @@ class Config {
|
|||
// @todo no hardcoded paths!
|
||||
$file = "/var/www/josh/common/config/{$site}.ini";
|
||||
if (file_exists($file)) {
|
||||
self::$data =& parse_ini_file($file, true);
|
||||
self::$data = parse_ini_file($file, true);
|
||||
}
|
||||
else {
|
||||
Error::addError('Unable to load the configuration file');
|
||||
|
|
|
@ -11,10 +11,10 @@ class DB {
|
|||
private static $results;
|
||||
|
||||
public static function open() {
|
||||
self::$hostname =& Config::get('hostname', 'database');
|
||||
self::$username =& Config::get('username', 'database');
|
||||
self::$password =& Config::get('password', 'database');
|
||||
self::$database =& Config::get('database', 'database');
|
||||
self::$hostname = Config::get('hostname', 'database');
|
||||
self::$username = Config::get('username', 'database');
|
||||
self::$password = Config::get('password', 'database');
|
||||
self::$database = Config::get('database', 'database');
|
||||
|
||||
if (isset(self::$hostname) && isset(self::$username) && isset(self::$password) && isset(self::$database)) {
|
||||
self::$connection = @mysql_connect(self::$hostname, self::$username, self::$password);
|
||||
|
@ -178,6 +178,7 @@ class DB {
|
|||
public static function delete($table, $columnValues, $conditions) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
disable = false
|
||||
debug = false
|
||||
session = false
|
||||
smarty = true
|
||||
fckeditor = false
|
||||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
disable = false
|
||||
debug = false
|
||||
session = false
|
||||
smarty = false
|
||||
fckeditor = false
|
||||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
disable = false
|
||||
debug = false
|
||||
session = false
|
||||
smarty = true
|
||||
fckeditor = false
|
||||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
|
|
|
@ -2,6 +2,7 @@ disable = false
|
|||
debug = false
|
||||
session = true
|
||||
smarty = true
|
||||
fckeditor = false
|
||||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
|
|
|
@ -6,7 +6,7 @@ fckeditor = true
|
|||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
username = "josh"
|
||||
password = "my5QL r0ck5"
|
||||
username = "paganstars"
|
||||
password = "p4g4ns74r5"
|
||||
database = "paganstars"
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
disable = false
|
||||
debug = false
|
||||
session = false
|
||||
smarty = true
|
||||
fckeditor = false
|
||||
|
||||
[database]
|
||||
hostname = "localhost"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue