]> source.dussan.org Git - nextcloud-server.git/commitdiff
More Checkstyle cleanup
authorFelix Moeller <mail@felixmoeller.de>
Tue, 23 Oct 2012 06:01:09 +0000 (08:01 +0200)
committerFelix Moeller <mail@felixmoeller.de>
Tue, 23 Oct 2012 06:01:09 +0000 (08:01 +0200)
This is for all LowerCaseConstant warnings

14 files changed:
apps/files_encryption/lib/crypt.php
core/ajax/requesttoken.php
core/lostpassword/index.php
core/lostpassword/resetpassword.php
lib/files.php
lib/helper.php
lib/migrate.php
lib/ocsclient.php
lib/updater.php
lib/user.php
lib/util.php
public.php
remote.php
status.php

index 38d8edf28c356fb9e6f4b78441033926d6b763d4..d057c1ed1940fdc8ae149ee8b50b52b8fcdfe525 100644 (file)
@@ -151,7 +151,7 @@ class OC_Crypt {
        */
        public static function encryptFile( $source, $target, $key='') {
                $handleread  = fopen($source, "rb");
-               if($handleread!=FALSE) {
+               if($handleread!=false) {
                        $handlewrite = fopen($target, "wb");
                        while (!feof($handleread)) {
                                $content = fread($handleread, 8192);
@@ -174,7 +174,7 @@ class OC_Crypt {
                */
        public static function decryptFile( $source, $target, $key='') {
                $handleread  = fopen($source, "rb");
-               if($handleread!=FALSE) {
+               if($handleread!=false) {
                        $handlewrite = fopen($target, "wb");
                        while (!feof($handleread)) {
                                $content = fread($handleread, 8192);
index 96d5402e621d54b485119fd26e12f836d8f1bf1a..705330b2c3e85886e2ff772cf62ffc97929db9e1 100644 (file)
@@ -29,8 +29,8 @@
 require_once '../../lib/base.php';
 
 // don't load apps or filesystem for this task
-$RUNTIME_NOAPPS    = TRUE;
-$RUNTIME_NOSETUPFS = TRUE;
+$RUNTIME_NOAPPS    = true;
+$RUNTIME_NOSETUPFS = true;
 
 // Sanity checks
 // using OCP\JSON::callCheck() below protects the token refreshing itself.
index 906208dcbc4b52e3d79796111ac5934336760f94..1da5bce8ea809b5aad81cb95399fbae2b008b6a6 100644 (file)
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
 */
 
-$RUNTIME_NOAPPS = TRUE; //no apps
+$RUNTIME_NOAPPS = true; //no apps
 require_once '../../lib/base.php';
 
 
index 896c8da76e091a30cb6d03da853972217bc91692..7cd383921d7ebc62aaf2ed481c002e44dbd0f258 100644 (file)
@@ -6,7 +6,7 @@
  * See the COPYING-README file.
 */
 
-$RUNTIME_NOAPPS = TRUE; //no apps
+$RUNTIME_NOAPPS = true; //no apps
 require_once '../../lib/base.php';
 
 // Someone wants to reset their password:
index a08bf9c656807d89467016538115d284e35383c1..b4d4de1c99551176160019e8780f76da119a6382 100644 (file)
@@ -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) {
index 37a17885eee42dce61363fd112af99345a7b486b..b79955aa9bf77b0ea15beaf3dbc041a8a1407fc4 100644 (file)
@@ -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;
        }
 
        /**
index 3694ea877a0d38bcfbed6a189e27002c65eef328..409d77a1a96613c0c4e8fdef8db712088020c029 100644 (file)
@@ -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 {
index 3c80f319662bc223002945109f2bbee1904667e5..4d4937377b3b0ae98e63a0770a3361c228f7e85a 100644 (file)
@@ -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);
 
index cb22da4f906de487ec33d959c023b958a39d0554..483570b050ae6c66f6adc9a41a7ac96e7f9558c4 100644 (file)
@@ -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);
index 77bfe0de92a031de6d544bd67e69b5aaad1dcbfa..eff93b501bbcc66a95c8bb570d6d36e9d0064f18 100644 (file)
@@ -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);
        }
 }
index 0a824f86eb3628bc34a94c4954f006563f91376f..75991d685c605761feec6b11554649d6e69ce185 100755 (executable)
@@ -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;
                }
 
index db8419373ee252e108daf75142f6e7a6153d0dee..759e8e91619276bc1f45e2f9913cd23654ea3e84 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$RUNTIME_NOAPPS = TRUE;
+$RUNTIME_NOAPPS = true;
 require_once 'lib/base.php';
 if (!isset($_GET['service'])) {
        header('HTTP/1.0 404 Not Found');
index 137bd774b5223e8d0c2a78770c2e7af5ef3063a9..7738de04f6000ee7c25d93dab2152efc4a72d83e 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$RUNTIME_NOAPPS = TRUE;
+$RUNTIME_NOAPPS = true;
 require_once 'lib/base.php';
 $path_info = OC_Request::getPathInfo();
 if ($path_info === false || $path_info === '') {
index cadca60f292d0817ea8082296dc1e39eb4c16667..9d6ac87c671a3069f5acaa72abf003c04273c07d 100644 (file)
@@ -21,7 +21,7 @@
 *
 */
 
-$RUNTIME_NOAPPS = TRUE; //no apps, yet
+$RUNTIME_NOAPPS = true; //no apps, yet
 
 require_once 'lib/base.php';