diff options
author | Brice Maron <brice@bmaron.net> | 2012-09-05 16:16:36 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-09-05 16:16:36 +0000 |
commit | 5fc4c78106775ac717ffa64aaab7ae8b10cea3d0 (patch) | |
tree | fd7ca63e8392edfee7cc07f37c7d7b4ef7b499e2 /lib/config.php | |
parent | a928b4cd6671aeeb4ad4488e814c1c4a6475b145 (diff) | |
parent | e2ead7db86f5d2a784b15f0ce2835e8e45fd21fa (diff) | |
download | nextcloud-server-5fc4c78106775ac717ffa64aaab7ae8b10cea3d0.tar.gz nextcloud-server-5fc4c78106775ac717ffa64aaab7ae8b10cea3d0.zip |
Merge branch 'master' of git://github.com/owncloud/core
Diffstat (limited to 'lib/config.php')
-rw-r--r-- | lib/config.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/config.php b/lib/config.php index 266d559126c..390469beacf 100644 --- a/lib/config.php +++ b/lib/config.php @@ -70,7 +70,7 @@ class OC_Config{ public static function getValue( $key, $default = null ){ self::readData(); - if( array_key_exists( $key, self::$cache )){ + if( array_key_exists( $key, self::$cache )) { return self::$cache[$key]; } @@ -108,7 +108,7 @@ class OC_Config{ public static function deleteKey( $key ){ self::readData(); - if( array_key_exists( $key, self::$cache )){ + if( array_key_exists( $key, self::$cache )) { // Delete key from cache unset( self::$cache[$key] ); @@ -126,17 +126,17 @@ class OC_Config{ * Reads the config file and saves it to the cache */ private static function readData(){ - if( self::$init ){ + if( self::$init ) { return true; } - if( !file_exists( OC::$SERVERROOT."/config/config.php" )){ + if( !file_exists( OC::$SERVERROOT."/config/config.php" )) { return false; } // Include the file, save the data from $CONFIG - include( OC::$SERVERROOT."/config/config.php" ); - if( isset( $CONFIG ) && is_array( $CONFIG )){ + include OC::$SERVERROOT."/config/config.php"; + if( isset( $CONFIG ) && is_array( $CONFIG )) { self::$cache = $CONFIG; } @@ -164,7 +164,9 @@ class OC_Config{ $result=@file_put_contents( $filename, $content ); if(!$result) { $tmpl = new OC_Template( '', 'error', 'guest' ); - $tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud"))); + $tmpl->assign('errors', array(1=>array( + 'error'=>"Can't write into config directory 'config'", + 'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud"))); $tmpl->printPage(); exit; } |