diff options
author | Felix Moeller <mail@felixmoeller.de> | 2012-10-23 08:01:09 +0200 |
---|---|---|
committer | Felix Moeller <mail@felixmoeller.de> | 2012-10-23 08:01:09 +0200 |
commit | 2d61f0345297a92d23751d3228b74c6dca94d1e5 (patch) | |
tree | b65ce0d556196098253dec35ce9d46aeaba58491 /lib | |
parent | 6a00a6b9ed49f9a9da044772e7ca7f3506672100 (diff) | |
download | nextcloud-server-2d61f0345297a92d23751d3228b74c6dca94d1e5.tar.gz nextcloud-server-2d61f0345297a92d23751d3228b74c6dca94d1e5.zip |
More Checkstyle cleanup
This is for all LowerCaseConstant warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files.php | 6 | ||||
-rw-r--r-- | lib/helper.php | 10 | ||||
-rw-r--r-- | lib/migrate.php | 4 | ||||
-rw-r--r-- | lib/ocsclient.php | 20 | ||||
-rw-r--r-- | lib/updater.php | 2 | ||||
-rw-r--r-- | lib/user.php | 6 | ||||
-rwxr-xr-x | lib/util.php | 8 |
7 files changed, 28 insertions, 28 deletions
diff --git a/lib/files.php b/lib/files.php index a08bf9c6568..b4d4de1c995 100644 --- a/lib/files.php +++ b/lib/files.php @@ -146,7 +146,7 @@ class OC_Files { set_time_limit(0); $zip = new ZipArchive(); $filename = OC_Helper::tmpFile('.zip'); - if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) { + if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==true) { exit("cannot open <$filename>\n"); } foreach($files as $file) { @@ -167,7 +167,7 @@ class OC_Files { set_time_limit(0); $zip = new ZipArchive(); $filename = OC_Helper::tmpFile('.zip'); - if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==TRUE) { + if ($zip->open($filename, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)!==true) { exit("cannot open <$filename>\n"); } $file=$dir.'/'.$files; @@ -447,7 +447,7 @@ class OC_Files { $setting = 'php_value '.$key.' '.$size; $hasReplaced = 0; $content = preg_replace($pattern, $setting, $htaccess, 1, $hasReplaced); - if($content !== NULL) { + if($content !== null) { $htaccess = $content; } if($hasReplaced == 0) { diff --git a/lib/helper.php b/lib/helper.php index 37a17885eee..b79955aa9bf 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -274,18 +274,18 @@ class OC_Helper { if($file != '.' && $file != '..') { $fullpath = $path.'/'.$file; if(is_link($fullpath)) - return FALSE; + return false; elseif(!is_dir($fullpath) && !@chmod($fullpath, $filemode)) - return FALSE; + return false; elseif(!self::chmodr($fullpath, $filemode)) - return FALSE; + return false; } } closedir($dh); if(@chmod($path, $filemode)) - return TRUE; + return true; else - return FALSE; + return false; } /** diff --git a/lib/migrate.php b/lib/migrate.php index 3694ea877a0..409d77a1a96 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -347,7 +347,7 @@ class OC_Migrate{ OC_Log::write( 'migration', 'Zip not found', OC_Log::ERROR ); return false; } - if ( self::$zip->open( $path ) != TRUE ) { + if ( self::$zip->open( $path ) != true ) { OC_Log::write( 'migration', "Failed to open zip file", OC_Log::ERROR ); return false; } @@ -576,7 +576,7 @@ class OC_Migrate{ OC_Log::write('migration', 'createZip() called but $zip and/or $zippath have not been set', OC_Log::ERROR); return false; } - if ( self::$zip->open( self::$zippath, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE ) !== TRUE ) { + if ( self::$zip->open( self::$zippath, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE ) !== true ) { OC_Log::write('migration', 'Failed to create the zip with error: '.self::$zip->getStatusString(), OC_Log::ERROR); return false; } else { diff --git a/lib/ocsclient.php b/lib/ocsclient.php index 3c80f319662..4d4937377b3 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -76,12 +76,12 @@ class OC_OCSClient{ */ public static function getCategories() { if(OC_Config::getValue('appstoreenabled', true)==false) { - return NULL; + return null; } $url=OC_OCSClient::getAppStoreURL().'/content/categories'; $xml=OC_OCSClient::getOCSresponse($url); if($xml==FALSE) { - return NULL; + return null; } $data=simplexml_load_string($xml); @@ -156,14 +156,14 @@ class OC_OCSClient{ */ public static function getApplication($id) { if(OC_Config::getValue('appstoreenabled', true)==false) { - return NULL; + return null; } $url=OC_OCSClient::getAppStoreURL().'/content/data/'.urlencode($id); $xml=OC_OCSClient::getOCSresponse($url); - if($xml==FALSE) { + if($xml==false) { OC_Log::write('core','Unable to parse OCS content',OC_Log::FATAL); - return NULL; + return null; } $data=simplexml_load_string($xml); @@ -194,14 +194,14 @@ class OC_OCSClient{ */ public static function getApplicationDownload($id,$item) { if(OC_Config::getValue('appstoreenabled', true)==false) { - return NULL; + return null; } $url=OC_OCSClient::getAppStoreURL().'/content/download/'.urlencode($id).'/'.urlencode($item); $xml=OC_OCSClient::getOCSresponse($url); - if($xml==FALSE) { + if($xml==false) { OC_Log::write('core','Unable to parse OCS content',OC_Log::FATAL); - return NULL; + return null; } $data=simplexml_load_string($xml); @@ -237,9 +237,9 @@ class OC_OCSClient{ $kbe=array(); $xml=OC_OCSClient::getOCSresponse($url); - if($xml==FALSE) { + if($xml==false) { OC_Log::write('core','Unable to parse knowledgebase content',OC_Log::FATAL); - return NULL; + return null; } $data=simplexml_load_string($xml); diff --git a/lib/updater.php b/lib/updater.php index cb22da4f906..483570b050a 100644 --- a/lib/updater.php +++ b/lib/updater.php @@ -52,7 +52,7 @@ class OC_Updater{ ) ); $xml=@file_get_contents($url, 0, $ctx); - if($xml==FALSE) { + if($xml==false) { return array(); } $data=@simplexml_load_string($xml); diff --git a/lib/user.php b/lib/user.php index 77bfe0de92a..eff93b501bb 100644 --- a/lib/user.php +++ b/lib/user.php @@ -491,8 +491,8 @@ class OC_User { unset($_COOKIE["oc_username"]); unset($_COOKIE["oc_token"]); unset($_COOKIE["oc_remember_login"]); - setcookie("oc_username", NULL, -1); - setcookie("oc_token", NULL, -1); - setcookie("oc_remember_login", NULL, -1); + setcookie("oc_username", null, -1); + setcookie("oc_token", null, -1); + setcookie("oc_remember_login", null, -1); } } diff --git a/lib/util.php b/lib/util.php index 0a824f86eb3..75991d685c6 100755 --- a/lib/util.php +++ b/lib/util.php @@ -611,14 +611,14 @@ class OC_Util { // Try to use openssl_random_pseudo_bytes if(function_exists('openssl_random_pseudo_bytes')) { $pseudo_byte = bin2hex(openssl_random_pseudo_bytes($length, $strong)); - if($strong == TRUE) { + if($strong == true) { return substr($pseudo_byte, 0, $length); // Truncate it to match the length } } // Try to use /dev/urandom $fp = @file_get_contents('/dev/urandom', false, null, 0, $length); - if ($fp !== FALSE) { + if ($fp !== false) { $string = substr(bin2hex($fp), 0, $length); return $string; } @@ -645,14 +645,14 @@ class OC_Util { // Check openssl_random_pseudo_bytes if(function_exists('openssl_random_pseudo_bytes')) { openssl_random_pseudo_bytes(1, $strong); - if($strong == TRUE) { + if($strong == true) { return true; } } // Check /dev/urandom $fp = @file_get_contents('/dev/urandom', false, null, 0, 1); - if ($fp !== FALSE) { + if ($fp !== false) { return true; } |