summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/templates/part.list.php4
-rw-r--r--apps/files_encryption/lib/cryptstream.php2
-rw-r--r--apps/files_encryption/lib/proxy.php8
-rw-r--r--apps/files_encryption/settings.php2
-rw-r--r--apps/files_encryption/tests/encryption.php4
-rw-r--r--apps/files_encryption/tests/proxy.php8
-rw-r--r--apps/files_encryption/tests/stream.php20
-rw-r--r--apps/files_external/lib/ftp.php6
-rw-r--r--apps/files_external/lib/google.php2
-rw-r--r--apps/files_external/lib/swift.php12
-rw-r--r--apps/files_external/lib/webdav.php14
-rw-r--r--apps/files_versions/lib/hooks.php2
-rw-r--r--apps/files_versions/lib/versions.php4
-rw-r--r--apps/user_ldap/lib/access.php2
-rw-r--r--apps/user_ldap/tests/group_ldap.php16
15 files changed, 53 insertions, 53 deletions
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index 0f5b839b180..aaf9c5f57ee 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -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']); ?>)">
diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php
index 721a1b955df..95b58b8cce7 100644
--- a/apps/files_encryption/lib/cryptstream.php
+++ b/apps/files_encryption/lib/cryptstream.php
@@ -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);
}
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index f61cd1e3773..61b87ab5463 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -42,13 +42,13 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
return false;
}
if(is_null(self::$blackList)) {
- self::$blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
+ self::$blackList=explode(',', OCP\Config::getAppValue('files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
}
if(self::isEncrypted($path)) {
return true;
}
- $extension=substr($path,strrpos($path,'.')+1);
- if(array_search($extension,self::$blackList)===false) {
+ $extension=substr($path, strrpos($path, '.')+1);
+ if(array_search($extension, self::$blackList)===false) {
return true;
}
}
@@ -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),'');
}
}
}
diff --git a/apps/files_encryption/settings.php b/apps/files_encryption/settings.php
index 0a0d4d1abba..168124a8d22 100644
--- a/apps/files_encryption/settings.php
+++ b/apps/files_encryption/settings.php
@@ -7,7 +7,7 @@
*/
$tmpl = new OCP\Template( 'files_encryption', 'settings');
-$blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
+$blackList=explode(',', OCP\Config::getAppValue('files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true');
$tmpl->assign('blacklist',$blackList);
$tmpl->assign('encryption_enabled',$enabled);
diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php
index 89397f6ef2c..a7bc2df0e12 100644
--- a/apps/files_encryption/tests/encryption.php
+++ b/apps/files_encryption/tests/encryption.php
@@ -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);
}
}
diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php
index 042011a6c87..c3c8f4a2db0 100644
--- a/apps/files_encryption/tests/proxy.php
+++ b/apps/files_encryption/tests/proxy.php
@@ -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));
}
}
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php
index 39b13620782..5ea0da48017 100644
--- a/apps/files_encryption/tests/stream.php
+++ b/apps/files_encryption/tests/stream.php
@@ -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);
}
}
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 261141455cc..13d1387f287 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -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);
}
}
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 9b83dcee537..32d57ed3cef 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -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 = '';
}
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 4b0b8c25fda..632c72c280f 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -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);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 5e185839158..74e468a2838 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -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;
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index 500ce0ef064..822103ebc32 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -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']);
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 1b3de84f31a..56878b470d1 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -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
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index a500e1bf5b4..6f2f61dc8a3 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -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;
diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php
index b953127d86e..2acb8c35a19 100644
--- a/apps/user_ldap/tests/group_ldap.php
+++ b/apps/user_ldap/tests/group_ldap.php
@@ -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()));
}
}