]> source.dussan.org Git - nextcloud-server.git/commitdiff
Checkstyle: NoSpaceAfterComma
authorFelix Moeller <mail@felixmoeller.de>
Tue, 23 Oct 2012 20:53:54 +0000 (22:53 +0200)
committerFelix Moeller <mail@felixmoeller.de>
Tue, 23 Oct 2012 20:53:54 +0000 (22:53 +0200)
30 files changed:
apps/files/templates/part.list.php
apps/files_encryption/lib/cryptstream.php
apps/files_encryption/lib/proxy.php
apps/files_encryption/tests/encryption.php
apps/files_encryption/tests/proxy.php
apps/files_encryption/tests/stream.php
apps/files_external/lib/ftp.php
apps/files_external/lib/google.php
apps/files_external/lib/swift.php
apps/files_external/lib/webdav.php
apps/files_versions/lib/hooks.php
apps/files_versions/lib/versions.php
apps/user_ldap/lib/access.php
apps/user_ldap/tests/group_ldap.php
lib/connector/sabre/locks.php
lib/filecache.php
lib/filestorage/common.php
lib/filestorage/local.php
lib/filesystem.php
lib/filesystemview.php
lib/helper.php
lib/installer.php
lib/search/provider/file.php
lib/setup.php
lib/streamwrappers.php
lib/templatelayout.php
lib/updater.php
lib/user.php
lib/util.php
lib/vcategories.php

index 0f5b839b180a52c65aa3b258c2ef7c84872b38cd..aaf9c5f57eee5e25c1442c7c1fbe8de5de107d5c 100644 (file)
@@ -14,9 +14,9 @@
                        $relative_modified_date = OCP\relative_modified_date($file['mtime']);
                        $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
                        if($relative_date_color>200) $relative_date_color = 200;
-                       $name = str_replace('+','%20',urlencode($file['name']));
+                       $name = str_replace('+','%20', urlencode($file['name']));
                        $name = str_replace('%2F','/', $name);
-                       $directory = str_replace('+','%20',urlencode($file['directory']));
+                       $directory = str_replace('+','%20', urlencode($file['directory']));
                        $directory = str_replace('%2F','/', $directory); ?>
                        <tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'>
                                <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)">
index 721a1b955dffd0c2f9c5b3bb51e0ef6da456e9a6..95b58b8cce77a15c519d3322c0a6fa11b1408c2d 100644 (file)
@@ -167,7 +167,7 @@ class OC_CryptStream{
        public function stream_close() {
                $this->flush();
                if($this->meta['mode']!='r' and $this->meta['mode']!='rb') {
-                       OC_FileCache::put($this->path,array('encrypted'=>true,'size'=>$this->size),'');
+                       OC_FileCache::put($this->path, array('encrypted'=>true,'size'=>$this->size),'');
                }
                return fclose($this->source);
        }
index f61cd1e3773dc53de90f2c7471d579218c88619b..5c19955dbd56c0a157a2a5988920931a74182c28 100644 (file)
@@ -68,7 +68,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
                        if (!is_resource($data)) {//stream put contents should have been converter to fopen
                                $size=strlen($data);
                                $data=OC_Crypt::blockEncrypt($data);
-                               OC_FileCache::put($path,array('encrypted'=>true,'size'=>$size),'');
+                               OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size),'');
                        }
                }
        }
index 89397f6ef2c066f2856470cc6a20fd048e17a8b0..a7bc2df0e12c30938bfc2eec2de96ee6e88a9068 100644 (file)
@@ -19,7 +19,7 @@ class Test_Encryption extends UnitTestCase {
 
                $chunk=substr($source,0,8192);
                $encrypted=OC_Crypt::encrypt($chunk,$key);
-               $this->assertEqual(strlen($chunk),strlen($encrypted));
+               $this->assertEqual(strlen($chunk), strlen($encrypted));
                $decrypted=OC_Crypt::decrypt($encrypted,$key);
                $decrypted=rtrim($decrypted, "\0");
                $this->assertEqual($decrypted,$chunk);
@@ -66,7 +66,7 @@ class Test_Encryption extends UnitTestCase {
                $this->assertEqual($decrypted,$source);
 
                $encrypted=OC_Crypt::blockEncrypt($source,$key);
-               $decrypted=OC_Crypt::blockDecrypt($encrypted,$key,strlen($source));
+               $decrypted=OC_Crypt::blockDecrypt($encrypted,$key, strlen($source));
                $this->assertEqual($decrypted,$source);
        }
 }
index 042011a6c87814157a89a4589216ec81d8562890..c3c8f4a2db0ef754e860d596a1fb028493367dbb 100644 (file)
@@ -30,7 +30,7 @@ class Test_CryptProxy extends UnitTestCase {
 
                //set up temporary storage
                OC_Filesystem::clearMounts();
-               OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/');
+               OC_Filesystem::mount('OC_Filestorage_Temporary', array(),'/');
 
                OC_Filesystem::init('/'.$user.'/files');
 
@@ -59,7 +59,7 @@ class Test_CryptProxy extends UnitTestCase {
 
                $fromFile=OC_Filesystem::file_get_contents('/file');
                $this->assertNotEqual($original,$stored);
-               $this->assertEqual(strlen($original),strlen($fromFile));
+               $this->assertEqual(strlen($original), strlen($fromFile));
                $this->assertEqual($original,$fromFile);
 
        }
@@ -98,7 +98,7 @@ class Test_CryptProxy extends UnitTestCase {
 
                $fromFile=OC_Filesystem::file_get_contents('/file');
                $this->assertNotEqual($original,$stored);
-               $this->assertEqual(strlen($original),strlen($fromFile));
+               $this->assertEqual(strlen($original), strlen($fromFile));
                $this->assertEqual($original,$fromFile);
 
                $file=__DIR__.'/zeros';
@@ -112,6 +112,6 @@ class Test_CryptProxy extends UnitTestCase {
 
                $fromFile=OC_Filesystem::file_get_contents('/file');
                $this->assertNotEqual($original,$stored);
-               $this->assertEqual(strlen($original),strlen($fromFile));
+               $this->assertEqual(strlen($original), strlen($fromFile));
        }
 }
index 39b136207826000704625d693ccef2bf29e683ca..5ea0da480171651a076ad13ef3c9dbb0f9bb5609 100644 (file)
@@ -10,11 +10,11 @@ class Test_CryptStream extends UnitTestCase {
        private $tmpFiles=array();
 
        function testStream() {
-               $stream=$this->getStream('test1','w',strlen('foobar'));
+               $stream=$this->getStream('test1','w', strlen('foobar'));
                fwrite($stream,'foobar');
                fclose($stream);
 
-               $stream=$this->getStream('test1','r',strlen('foobar'));
+               $stream=$this->getStream('test1','r', strlen('foobar'));
                $data=fread($stream,6);
                fclose($stream);
                $this->assertEqual('foobar',$data);
@@ -26,10 +26,10 @@ class Test_CryptStream extends UnitTestCase {
                fclose($target);
                fclose($source);
 
-               $stream=$this->getStream('test2','r',filesize($file));
+               $stream=$this->getStream('test2','r', filesize($file));
                $data=stream_get_contents($stream);
                $original=file_get_contents($file);
-               $this->assertEqual(strlen($original),strlen($data));
+               $this->assertEqual(strlen($original), strlen($data));
                $this->assertEqual($original,$data);
        }
 
@@ -59,27 +59,27 @@ class Test_CryptStream extends UnitTestCase {
                $file=__DIR__.'/binary';
                $source=file_get_contents($file);
 
-               $stream=$this->getStream('test','w',strlen($source));
+               $stream=$this->getStream('test','w', strlen($source));
                fwrite($stream,$source);
                fclose($stream);
 
-               $stream=$this->getStream('test','r',strlen($source));
+               $stream=$this->getStream('test','r', strlen($source));
                $data=stream_get_contents($stream);
                fclose($stream);
-               $this->assertEqual(strlen($data),strlen($source));
+               $this->assertEqual(strlen($data), strlen($source));
                $this->assertEqual($source,$data);
 
                $file=__DIR__.'/zeros';
                $source=file_get_contents($file);
 
-               $stream=$this->getStream('test2','w',strlen($source));
+               $stream=$this->getStream('test2','w', strlen($source));
                fwrite($stream,$source);
                fclose($stream);
 
-               $stream=$this->getStream('test2','r',strlen($source));
+               $stream=$this->getStream('test2','r', strlen($source));
                $data=stream_get_contents($stream);
                fclose($stream);
-               $this->assertEqual(strlen($data),strlen($source));
+               $this->assertEqual(strlen($data), strlen($source));
                $this->assertEqual($source,$data);
        }
 }
index 261141455cce8752add3be7627dd4cb3d6ae9836..13d1387f287ac6579fddaf78a4c41683ce6c705f 100644 (file)
@@ -53,7 +53,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
                        case 'ab':
                                //these are supported by the wrapper
                                $context = stream_context_create(array('ftp' => array('overwrite' => true)));
-                               return fopen($this->constructUrl($path),$mode,false,$context);
+                               return fopen($this->constructUrl($path),$mode, false,$context);
                        case 'r+':
                        case 'w+':
                        case 'wb+':
@@ -64,7 +64,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
                        case 'c+':
                                //emulate these
                                if(strrpos($path,'.')!==false) {
-                                       $ext=substr($path,strrpos($path,'.'));
+                                       $ext=substr($path, strrpos($path,'.'));
                                }else{
                                        $ext='';
                                }
@@ -80,7 +80,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
 
        public function writeBack($tmpFile) {
                if(isset(self::$tempFiles[$tmpFile])) {
-                       $this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]);
+                       $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
                        unlink($tmpFile);
                }
        }
index 9b83dcee537876d7a21fa370018686b904dea369..32d57ed3cef62f49cd46b0bed0350ece9538b572 100644 (file)
@@ -395,7 +395,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
                        case 'c':
                        case 'c+':
                                if (strrpos($path,'.') !== false) {
-                                       $ext = substr($path,strrpos($path,'.'));
+                                       $ext = substr($path, strrpos($path,'.'));
                                } else {
                                        $ext = '';
                                }
index 4b0b8c25fda50a16469ebe91352e739aa44faf53..632c72c280fa88400d817ab62db678444d9f61f4 100644 (file)
@@ -83,7 +83,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
                                $parentContainer=$this->getContainer($parent);
                        }
                }
-               $this->addSubContainer($parentContainer,basename($path));
+               $this->addSubContainer($parentContainer, basename($path));
                return $this->conn->create_container($this->getContainerName($path));
        }
 
@@ -245,7 +245,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
                        return false;
                }else{
                        unset($containers[$i]);
-                       file_put_contents($tmpFile,implode("\n",$containers)."\n");
+                       file_put_contents($tmpFile, implode("\n",$containers)."\n");
                }
 
                $obj->load_from_filename($tmpFile);
@@ -304,7 +304,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
                        $this->emptyContainer($path);
                        if($path!='' and $path!='/') {
                                $parentContainer=$this->getContainer(dirname($path));
-                               $this->removeSubContainer($parentContainer,basename($path));
+                               $this->removeSubContainer($parentContainer, basename($path));
                        }
 
                        $this->conn->delete_container($this->getContainerName($path));
@@ -440,7 +440,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
 
        public function writeBack($tmpFile) {
                if(isset(self::$tempFiles[$tmpFile])) {
-                       $this->fromTmpFile($tmpFile,self::$tempFiles[$tmpFile]);
+                       $this->fromTmpFile($tmpFile, self::$tempFiles[$tmpFile]);
                        unlink($tmpFile);
                }
        }
@@ -466,7 +466,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
        public function rename($path1,$path2) {
                $sourceContainer=$this->getContainer(dirname($path1));
                $targetContainer=$this->getContainer(dirname($path2));
-               $result=$sourceContainer->move_object_to(basename($path1),$targetContainer,basename($path2));
+               $result=$sourceContainer->move_object_to(basename($path1),$targetContainer, basename($path2));
                unset($this->objects[$path1]);
                if($result) {
                        $targetObj=$this->getObject($path2);
@@ -478,7 +478,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
        public function copy($path1,$path2) {
                $sourceContainer=$this->getContainer(dirname($path1));
                $targetContainer=$this->getContainer(dirname($path2));
-               $result=$sourceContainer->copy_object_to(basename($path1),$targetContainer,basename($path2));
+               $result=$sourceContainer->copy_object_to(basename($path1),$targetContainer, basename($path2));
                if($result) {
                        $targetObj=$this->getObject($path2);
                        $this->resetMTime($targetObj);
index 5e1858391588925a6617b0218a76a72cfe1bf602..890e66d742ec15ac52a00bf0efca0b0f8287df66 100644 (file)
@@ -65,12 +65,12 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
 
        public function mkdir($path) {
                $path=$this->cleanPath($path);
-               return $this->simpleResponse('MKCOL',$path,null,201);
+               return $this->simpleResponse('MKCOL',$path, null,201);
        }
 
        public function rmdir($path) {
                $path=$this->cleanPath($path);
-               return $this->simpleResponse('DELETE',$path,null,204);
+               return $this->simpleResponse('DELETE',$path, null,204);
        }
 
        public function opendir($path) {
@@ -123,7 +123,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
        }
 
        public function unlink($path) {
-               return $this->simpleResponse('DELETE',$path,null,204);
+               return $this->simpleResponse('DELETE',$path, null,204);
        }
 
        public function fopen($path,$mode) {
@@ -159,7 +159,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
                        case 'c+':
                                //emulate these
                                if(strrpos($path,'.')!==false) {
-                                       $ext=substr($path,strrpos($path,'.'));
+                                       $ext=substr($path, strrpos($path,'.'));
                                }else{
                                        $ext='';
                                }
@@ -175,7 +175,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
 
        public function writeBack($tmpFile) {
                if(isset(self::$tempFiles[$tmpFile])) {
-                       $this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]);
+                       $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
                        unlink($tmpFile);
                }
        }
@@ -225,7 +225,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
                $path1=$this->cleanPath($path1);
                $path2=$this->root.$this->cleanPath($path2);
                try{
-                       $response=$this->client->request('MOVE',$path1,null,array('Destination'=>$path2));
+                       $response=$this->client->request('MOVE',$path1,null, array('Destination'=>$path2));
                        return true;
                }catch(Exception $e) {
                        echo $e;
@@ -239,7 +239,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
                $path1=$this->cleanPath($path1);
                $path2=$this->root.$this->cleanPath($path2);
                try{
-                       $response=$this->client->request('COPY',$path1,null,array('Destination'=>$path2));
+                       $response=$this->client->request('COPY',$path1,null, array('Destination'=>$path2));
                        return true;
                }catch(Exception $e) {
                        echo $e;
index 500ce0ef06474ceb0173e8bc75b08c1e0dda320d..822103ebc32926076a19d1421cfaa5da408e3101 100644 (file)
@@ -64,7 +64,7 @@ class Hooks {
                $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v';
                if(Storage::isversioned($rel_oldpath)) {
                        $info=pathinfo($abs_newpath);
-                       if(!file_exists($info['dirname'])) mkdir($info['dirname'],0750,true);
+                       if(!file_exists($info['dirname'])) mkdir($info['dirname'],0750, true);
                        $versions = Storage::getVersions($rel_oldpath);
                        foreach ($versions as $v) {
                                rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
index 1b3de84f31aa48a59f3b46839e23467ce7d925b6..56878b470d199f2d96bd789790ac2ac060047279 100644 (file)
@@ -99,7 +99,7 @@ class Storage {
                                $versionsFolderName=\OCP\Config::getSystemValue('datadirectory'). $versions_fileview->getAbsolutePath('');
                                $matches=glob($versionsFolderName.'/'.$filename.'.v*');
                                sort($matches);
-                               $parts=explode('.v',end($matches));
+                               $parts=explode('.v', end($matches));
                                if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) {
                                        return false;
                                }
@@ -109,7 +109,7 @@ class Storage {
                        // create all parent folders
                        $info=pathinfo($filename);
                        if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
-                               mkdir($versionsFolderName.'/'.$info['dirname'],0750,true);
+                               mkdir($versionsFolderName.'/'.$info['dirname'],0750, true);
                        }
 
                        // store a new version of a file
index a500e1bf5b43b81d6f49403ceab237eded4de886..6f2f61dc8a353d8b77598349b9f307082343f956 100644 (file)
@@ -657,7 +657,7 @@ abstract class Access {
                                $this->connection->ldapUuidAttribute = $attribute;
                                return true;
                    }
-                   \OCP\Util::writeLog('user_ldap', 'The looked for uuid attr is not '.$attribute.', result was '.print_r($value,true), \OCP\Util::DEBUG);
+                   \OCP\Util::writeLog('user_ldap', 'The looked for uuid attr is not '.$attribute.', result was '.print_r($value, true), \OCP\Util::DEBUG);
                }
 
                return false;
index b953127d86e74c18f89a314977441a97492c07e4..2acb8c35a1974f7f6e2a3c4e2cb218bb751e28a5 100644 (file)
@@ -29,18 +29,18 @@ class Test_Group_Ldap extends UnitTestCase {
                OC_Group::useBackend(new OCA\user_ldap\GROUP_LDAP());
                $group_ldap = new OCA\user_ldap\GROUP_LDAP();
 
-               $this->assertIsA(OC_Group::getGroups(),gettype(array()));
-               $this->assertIsA($group_ldap->getGroups(),gettype(array()));
+               $this->assertIsA(OC_Group::getGroups(), gettype(array()));
+               $this->assertIsA($group_ldap->getGroups(), gettype(array()));
 
-               $this->assertFalse(OC_Group::inGroup('john','dosers'),gettype(false));
-               $this->assertFalse($group_ldap->inGroup('john','dosers'),gettype(false));
+               $this->assertFalse(OC_Group::inGroup('john','dosers'), gettype(false));
+               $this->assertFalse($group_ldap->inGroup('john','dosers'), gettype(false));
                //TODO: check also for expected true result. This backend won't be able to do any modifications, maybe use a dummy for this.
 
-               $this->assertIsA(OC_Group::getUserGroups('john doe'),gettype(array()));
-               $this->assertIsA($group_ldap->getUserGroups('john doe'),gettype(array()));
+               $this->assertIsA(OC_Group::getUserGroups('john doe'), gettype(array()));
+               $this->assertIsA($group_ldap->getUserGroups('john doe'), gettype(array()));
 
-               $this->assertIsA(OC_Group::usersInGroup('campers'),gettype(array()));
-               $this->assertIsA($group_ldap->usersInGroup('campers'),gettype(array()));
+               $this->assertIsA(OC_Group::usersInGroup('campers'), gettype(array()));
+               $this->assertIsA($group_ldap->usersInGroup('campers'), gettype(array()));
        }
 
 }
index dbcc57558e0b1319051db005a0280a494f738879..8ebe324602c07b9549d78b3886c1a99f2ef3d59d 100644 (file)
@@ -109,7 +109,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
                $lockInfo->created = time();
                $lockInfo->uri = $uri;
 
-               $locks = $this->getLocks($uri,false);
+               $locks = $this->getLocks($uri, false);
                $exists = false;
                foreach($locks as $lock) {
                        if ($lock->token == $lockInfo->token) $exists = true;
index 776b60abcac5c7c059c2979887aa4ba4692d817a..322575954430a562ab86c9a3f56eb36127e9479b 100644 (file)
@@ -102,7 +102,7 @@ class OC_FileCache{
                $data['versioned']=(int)$data['versioned'];
                $user=OC_User::getUser();
                $query=OC_DB::prepare('INSERT INTO `*PREFIX*fscache`(`parent`, `name`, `path`, `path_hash`, `size`, `mtime`, `ctime`, `mimetype`, `mimepart`,`user`,`writable`,`encrypted`,`versioned`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)');
-               $result=$query->execute(array($parent,basename($fullpath),$fullpath,md5($fullpath),$data['size'],$data['mtime'],$data['ctime'],$data['mimetype'],$mimePart,$user,$data['writable'],$data['encrypted'],$data['versioned']));
+               $result=$query->execute(array($parent,basename($fullpath),$fullpath, md5($fullpath),$data['size'],$data['mtime'],$data['ctime'],$data['mimetype'],$mimePart,$user,$data['writable'],$data['encrypted'],$data['versioned']));
                if(OC_DB::isError($result)) {
                        OC_Log::write('files', 'error while writing file('.$fullpath.') to cache', OC_Log::ERROR);
                }
@@ -163,7 +163,7 @@ class OC_FileCache{
                $newPath=$root.$newPath;
                $newParent=self::getParentId($newPath);
                $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `parent`=? ,`name`=?, `path`=?, `path_hash`=? WHERE `path_hash`=?');
-               $query->execute(array($newParent,basename($newPath),$newPath,md5($newPath),md5($oldPath)));
+               $query->execute(array($newParent,basename($newPath),$newPath,md5($newPath), md5($oldPath)));
 
                if(($cache=OC_Cache::getUserCache(true)) && $cache->hasKey('fileid/'.$oldPath)) {
                        $cache->set('fileid/'.$newPath, $cache->get('fileid/'.$oldPath));
@@ -176,7 +176,7 @@ class OC_FileCache{
                while($row= $query->execute(array($oldPath.'/%'))->fetchRow()) {
                        $old=$row['path'];
                        $new=$newPath.substr($old, $oldLength);
-                       $updateQuery->execute(array($new,md5($new),md5($old)));
+                       $updateQuery->execute(array($new,md5($new), md5($old)));
 
                        if(($cache=OC_Cache::getUserCache(true)) && $cache->hasKey('fileid/'.$old)) {
                                $cache->set('fileid/'.$new, $cache->get('fileid/'.$old));
index 351714437c58d36c482779898651877dd543adef..9627a97e9dd71ed377813f140a12e98db7debfc6 100644 (file)
@@ -260,7 +260,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
                if($dh) {
                        while($item=readdir($dh)) {
                                if ($item == '.' || $item == '..') continue;
-                               if(strstr(strtolower($item),strtolower($query))!==false) {
+                               if(strstr(strtolower($item), strtolower($query))!==false) {
                                        $files[]=$dir.'/'.$item;
                                }
                                if($this->is_dir($dir.'/'.$item)) {
index 80aa548047c31dc07afa7cba133f1dedb2db739c..731ac4a3c727009b65ad59867f3bdb09f95696e5 100644 (file)
@@ -103,7 +103,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
                        if(!$this->file_exists($path2)) {
                                $this->mkdir($path2);
                        }
-                       $source=substr($path1,strrpos($path1,'/')+1);
+                       $source=substr($path1, strrpos($path1,'/')+1);
                        $path2.=$source;
                }
                return copy($this->datadir.$path1,$this->datadir.$path2);
@@ -178,7 +178,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
                $files=array();
                foreach (scandir($this->datadir.$dir) as $item) {
                        if ($item == '.' || $item == '..') continue;
-                       if(strstr(strtolower($item),strtolower($query))!==false) {
+                       if(strstr(strtolower($item), strtolower($query))!==false) {
                                $files[]=$dir.'/'.$item;
                        }
                        if(is_dir($this->datadir.$dir.'/'.$item)) {
index 09ccf9de4df1d9fb46705f073df10822d45b9768..bc30dac7fa1d16c8d0d0e3af9d450829654af048 100644 (file)
@@ -148,7 +148,7 @@ class OC_Filesystem{
          * @return string
         */
        static public function getMountPoint($path) {
-               OC_Hook::emit(self::CLASSNAME,'get_mountpoint',array('path'=>$path));
+               OC_Hook::emit(self::CLASSNAME,'get_mountpoint', array('path'=>$path));
                if(!$path) {
                        $path='/';
                }
@@ -176,7 +176,7 @@ class OC_Filesystem{
        */
        static public function getInternalPath($path) {
                $mountPoint=self::getMountPoint($path);
-               $internalPath=substr($path,strlen($mountPoint));
+               $internalPath=substr($path, strlen($mountPoint));
                return $internalPath;
        }
        
index 2950ced5f9e6836c4eb894ba27604af246a489a9..0bd0b410be7058e9937792911ec7c638ad595a0a 100644 (file)
@@ -585,7 +585,7 @@ class OC_FilesystemView {
                                $result = OC_FileProxy::runPostProxies($operation, $this->getAbsolutePath($path), $result);
                                if(OC_Filesystem::$loaded and $this->fakeRoot==OC_Filesystem::getRoot()) {
                                        if($operation!='fopen') {//no post hooks for fopen, the file stream is still open
-                                               $this->runHooks($hooks,$path,true);
+                                               $this->runHooks($hooks,$path, true);
                                        }
                                }
                                return $result;
index b79955aa9bf77b0ea15beaf3dbc041a8a1407fc4..b7166e9fb411d1df8e333ebdde30c0f1f0183d84 100644 (file)
@@ -189,7 +189,7 @@ class OC_Helper {
                        return OC::$WEBROOT."/core/img/filetypes/$mimetype.png";
                }
                //try only the first part of the filetype
-               $mimetype=substr($mimetype,0,strpos($mimetype,'-'));
+               $mimetype=substr($mimetype,0, strpos($mimetype,'-'));
                if( file_exists( OC::$SERVERROOT."/core/img/filetypes/$mimetype.png" )) {
                        return OC::$WEBROOT."/core/img/filetypes/$mimetype.png";
                }
@@ -363,7 +363,7 @@ class OC_Helper {
                if($mimeType=='application/octet-stream' and function_exists('finfo_open') and function_exists('finfo_file') and $finfo=finfo_open(FILEINFO_MIME)) {
                        $info = @strtolower(finfo_file($finfo,$path));
                        if($info) {
-                               $mimeType=substr($info,0,strpos($info,';'));
+                               $mimeType=substr($info,0, strpos($info,';'));
                        }
                        finfo_close($finfo);
                }
@@ -380,8 +380,8 @@ class OC_Helper {
                        pclose($fp);
 
                        //trim the character set from the end of the response
-                       $mimeType=substr($reply,0,strrpos($reply,' '));
-                       $mimeType=substr($mimeType,0,strrpos($mimeType,"\n"));
+                       $mimeType=substr($reply,0, strrpos($reply,' '));
+                       $mimeType=substr($mimeType,0, strrpos($mimeType,"\n"));
 
                        //trim ;
                        if (strpos($mimeType, ';') !== false) {
@@ -495,7 +495,7 @@ class OC_Helper {
                }
                $count=0;
                while(!feof($source)) {
-                       $count+=fwrite($target,fread($source,8192));
+                       $count+=fwrite($target, fread($source,8192));
                }
                return $count;
        }
index 56e474bb3b30961dff96ee86b860112b05322eed..83d082b804a82f7830d6e99bf01de7f595ebcb29 100644 (file)
@@ -125,7 +125,7 @@ class OC_Installer{
                        }
                        return false;
                }
-               $info=OC_App::getAppInfo($extractDir.'/appinfo/info.xml',true);
+               $info=OC_App::getAppInfo($extractDir.'/appinfo/info.xml', true);
                // check the code for not allowed calls
                if(!OC_Installer::checkCode($info['id'],$extractDir)) {
                        OC_Log::write('core','App can\'t be installed because of not allowed code in the App',OC_Log::ERROR);
index 8d0843ce2d2069d056cd3d00730872052d1a1d37..0d4b332b792bc75aff29c0e86873a382dc3f42f1 100644 (file)
@@ -2,7 +2,7 @@
 
 class OC_Search_Provider_File extends OC_Search_Provider{
        function search($query) {
-               $files=OC_FileCache::search($query,true);
+               $files=OC_FileCache::search($query, true);
                $results=array();
                $l=OC_L10N::get('lib');
                foreach($files as $fileData) {
index 3c92e9c5599112a93a98f1facd514281b8ac9296..62d31fd544f295c97fe6f2b32eb0b555f65fb88f 100644 (file)
@@ -92,7 +92,7 @@ class OC_Setup {
                        //write the config file
                        OC_Config::setValue('datadirectory', $datadir);
                        OC_Config::setValue('dbtype', $dbtype);
-                       OC_Config::setValue('version',implode('.',OC_Util::getVersion()));
+                       OC_Config::setValue('version', implode('.',OC_Util::getVersion()));
                        if($dbtype == 'mysql') {
                                $dbuser = $options['dbuser'];
                                $dbpass = $options['dbpass'];
@@ -376,8 +376,8 @@ class OC_Setup {
                        }
 
                        if(count($error) == 0) {
-                               OC_Appconfig::setValue('core', 'installedat',microtime(true));
-                               OC_Appconfig::setValue('core', 'lastupdatedat',microtime(true));
+                               OC_Appconfig::setValue('core', 'installedat', microtime(true));
+                               OC_Appconfig::setValue('core', 'lastupdatedat', microtime(true));
 
                                OC_Group::createGroup('admin');
                                OC_Group::addToGroup($username, 'admin');
index 1e5b19a11f0bcba8b146fc6fc6e5c1205d0cdd2b..63b795f4c4de236481b2fb67a83f37b977b629b5 100644 (file)
@@ -6,7 +6,7 @@ class OC_FakeDirStream{
        private $index;
 
        public function dir_opendir($path,$options) {
-               $this->name=substr($path,strlen('fakedir://'));
+               $this->name=substr($path, strlen('fakedir://'));
                $this->index=0;
                if(!isset(self::$dirs[$this->name])) {
                        self::$dirs[$this->name]=array();
@@ -223,7 +223,7 @@ class OC_CloseStreamWrapper{
        private $source;
        private static $open=array();
        public function stream_open($path, $mode, $options, &$opened_path) {
-               $path=substr($path,strlen('close://'));
+               $path=substr($path, strlen('close://'));
                $this->path=$path;
                $this->source=fopen($path,$mode);
                if(is_resource($this->source)) {
@@ -279,7 +279,7 @@ class OC_CloseStreamWrapper{
        }
 
        public function url_stat($path) {
-               $path=substr($path,strlen('close://'));
+               $path=substr($path, strlen('close://'));
                if(file_exists($path)) {
                        return stat($path);
                }else{
@@ -295,7 +295,7 @@ class OC_CloseStreamWrapper{
        }
 
        public function unlink($path) {
-               $path=substr($path,strlen('close://'));
+               $path=substr($path, strlen('close://'));
                return unlink($path);
        }
 }
index 78893457f478511f6b483e79acfb9957028f35ba..645c92fa1f1dcde3628e5a8566f2d2aa745a0a9e 100644 (file)
@@ -12,7 +12,7 @@ class OC_TemplateLayout extends OC_Template {
 
                if( $renderas == 'user' ) {
                        parent::__construct( 'core', 'layout.user' );
-                       if(in_array(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) {
+                       if(in_array(OC_APP::getCurrentApp(), array('settings','admin','help'))!==false) {
                                $this->assign('bodyid','body-settings', false);
                        }else{
                                $this->assign('bodyid','body-user', false);
@@ -38,7 +38,7 @@ class OC_TemplateLayout extends OC_Template {
                foreach(OC_App::getEnabledApps() as $app) {
                        $apps_paths[$app] = OC_App::getAppWebPath($app);
                }
-               $this->assign( 'apps_paths', str_replace('\\/', '/',json_encode($apps_paths)),false ); // Ugly unescape slashes waiting for better solution
+               $this->assign( 'apps_paths', str_replace('\\/', '/',json_encode($apps_paths)), false ); // Ugly unescape slashes waiting for better solution
 
                if (OC_Config::getValue('installed', false) && !OC_AppConfig::getValue('core', 'remote_core.css', false)) {
                        OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
index 483570b050ae6c66f6adc9a41a7ac96e7f9558c4..f55e55985d9da3c881fb8b7e9b14933385fd9eff 100644 (file)
@@ -29,8 +29,8 @@ class OC_Updater{
         * Check if a new version is available
         */
        public static function check() {
-               OC_Appconfig::setValue('core', 'lastupdatedat',microtime(true));
-               if(OC_Appconfig::getValue('core', 'installedat','')=='') OC_Appconfig::setValue('core', 'installedat',microtime(true));
+               OC_Appconfig::setValue('core', 'lastupdatedat', microtime(true));
+               if(OC_Appconfig::getValue('core', 'installedat','')=='') OC_Appconfig::setValue('core', 'installedat', microtime(true));
 
                $updaterurl='http://apps.owncloud.com/updater.php';
                $version=OC_Util::getVersion();
@@ -72,7 +72,7 @@ class OC_Updater{
                if(OC_Config::getValue('updatechecker', true)==true) {
                        $data=OC_Updater::check();
                        if(isset($data['version']) and $data['version']<>'') {
-                               $txt='<span style="color:#AA0000; font-weight:bold;">'.$l->t('%s is available. Get <a href="%s">more information</a>',array($data['versionstring'], $data['web'])).'</span>';
+                               $txt='<span style="color:#AA0000; font-weight:bold;">'.$l->t('%s is available. Get <a href="%s">more information</a>', array($data['versionstring'], $data['web'])).'</span>';
                        }else{
                                $txt=$l->t('up to date');
                        }
index eff93b501bbcc66a95c8bb570d6d36e9d0064f18..064fcbad96f5bc2a70cc4d457a0068be34c9699b 100644 (file)
@@ -120,11 +120,11 @@ class OC_User {
         * setup the configured backends in config.php
         */
        public static function setupBackends() {
-               $backends=OC_Config::getValue('user_backends',array());
+               $backends=OC_Config::getValue('user_backends', array());
                foreach($backends as $i=>$config) {
                        $class=$config['class'];
                        $arguments=$config['arguments'];
-                       if(class_exists($class) and array_search($i,self::$_setupedBackends)===false) {
+                       if(class_exists($class) and array_search($i, self::$_setupedBackends)===false) {
                                // make a reflection object
                                $reflectionObj = new ReflectionClass($class);
 
index 75991d685c605761feec6b11554649d6e69ce185..907b45540377dc0e7ab5016390573dd523018d8a 100755 (executable)
@@ -34,7 +34,7 @@ class OC_Util {
                $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
                //first set up the local "root" storage
                if(!self::$rootMounted) {
-                       OC_Filesystem::mount('OC_Filestorage_Local',array('datadir'=>$CONFIG_DATADIRECTORY),'/');
+                       OC_Filesystem::mount('OC_Filestorage_Local', array('datadir'=>$CONFIG_DATADIRECTORY),'/');
                        self::$rootMounted=true;
                }
 
@@ -456,7 +456,7 @@ class OC_Util {
         * @return string
         */
        public static function getInstanceId() {
-               $id=OC_Config::getValue('instanceid',null);
+               $id=OC_Config::getValue('instanceid', null);
                if(is_null($id)) {
                        $id=uniqid();
                        OC_Config::setValue('instanceid',$id);
index 6b1d6a316f1660bcd0e218e793892041892abffe..ba6569a244d8e94c0b76b1110a09d63eb0d0e407 100644 (file)
@@ -222,7 +222,7 @@ class OC_VCategories {
                if(!is_array($haystack)) {
                        return false;
                }
-               return array_search(strtolower($needle),array_map('strtolower',$haystack));
+               return array_search(strtolower($needle), array_map('strtolower',$haystack));
        }
 
 }