summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFelix Moeller <mail@felixmoeller.de>2012-11-04 11:10:46 +0100
committerFelix Moeller <mail@felixmoeller.de>2012-11-04 11:10:46 +0100
commit30d7993e0105a6c98cbf61d4253d08acf236aca7 (patch)
treebbf0cf871a65a2cb897f3a4ea405cf3ca3980c47 /lib
parentf8d1d7787e1112842db81a629dfd84b586fbebda (diff)
downloadnextcloud-server-30d7993e0105a6c98cbf61d4253d08acf236aca7.tar.gz
nextcloud-server-30d7993e0105a6c98cbf61d4253d08acf236aca7.zip
Checkstyle fixes: NoSpaceAfterComma
Diffstat (limited to 'lib')
-rw-r--r--lib/MDB2/Driver/sqlite3.php4
-rwxr-xr-xlib/app.php2
-rw-r--r--lib/archive/tar.php6
-rw-r--r--lib/archive/zip.php2
-rw-r--r--lib/base.php8
-rw-r--r--lib/connector/sabre/file.php2
-rw-r--r--lib/connector/sabre/locks.php4
-rw-r--r--lib/connector/sabre/node.php4
-rw-r--r--lib/db.php4
-rw-r--r--lib/filecache.php12
-rw-r--r--lib/filecache/update.php4
-rw-r--r--lib/fileproxy.php2
-rw-r--r--lib/fileproxy/quota.php4
-rw-r--r--lib/files.php2
-rw-r--r--lib/filestorage.php2
-rw-r--r--lib/filestorage/common.php4
-rw-r--r--lib/filestorage/local.php12
-rw-r--r--lib/filesystem.php16
-rw-r--r--lib/filesystemview.php2
-rw-r--r--lib/image.php2
-rw-r--r--lib/installer.php10
-rw-r--r--lib/json.php2
-rw-r--r--lib/l10n.php2
-rw-r--r--lib/log/owncloud.php4
-rw-r--r--lib/mail.php2
-rw-r--r--lib/migrate.php4
-rw-r--r--lib/migration/content.php2
-rw-r--r--lib/ocsclient.php6
-rw-r--r--lib/request.php4
-rw-r--r--lib/route.php2
-rw-r--r--lib/search.php2
-rw-r--r--lib/setup.php2
-rw-r--r--lib/streamwrappers.php8
-rw-r--r--lib/template.php8
-rw-r--r--lib/templatelayout.php6
-rw-r--r--lib/updater.php2
-rw-r--r--lib/user.php2
-rw-r--r--lib/user/database.php2
-rw-r--r--lib/user/http.php2
-rwxr-xr-xlib/util.php38
-rw-r--r--lib/vcategories.php28
41 files changed, 118 insertions, 118 deletions
diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php
index c9e7170ac69..bccb8cbbf01 100644
--- a/lib/MDB2/Driver/sqlite3.php
+++ b/lib/MDB2/Driver/sqlite3.php
@@ -351,7 +351,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common
}
if ($database_file !== ':memory:') {
- if(!strpos($database_file,'.db')) {
+ if(!strpos($database_file, '.db')) {
$database_file="$datadir/$database_file.db";
}
if (!file_exists($database_file)) {
@@ -387,7 +387,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common
$php_errormsg = '';
$this->connection = new SQLite3($database_file);
- if(is_callable(array($this->connection,'busyTimeout'))) {//busy timout is only available in php>=5.3
+ if(is_callable(array($this->connection, 'busyTimeout'))) {//busy timout is only available in php>=5.3
$this->connection->busyTimeout(100);
}
$this->_lasterror = $this->connection->lastErrorMsg();
diff --git a/lib/app.php b/lib/app.php
index f82961ca3a8..79c1d83314f 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -185,7 +185,7 @@ class OC_App{
}else{
$download=OC_OCSClient::getApplicationDownload($app, 1);
if(isset($download['downloadlink']) and $download['downloadlink']!='') {
- $app=OC_Installer::installApp(array('source'=>'http','href'=>$download['downloadlink']));
+ $app=OC_Installer::installApp(array('source'=>'http', 'href'=>$download['downloadlink']));
}
}
}
diff --git a/lib/archive/tar.php b/lib/archive/tar.php
index 6e0629a0e18..6c264686991 100644
--- a/lib/archive/tar.php
+++ b/lib/archive/tar.php
@@ -23,7 +23,7 @@ class OC_Archive_TAR extends OC_Archive{
private $path;
function __construct($source) {
- $types=array(null,'gz','bz');
+ $types=array(null, 'gz', 'bz');
$this->path=$source;
$this->tar=new Archive_Tar($source, $types[self::getTarType($source)]);
}
@@ -309,7 +309,7 @@ class OC_Archive_TAR extends OC_Archive{
if($mode=='r' or $mode=='rb') {
return fopen($tmpFile, $mode);
}else{
- OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack');
+ OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack');
self::$tempFiles[$tmpFile]=$path;
return fopen('close://'.$tmpFile, $mode);
}
@@ -334,7 +334,7 @@ class OC_Archive_TAR extends OC_Archive{
$this->tar->_close();
$this->tar=null;
}
- $types=array(null,'gz','bz');
+ $types=array(null, 'gz', 'bz');
$this->tar=new Archive_Tar($this->path, $types[self::getTarType($this->path)]);
}
}
diff --git a/lib/archive/zip.php b/lib/archive/zip.php
index 5a6fc578be7..1c967baa08f 100644
--- a/lib/archive/zip.php
+++ b/lib/archive/zip.php
@@ -171,7 +171,7 @@ class OC_Archive_ZIP extends OC_Archive{
$ext='';
}
$tmpFile=OCP\Files::tmpFile($ext);
- OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack');
+ OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack');
if($this->fileExists($path)) {
$this->extractFile($path, $tmpFile);
}
diff --git a/lib/base.php b/lib/base.php
index 5c3d3fb80ce..26cb75dac8d 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -239,7 +239,7 @@ class OC{
}
if(file_exists(OC::$SERVERROOT."/config/config.php") and !is_writable(OC::$SERVERROOT."/config/config.php")) {
$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;
}
@@ -322,7 +322,7 @@ class OC{
public static function init() {
// register autoloader
- spl_autoload_register(array('OC','autoload'));
+ spl_autoload_register(array('OC', 'autoload'));
setlocale(LC_ALL, 'en_US.UTF-8');
// set some stuff
@@ -440,7 +440,7 @@ class OC{
OC_Hook::connect('OC_Filesystem', 'rename', 'OC_Filesystem', 'isBlacklisted');
//make sure temporary files are cleaned up
- register_shutdown_function(array('OC_Helper','cleanTmp'));
+ register_shutdown_function(array('OC_Helper', 'cleanTmp'));
//parse the given parameters
self::$REQUESTEDAPP = (isset($_GET['app']) && trim($_GET['app']) != '' && !is_null($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files'));
@@ -669,7 +669,7 @@ class OC{
}
OC_App::loadApps(array('authentication'));
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
- //OC_Log::write('core',"Logged in with HTTP Authentication",OC_Log::DEBUG);
+ //OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie();
$_REQUEST['redirect_url'] = (isset($_SERVER['REQUEST_URI'])?$_SERVER['REQUEST_URI']:'');
OC_Util::redirectToDefaultPage();
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index ed02840195d..8d963a1cf8d 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -57,7 +57,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function get() {
- return OC_Filesystem::fopen($this->path,'rb');
+ return OC_Filesystem::fopen($this->path, 'rb');
}
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php
index 55a8d5eaa6d..a72d003bc72 100644
--- a/lib/connector/sabre/locks.php
+++ b/lib/connector/sabre/locks.php
@@ -102,7 +102,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
* @param Sabre_DAV_Locks_LockInfo $lockInfo
* @return bool
*/
- public function lock($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
+ public function lock($uri, Sabre_DAV_Locks_LockInfo $lockInfo) {
// We're making the lock timeout 5 minutes
$lockInfo->timeout = 300;
@@ -134,7 +134,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
* @param Sabre_DAV_Locks_LockInfo $lockInfo
* @return bool
*/
- public function unlock($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
+ public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo) {
$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?' );
$result = $query->execute( array(OC_User::getUser(), $uri, $lockInfo->token));
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 291b87257f1..5fc106b85ed 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -85,7 +85,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
$this->path = $newPath;
$query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertypath` = ? WHERE `userid` = ? AND `propertypath` = ?' );
- $query->execute( array( $newPath,OC_User::getUser(), $oldPath ));
+ $query->execute( array( $newPath, OC_User::getUser(), $oldPath ));
}
@@ -159,7 +159,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
$query->execute( array( OC_User::getUser(), $this->path, $propertyName, $propertyValue ));
} else {
$query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ? WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?' );
- $query->execute( array( $propertyValue,OC_User::getUser(), $this->path, $propertyName ));
+ $query->execute( array( $propertyValue, OC_User::getUser(), $this->path, $propertyName ));
}
}
}
diff --git a/lib/db.php b/lib/db.php
index ba59985b756..fba2687967f 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -324,7 +324,7 @@ class OC_DB {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.htmlentities($query).'<br />';
- OC_Log::write('core', $entry,OC_Log::FATAL);
+ OC_Log::write('core', $entry, OC_Log::FATAL);
error_log('DB error: '.$entry);
die( $entry );
}
@@ -334,7 +334,7 @@ class OC_DB {
}catch(PDOException $e) {
$entry = 'DB Error: "'.$e->getMessage().'"<br />';
$entry .= 'Offending command was: '.htmlentities($query).'<br />';
- OC_Log::write('core', $entry,OC_Log::FATAL);
+ OC_Log::write('core', $entry, OC_Log::FATAL);
error_log('DB error: '.$entry);
die( $entry );
}
diff --git a/lib/filecache.php b/lib/filecache.php
index 782e742d244..6263e03fc64 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -61,7 +61,7 @@ class OC_FileCache{
*
* $data is an assiciative array in the same format as returned by get
*/
- public static function put($path,$data, $root=false) {
+ public static function put($path, $data, $root=false) {
if($root===false) {
$root=OC_Filesystem::getRoot();
}
@@ -120,7 +120,7 @@ class OC_FileCache{
private static function update($id, $data) {
$arguments=array();
$queryParts=array();
- foreach(array('size','mtime','ctime','mimetype','encrypted','versioned','writable') as $attribute) {
+ foreach(array('size','mtime','ctime','mimetype','encrypted','versioned', 'writable') as $attribute) {
if(isset($data[$attribute])) {
//Convert to int it args are false
if($data[$attribute] === false) {
@@ -227,7 +227,7 @@ class OC_FileCache{
$where = '`name` LIKE ? AND `user`=?';
}
$query=OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*fscache` WHERE '.$where);
- $result=$query->execute(array("%$search%",OC_User::getUser()));
+ $result=$query->execute(array("%$search%", OC_User::getUser()));
$names=array();
while($row=$result->fetchRow()) {
if(!$returnData) {
@@ -366,7 +366,7 @@ class OC_FileCache{
* @param int count (optional)
* @param string root (optional)
*/
- public static function scan($path,$eventSource=false,&$count=0, $root=false) {
+ public static function scan($path, $eventSource=false,&$count=0, $root=false) {
if($eventSource) {
$eventSource->send('scanning', array('file'=>$path, 'count'=>$count));
}
@@ -402,7 +402,7 @@ class OC_FileCache{
}
OC_FileCache_Update::cleanFolder($path, $root);
- self::increaseSize($path,$totalSize, $root);
+ self::increaseSize($path, $totalSize, $root);
}
/**
@@ -448,7 +448,7 @@ class OC_FileCache{
* @return array of file paths
*
* $part1 and $part2 together form the complete mimetype.
- * e.g. searchByMime('text','plain')
+ * e.g. searchByMime('text', 'plain')
*
* seccond mimetype part can be ommited
* e.g. searchByMime('audio')
diff --git a/lib/filecache/update.php b/lib/filecache/update.php
index ce395bf6eda..bc403113e7c 100644
--- a/lib/filecache/update.php
+++ b/lib/filecache/update.php
@@ -165,7 +165,7 @@ class OC_FileCache_Update{
$mtime=$view->filemtime($path.'/');
$ctime=$view->filectime($path.'/');
$writable=$view->is_writable($path.'/');
- OC_FileCache::put($path, array('size'=>$size,'mtime'=>$mtime,'ctime'=>$ctime,'mimetype'=>$mimetype,'writable'=>$writable));
+ OC_FileCache::put($path, array('size'=>$size,'mtime'=>$mtime,'ctime'=>$ctime,'mimetype'=>$mimetype, 'writable'=>$writable));
}else{
$count=0;
OC_FileCache::scan($path, null, $count, $root);
@@ -200,7 +200,7 @@ class OC_FileCache_Update{
* @param string newPath
* @param string root (optional)
*/
- public static function rename($oldPath,$newPath, $root=false) {
+ public static function rename($oldPath, $newPath, $root=false) {
if(!OC_FileCache::inCache($oldPath, $root)) {
return;
}
diff --git a/lib/fileproxy.php b/lib/fileproxy.php
index 1ca799fb74f..2f81bde64a1 100644
--- a/lib/fileproxy.php
+++ b/lib/fileproxy.php
@@ -97,7 +97,7 @@ class OC_FileProxy{
return true;
}
- public static function runPostProxies($operation,$path, $result) {
+ public static function runPostProxies($operation, $path, $result) {
if(!self::$enabled) {
return $result;
}
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index 05b617c8327..81376fb6fca 100644
--- a/lib/fileproxy/quota.php
+++ b/lib/fileproxy/quota.php
@@ -38,9 +38,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{
if(in_array($user, $this->userQuota)) {
return $this->userQuota[$user];
}
- $userQuota=OC_Preferences::getValue($user,'files','quota','default');
+ $userQuota=OC_Preferences::getValue($user,'files','quota', 'default');
if($userQuota=='default') {
- $userQuota=OC_AppConfig::getValue('files','default_quota','none');
+ $userQuota=OC_AppConfig::getValue('files','default_quota', 'none');
}
if($userQuota=='none') {
$this->userQuota[$user]=0;
diff --git a/lib/files.php b/lib/files.php
index 13bb127e863..5a14083c285 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -391,7 +391,7 @@ class OC_Files {
*/
static function pull($source, $token, $dir, $file) {
$tmpfile=tempnam(get_temp_dir(), 'remoteCloudFile');
- $fp=fopen($tmpfile,'w+');
+ $fp=fopen($tmpfile, 'w+');
$url=$source.="/files/pull.php?token=$token";
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
diff --git a/lib/filestorage.php b/lib/filestorage.php
index 7b3a15dd8c6..dd65f4421b7 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -48,7 +48,7 @@ abstract class OC_Filestorage{
abstract public function copy($path1, $path2);
abstract public function fopen($path, $mode);
abstract public function getMimeType($path);
- abstract public function hash($type,$path, $raw = false);
+ abstract public function hash($type, $path, $raw = false);
abstract public function free_space($path);
abstract public function search($query);
abstract public function touch($path, $mtime=null);
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 3c06570d890..b97eb79d8d4 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -204,7 +204,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
unlink($tmpFile);
return $mime;
}
- public function hash($type,$path, $raw = false) {
+ public function hash($type, $path, $raw = false) {
$tmpFile=$this->getLocalFile();
$hash=hash($type, $tmpFile, $raw);
unlink($tmpFile);
@@ -264,7 +264,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
$files[]=$dir.'/'.$item;
}
if($this->is_dir($dir.'/'.$item)) {
- $files=array_merge($files,$this->searchInDir($query, $dir.'/'.$item));
+ $files=array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
}
}
}
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 89e994120ca..2dde0093d4b 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -86,11 +86,11 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
}
public function rename($path1, $path2) {
if (!$this->isUpdatable($path1)) {
- OC_Log::write('core','unable to rename, file is not writable : '.$path1,OC_Log::ERROR);
+ OC_Log::write('core','unable to rename, file is not writable : '.$path1, OC_Log::ERROR);
return false;
}
if(! $this->file_exists($path1)) {
- OC_Log::write('core','unable to rename, file does not exists : '.$path1,OC_Log::ERROR);
+ OC_Log::write('core','unable to rename, file does not exists : '.$path1, OC_Log::ERROR);
return false;
}
@@ -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);
@@ -156,8 +156,8 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
return $return;
}
- public function hash($path,$type, $raw=false) {
- return hash_file($type,$this->datadir.$path, $raw);
+ public function hash($path, $type, $raw=false) {
+ return hash_file($type, $this->datadir.$path, $raw);
}
public function free_space($path) {
@@ -182,7 +182,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
$files[]=$dir.'/'.$item;
}
if(is_dir($this->datadir.$dir.'/'.$item)) {
- $files=array_merge($files,$this->searchInDir($query, $dir.'/'.$item));
+ $files=array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
}
}
return $files;
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 055ba66aae3..aeafb149395 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -35,10 +35,10 @@
* post_create(path)
* delete(path, &run)
* post_delete(path)
- * rename(oldpath,newpath, &run)
- * post_rename(oldpath,newpath)
- * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emited in that order)
- * post_rename(oldpath,newpath)
+ * rename(oldpath, newpath, &run)
+ * post_rename(oldpath, newpath)
+ * copy(oldpath, newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emited in that order)
+ * post_rename(oldpath, newpath)
*
* the &run parameter can be set to false to prevent the operation from occuring
*/
@@ -246,7 +246,7 @@ class OC_Filesystem{
}
$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
- $previousMTime=OC_Appconfig::getValue('files','mountconfigmtime',0);
+ $previousMTime=OC_Appconfig::getValue('files','mountconfigmtime', 0);
if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
OC_FileCache::triggerUpdate();
OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime);
@@ -312,7 +312,7 @@ class OC_Filesystem{
return false;
}
}else{
- OC_Log::write('core','storage backend '.$class.' not found',OC_Log::ERROR);
+ OC_Log::write('core','storage backend '.$class.' not found', OC_Log::ERROR);
return false;
}
}
@@ -356,7 +356,7 @@ class OC_Filesystem{
if(substr($mountpoint, -1)!=='/') {
$mountpoint=$mountpoint.'/';
}
- self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments);
+ self::$mounts[$mountpoint]=array('class'=>$class, 'arguments'=>$arguments);
}
/**
@@ -590,7 +590,7 @@ class OC_Filesystem{
$path=substr($path, 0, -1);
}
//remove duplicate slashes
- while(strpos($path,'//')!==false) {
+ while(strpos($path, '//')!==false) {
$path=str_replace('//', '/', $path);
}
//normalize unicode if possible
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index ecbdb63ec54..936e1feb412 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -489,7 +489,7 @@ class OC_FilesystemView {
$hooks[]='write';
break;
default:
- OC_Log::write('core', 'invalid mode ('.$mode.') for '.$path,OC_Log::ERROR);
+ OC_Log::write('core', 'invalid mode ('.$mode.') for '.$path, OC_Log::ERROR);
}
return $this->basicOperation('fopen', $path, $hooks, $mode);
diff --git a/lib/image.php b/lib/image.php
index 38acf00d9fe..41cd9081690 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -271,7 +271,7 @@ class OC_Image {
return -1;
}
if(is_null($this->filepath) || !is_readable($this->filepath)) {
- OC_Log::write('core','OC_Image->fixOrientation() No readable file path set.', OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_Image->fixOrientation() No readable file path set.', OC_Log::DEBUG);
return -1;
}
$exif = @exif_read_data($this->filepath, 'IFD0');
diff --git a/lib/installer.php b/lib/installer.php
index 0c776d47d5a..266c07d5c2b 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -57,7 +57,7 @@ class OC_Installer{
*/
public static function installApp( $data = array()) {
if(!isset($data['source'])) {
- OC_Log::write('core','No source specified when installing app',OC_Log::ERROR);
+ OC_Log::write('core','No source specified when installing app', OC_Log::ERROR);
return false;
}
@@ -65,13 +65,13 @@ class OC_Installer{
if($data['source']=='http') {
$path=OC_Helper::tmpFile();
if(!isset($data['href'])) {
- OC_Log::write('core','No href specified when installing app from http',OC_Log::ERROR);
+ OC_Log::write('core','No href specified when installing app from http', OC_Log::ERROR);
return false;
}
copy($data['href'], $path);
}else{
if(!isset($data['path'])) {
- OC_Log::write('core','No path specified when installing app from local file',OC_Log::ERROR);
+ OC_Log::write('core','No path specified when installing app from local file', OC_Log::ERROR);
return false;
}
$path=$data['path'];
@@ -86,7 +86,7 @@ class OC_Installer{
rename($path, $path.'.tgz');
$path.='.tgz';
}else{
- OC_Log::write('core','Archives of type '.$mime.' are not supported',OC_Log::ERROR);
+ OC_Log::write('core','Archives of type '.$mime.' are not supported', OC_Log::ERROR);
return false;
}
@@ -248,7 +248,7 @@ class OC_Installer{
* -# including appinfo/upgrade.php
* -# setting the installed version
*
- * upgrade.php can determine the current installed version of the app using "OC_Appconfig::getValue($appid,'installed_version')"
+ * upgrade.php can determine the current installed version of the app using "OC_Appconfig::getValue($appid, 'installed_version')"
*/
public static function upgradeApp( $data = array()) {
// TODO: write function
diff --git a/lib/json.php b/lib/json.php
index be37f94ca65..204430411c0 100644
--- a/lib/json.php
+++ b/lib/json.php
@@ -72,7 +72,7 @@ class OC_JSON{
public static function checkSubAdminUser() {
self::checkLoggedIn();
self::verifyUser();
- if(!OC_Group::inGroup(OC_User::getUser(),'admin') && !OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
+ if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
$l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();
diff --git a/lib/l10n.php b/lib/l10n.php
index 996ace2f57a..f172710e5d7 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -167,7 +167,7 @@ class OC_L10N{
*
*/
public function tA($textArray) {
- OC_Log::write('core', 'DEPRECATED: the method tA is deprecated and will be removed soon.',OC_Log::WARN);
+ OC_Log::write('core', 'DEPRECATED: the method tA is deprecated and will be removed soon.', OC_Log::WARN);
$result = array();
foreach($textArray as $key => $text) {
$result[$key] = (string)$this->t($text);
diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php
index d4644163ad5..ec43208d833 100644
--- a/lib/log/owncloud.php
+++ b/lib/log/owncloud.php
@@ -44,9 +44,9 @@ class OC_Log_Owncloud {
* @param int level
*/
public static function write($app, $message, $level) {
- $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ),OC_Log::ERROR);
+ $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR);
if($level>=$minLevel) {
- $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level,'time'=>time());
+ $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=>time());
$fh=fopen(self::$logFile, 'a');
fwrite($fh, json_encode($entry)."\n");
fclose($fh);
diff --git a/lib/mail.php b/lib/mail.php
index a77ac585699..c78fcce88d4 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -27,7 +27,7 @@ class OC_Mail {
* @param string $fromname
* @param bool $html
*/
- public static function send($toaddress,$toname,$subject,$mailtext,$fromaddress,$fromname,$html=0,$altbody='',$ccaddress='',$ccname='',$bcc='') {
+ public static function send($toaddress,$toname,$subject,$mailtext,$fromaddress,$fromname,$html=0,$altbody='',$ccaddress='',$ccname='', $bcc='') {
$SMTPMODE = OC_Config::getValue( 'mail_smtpmode', 'sendmail' );
$SMTPHOST = OC_Config::getValue( 'mail_smtphost', '127.0.0.1' );
diff --git a/lib/migrate.php b/lib/migrate.php
index e967ae06ecf..616417a2271 100644
--- a/lib/migrate.php
+++ b/lib/migrate.php
@@ -611,11 +611,11 @@ class OC_Migrate{
if( file_exists( $db ) ) {
// Connect to the db
if(!self::connectDB( $db )) {
- OC_Log::write('migration','Failed to connect to migration.db',OC_Log::ERROR);
+ OC_Log::write('migration','Failed to connect to migration.db', OC_Log::ERROR);
return false;
}
} else {
- OC_Log::write('migration','Migration.db not found at: '.$db, OC_Log::FATAL );
+ OC_Log::write('migration', 'Migration.db not found at: '.$db, OC_Log::FATAL );
return false;
}
diff --git a/lib/migration/content.php b/lib/migration/content.php
index eec475945a8..54982b3c847 100644
--- a/lib/migration/content.php
+++ b/lib/migration/content.php
@@ -205,7 +205,7 @@ class OC_Migration_Content{
}
closedir($dirhandle);
} else {
- OC_Log::write('admin_export',"Was not able to open directory: " . $dir,OC_Log::ERROR);
+ OC_Log::write('admin_export',"Was not able to open directory: " . $dir, OC_Log::ERROR);
return false;
}
return true;
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index 2a36cbc1239..ceeb78570fd 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -162,7 +162,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
- OC_Log::write('core','Unable to parse OCS content',OC_Log::FATAL);
+ OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);
@@ -200,7 +200,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
- OC_Log::write('core','Unable to parse OCS content',OC_Log::FATAL);
+ OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);
@@ -238,7 +238,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
- OC_Log::write('core','Unable to parse knowledgebase content',OC_Log::FATAL);
+ OC_Log::write('core','Unable to parse knowledgebase content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);
diff --git a/lib/request.php b/lib/request.php
index 87262d98625..287d20d1a5d 100644
--- a/lib/request.php
+++ b/lib/request.php
@@ -63,7 +63,7 @@ class OC_Request {
$path_info = substr($_SERVER['REQUEST_URI'], strlen($_SERVER['SCRIPT_NAME']));
// following is taken from Sabre_DAV_URLUtil::decodePathSegment
$path_info = rawurldecode($path_info);
- $encoding = mb_detect_encoding($path_info, array('UTF-8','ISO-8859-1'));
+ $encoding = mb_detect_encoding($path_info, array('UTF-8', 'ISO-8859-1'));
switch($encoding) {
@@ -98,7 +98,7 @@ class OC_Request {
$HTTP_ACCEPT_ENCODING = $_SERVER["HTTP_ACCEPT_ENCODING"];
if( strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false )
return 'x-gzip';
- else if( strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false )
+ else if( strpos($HTTP_ACCEPT_ENCODING, 'gzip') !== false )
return 'gzip';
return false;
}
diff --git a/lib/route.php b/lib/route.php
index d5233d79861..5901717c094 100644
--- a/lib/route.php
+++ b/lib/route.php
@@ -108,7 +108,7 @@ class OC_Route extends Route {
public function actionInclude($file) {
$function = create_function('$param',
'unset($param["_route"]);'
- .'$_GET=array_merge($_GET,$param);'
+ .'$_GET=array_merge($_GET, $param);'
.'unset($param);'
.'require_once "'.$file.'";');
$this->action($function);
diff --git a/lib/search.php b/lib/search.php
index 2629c5e2fbe..3c3378ad13c 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -41,7 +41,7 @@ class OC_Search{
* @param string $provider class name of a OC_Search_Provider
*/
public static function registerProvider($class, $options=array()) {
- self::$registeredProviders[]=array('class'=>$class,'options'=>$options);
+ self::$registeredProviders[]=array('class'=>$class, 'options'=>$options);
}
/**
diff --git a/lib/setup.php b/lib/setup.php
index c424ad6fb00..726b3352d50 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -95,7 +95,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'];
diff --git a/lib/streamwrappers.php b/lib/streamwrappers.php
index b5ea0a2b2eb..981c280f0dd 100644
--- a/lib/streamwrappers.php
+++ b/lib/streamwrappers.php
@@ -234,7 +234,7 @@ class OC_CloseStreamWrapper{
}
public function stream_seek($offset, $whence=SEEK_SET) {
- fseek($this->source,$offset, $whence);
+ fseek($this->source, $offset, $whence);
}
public function stream_tell() {
@@ -249,16 +249,16 @@ class OC_CloseStreamWrapper{
return fwrite($this->source, $data);
}
- public function stream_set_option($option,$arg1, $arg2) {
+ public function stream_set_option($option, $arg1, $arg2) {
switch($option) {
case STREAM_OPTION_BLOCKING:
stream_set_blocking($this->source, $arg1);
break;
case STREAM_OPTION_READ_TIMEOUT:
- stream_set_timeout($this->source,$arg1, $arg2);
+ stream_set_timeout($this->source, $arg1, $arg2);
break;
case STREAM_OPTION_WRITE_BUFFER:
- stream_set_write_buffer($this->source,$arg1, $arg2);
+ stream_set_write_buffer($this->source, $arg1, $arg2);
}
}
diff --git a/lib/template.php b/lib/template.php
index ad25dbcff51..d1cce8ad7ff 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -196,11 +196,11 @@ class OC_Template{
public static function detectFormfactor() {
// please add more useragent strings for other devices
if(isset($_SERVER['HTTP_USER_AGENT'])) {
- if(stripos($_SERVER['HTTP_USER_AGENT'],'ipad')>0) {
+ if(stripos($_SERVER['HTTP_USER_AGENT'], 'ipad')>0) {
$mode='tablet';
- }elseif(stripos($_SERVER['HTTP_USER_AGENT'],'iphone')>0) {
+ }elseif(stripos($_SERVER['HTTP_USER_AGENT'], 'iphone')>0) {
$mode='mobile';
- }elseif((stripos($_SERVER['HTTP_USER_AGENT'],'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'],'nokia')>0)) {
+ }elseif((stripos($_SERVER['HTTP_USER_AGENT'],'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) {
$mode='mobile';
}else{
$mode='default';
@@ -357,7 +357,7 @@ class OC_Template{
* @param string $text the text content for the element
*/
public function addHeader( $tag, $attributes, $text='') {
- $this->headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text);
+ $this->headers[]=array('tag'=>$tag,'attributes'=>$attributes, 'text'=>$text);
}
/**
diff --git a/lib/templatelayout.php b/lib/templatelayout.php
index c3da172a7c1..1a0570a270d 100644
--- a/lib/templatelayout.php
+++ b/lib/templatelayout.php
@@ -12,10 +12,10 @@ 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) {
- $this->assign('bodyid','body-settings', 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);
+ $this->assign('bodyid', 'body-user', false);
}
// Add navigation entry
diff --git a/lib/updater.php b/lib/updater.php
index 7d5ec4ffe90..11081eded63 100644
--- a/lib/updater.php
+++ b/lib/updater.php
@@ -30,7 +30,7 @@ class OC_Updater{
*/
public static function check() {
OC_Appconfig::setValue('core', 'lastupdatedat', microtime(true));
- if(OC_Appconfig::getValue('core', 'installedat','')=='') OC_Appconfig::setValue('core', 'installedat', 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();
diff --git a/lib/user.php b/lib/user.php
index 126f2aa3da8..be0e525d868 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -133,7 +133,7 @@ class OC_User {
self::useBackend($backend);
$_setupedBackends[]=$i;
}else{
- OC_Log::write('core','User backend '.$class.' not found.',OC_Log::ERROR);
+ OC_Log::write('core','User backend '.$class.' not found.', OC_Log::ERROR);
}
}
}
diff --git a/lib/user/database.php b/lib/user/database.php
index f39c19829e0..f33e338e2e4 100644
--- a/lib/user/database.php
+++ b/lib/user/database.php
@@ -155,7 +155,7 @@ class OC_User_Database extends OC_User_Backend {
* Get a list of all users.
*/
public function getUsers($search = '', $limit = null, $offset = null) {
- $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?)',$limit, $offset);
+ $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?)', $limit, $offset);
$result = $query->execute(array($search.'%'));
$users = array();
while ($row = $result->fetchRow()) {
diff --git a/lib/user/http.php b/lib/user/http.php
index ea055b69825..944ede73a0b 100644
--- a/lib/user/http.php
+++ b/lib/user/http.php
@@ -50,7 +50,7 @@ class OC_User_HTTP extends OC_User_Backend {
* @return boolean
*/
private function matchUrl($url) {
- return ! is_null(parse_url($url,PHP_URL_USER));
+ return ! is_null(parse_url($url, PHP_URL_USER));
}
/**
diff --git a/lib/util.php b/lib/util.php
index a9bc5c061c8..d8b926a0658 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -95,7 +95,7 @@ class OC_Util {
*/
public static function getVersion() {
// hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.90.0. This is not visible to the user
- return array(4,91, 00);
+ return array(4, 91, 00);
}
/**
@@ -157,7 +157,7 @@ class OC_Util {
* @param string $text the text content for the element
*/
public static function addHeader( $tag, $attributes, $text='') {
- self::$headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text);
+ self::$headers[]=array('tag'=>$tag,'attributes'=>$attributes, 'text'=>$text);
}
/**
@@ -186,7 +186,7 @@ class OC_Util {
* @param string $url
* @return OC_Template
*/
- public static function getPageNavi($pagecount,$page, $url) {
+ public static function getPageNavi($pagecount, $page, $url) {
$pagelinkcount=8;
if ($pagecount>1) {
@@ -217,7 +217,7 @@ class OC_Util {
$web_server_restart= false;
//check for database drivers
if(!(is_callable('sqlite_open') or class_exists('SQLite3')) and !is_callable('mysql_connect') and !is_callable('pg_connect')) {
- $errors[]=array('error'=>'No database drivers (sqlite, mysql, or postgresql) installed.<br/>','hint'=>'');//TODO: sane hint
+ $errors[]=array('error'=>'No database drivers (sqlite, mysql, or postgresql) installed.<br/>', 'hint'=>'');//TODO: sane hint
$web_server_restart= true;
}
@@ -226,13 +226,13 @@ class OC_Util {
// Check if config folder is writable.
if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
- $errors[]=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");
+ $errors[]=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");
}
// Check if there is a writable install folder.
if(OC_Config::getValue('appstoreenabled', true)) {
if( OC_App::getInstallPath() === null || !is_writable(OC_App::getInstallPath()) || !is_readable(OC_App::getInstallPath()) ) {
- $errors[]=array('error'=>"Can't write into apps directory",'hint'=>"You can usually fix this by giving the webserver user write access to the apps directory
+ $errors[]=array('error'=>"Can't write into apps directory", 'hint'=>"You can usually fix this by giving the webserver user write access to the apps directory
in owncloud or disabling the appstore in the config file.");
}
}
@@ -269,57 +269,57 @@ class OC_Util {
if(!is_dir($CONFIG_DATADIRECTORY)) {
$success=@mkdir($CONFIG_DATADIRECTORY);
if(!$success) {
- $errors[]=array('error'=>"Can't create data directory (".$CONFIG_DATADIRECTORY.")",'hint'=>"You can usually fix this by giving the webserver write access to the ownCloud directory '".OC::$SERVERROOT."' (in a terminal, use the command 'chown -R www-data:www-data /path/to/your/owncloud/install/data' ");
+ $errors[]=array('error'=>"Can't create data directory (".$CONFIG_DATADIRECTORY.")", 'hint'=>"You can usually fix this by giving the webserver write access to the ownCloud directory '".OC::$SERVERROOT."' (in a terminal, use the command 'chown -R www-data:www-data /path/to/your/owncloud/install/data' ");
}
} else if(!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) {
- $errors[]=array('error'=>'Data directory ('.$CONFIG_DATADIRECTORY.') not writable by ownCloud<br/>','hint'=>$permissionsHint);
+ $errors[]=array('error'=>'Data directory ('.$CONFIG_DATADIRECTORY.') not writable by ownCloud<br/>', 'hint'=>$permissionsHint);
}
// check if all required php modules are present
if(!class_exists('ZipArchive')) {
- $errors[]=array('error'=>'PHP module zip not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module zip not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('mb_detect_encoding')) {
- $errors[]=array('error'=>'PHP module mb multibyte not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module mb multibyte not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('ctype_digit')) {
- $errors[]=array('error'=>'PHP module ctype is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module ctype is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('json_encode')) {
- $errors[]=array('error'=>'PHP module JSON is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module JSON is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('imagepng')) {
- $errors[]=array('error'=>'PHP module GD is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module GD is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('gzencode')) {
- $errors[]=array('error'=>'PHP module zlib is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module zlib is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('iconv')) {
- $errors[]=array('error'=>'PHP module iconv is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module iconv is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(!function_exists('simplexml_load_string')) {
- $errors[]=array('error'=>'PHP module SimpleXML is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP module SimpleXML is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if(floatval(phpversion())<5.3) {
- $errors[]=array('error'=>'PHP 5.3 is required.<br/>','hint'=>'Please ask your server administrator to update PHP to version 5.3 or higher. PHP 5.2 is no longer supported by ownCloud and the PHP community.');
+ $errors[]=array('error'=>'PHP 5.3 is required.<br/>', 'hint'=>'Please ask your server administrator to update PHP to version 5.3 or higher. PHP 5.2 is no longer supported by ownCloud and the PHP community.');
$web_server_restart= false;
}
if(!defined('PDO::ATTR_DRIVER_NAME')) {
- $errors[]=array('error'=>'PHP PDO module is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.');
+ $errors[]=array('error'=>'PHP PDO module is not installed.<br/>', 'hint'=>'Please ask your server administrator to install the module.');
$web_server_restart= false;
}
if($web_server_restart) {
- $errors[]=array('error'=>'PHP modules have been installed, but they are still listed as missing?<br/>','hint'=>'Please ask your server administrator to restart the web server.');
+ $errors[]=array('error'=>'PHP modules have been installed, but they are still listed as missing?<br/>', 'hint'=>'Please ask your server administrator to restart the web server.');
}
return $errors;
diff --git a/lib/vcategories.php b/lib/vcategories.php
index ec4536673aa..46256def9c4 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -66,7 +66,7 @@ class OC_VCategories {
* @returns array containing the categories as strings.
*/
public function categories() {
- //OC_Log::write('core','OC_VCategories::categories: '.print_r($this->categories, true), OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::categories: '.print_r($this->categories, true), OC_Log::DEBUG);
if(!$this->categories) {
return array();
}
@@ -139,12 +139,12 @@ class OC_VCategories {
$this->categories = array();
}
foreach($objects as $object) {
- //OC_Log::write('core','OC_VCategories::rescan: '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::rescan: '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);
$vobject = OC_VObject::parse($object);
if(!is_null($vobject)) {
$this->loadFromVObject($vobject, $sync);
} else {
- OC_Log::write('core','OC_VCategories::rescan, unable to parse. ID: '.', '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::rescan, unable to parse. ID: '.', '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);
}
}
$this->save();
@@ -158,9 +158,9 @@ class OC_VCategories {
usort($this->categories, 'strnatcasecmp'); // usort to also renumber the keys
$escaped_categories = serialize($this->categories);
OC_Preferences::setValue($this->user, $this->app, self::PREF_CATEGORIES_LABEL, $escaped_categories);
- OC_Log::write('core','OC_VCategories::save: '.print_r($this->categories, true), OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::save: '.print_r($this->categories, true), OC_Log::DEBUG);
} else {
- OC_Log::write('core','OC_VCategories::save: $this->categories is not an array! '.print_r($this->categories, true), OC_Log::ERROR);
+ OC_Log::write('core', 'OC_VCategories::save: $this->categories is not an array! '.print_r($this->categories, true), OC_Log::ERROR);
}
}
@@ -173,37 +173,37 @@ class OC_VCategories {
if(!is_array($names)) {
$names = array($names);
}
- OC_Log::write('core','OC_VCategories::delete, before: '.print_r($this->categories, true), OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::delete, before: '.print_r($this->categories, true), OC_Log::DEBUG);
foreach($names as $name) {
- OC_Log::write('core','OC_VCategories::delete: '.$name, OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::delete: '.$name, OC_Log::DEBUG);
if($this->hasCategory($name)) {
- //OC_Log::write('core','OC_VCategories::delete: '.$name.' got it', OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::delete: '.$name.' got it', OC_Log::DEBUG);
unset($this->categories[$this->array_searchi($name, $this->categories)]);
}
}
$this->save();
- OC_Log::write('core','OC_VCategories::delete, after: '.print_r($this->categories, true), OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::delete, after: '.print_r($this->categories, true), OC_Log::DEBUG);
if(!is_null($objects)) {
foreach($objects as $key=>&$value) {
$vobject = OC_VObject::parse($value[1]);
if(!is_null($vobject)) {
$categories = $vobject->getAsArray('CATEGORIES');
- //OC_Log::write('core','OC_VCategories::delete, before: '.$key.': '.print_r($categories, true), OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::delete, before: '.$key.': '.print_r($categories, true), OC_Log::DEBUG);
foreach($names as $name) {
$idx = $this->array_searchi($name, $categories);
- //OC_Log::write('core','OC_VCategories::delete, loop: '.$name.', '.print_r($idx, true), OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::delete, loop: '.$name.', '.print_r($idx, true), OC_Log::DEBUG);
if($idx !== false) {
- OC_Log::write('core','OC_VCategories::delete, unsetting: '.$categories[$this->array_searchi($name, $categories)], OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::delete, unsetting: '.$categories[$this->array_searchi($name, $categories)], OC_Log::DEBUG);
unset($categories[$this->array_searchi($name, $categories)]);
//unset($categories[$idx]);
}
}
- //OC_Log::write('core','OC_VCategories::delete, after: '.$key.': '.print_r($categories, true), OC_Log::DEBUG);
+ //OC_Log::write('core', 'OC_VCategories::delete, after: '.$key.': '.print_r($categories, true), OC_Log::DEBUG);
$vobject->setString('CATEGORIES', implode(',', $categories));
$value[1] = $vobject->serialize();
$objects[$key] = $value;
} else {
- OC_Log::write('core','OC_VCategories::delete, unable to parse. ID: '.$value[0].', '.substr($value[1], 0, 50).'(...)', OC_Log::DEBUG);
+ OC_Log::write('core', 'OC_VCategories::delete, unable to parse. ID: '.$value[0].', '.substr($value[1], 0, 50).'(...)', OC_Log::DEBUG);
}
}
}