summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MDB2/Driver/Function/sqlite3.php2
-rw-r--r--lib/connector/sabre/locks.php2
-rw-r--r--lib/filecache.php6
-rw-r--r--lib/filestorage/common.php2
-rw-r--r--lib/filestorage/local.php4
-rw-r--r--lib/filesystem.php4
-rw-r--r--lib/filesystemview.php2
-rw-r--r--lib/helper.php10
-rw-r--r--lib/installer.php2
-rw-r--r--lib/search/provider/file.php2
-rw-r--r--lib/setup.php6
-rw-r--r--lib/streamwrappers.php8
-rw-r--r--lib/templatelayout.php4
-rw-r--r--lib/updater.php6
-rw-r--r--lib/user.php4
-rwxr-xr-xlib/util.php4
-rw-r--r--lib/vcategories.php2
17 files changed, 35 insertions, 35 deletions
diff --git a/lib/MDB2/Driver/Function/sqlite3.php b/lib/MDB2/Driver/Function/sqlite3.php
index 235a106e183..0bddde5bf3f 100644
--- a/lib/MDB2/Driver/Function/sqlite3.php
+++ b/lib/MDB2/Driver/Function/sqlite3.php
@@ -94,7 +94,7 @@ class MDB2_Driver_Function_sqlite3 extends MDB2_Driver_Function_Common
if (!is_null($length)) {
return "substr($value,$position,$length)";
}
- return "substr($value,$position,length($value))";
+ return "substr($value, $position, length($value))";
}
// }}}
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php
index dbcc57558e0..8ebe324602c 100644
--- a/lib/connector/sabre/locks.php
+++ b/lib/connector/sabre/locks.php
@@ -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;
diff --git a/lib/filecache.php b/lib/filecache.php
index f768ea8cec8..fee3b398251 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -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));
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 7028df1eb02..f24a5704913 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -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)) {
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 80aa548047c..731ac4a3c72 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -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)) {
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 09ccf9de4df..bc30dac7fa1 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -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;
}
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index 776c859412f..872da992fab 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -588,7 +588,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;
diff --git a/lib/helper.php b/lib/helper.php
index b79955aa9bf..b7166e9fb41 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -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;
}
diff --git a/lib/installer.php b/lib/installer.php
index 56e474bb3b3..83d082b804a 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -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);
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index 8d0843ce2d2..0d4b332b792 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -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) {
diff --git a/lib/setup.php b/lib/setup.php
index 3c92e9c5599..62d31fd544f 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -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');
diff --git a/lib/streamwrappers.php b/lib/streamwrappers.php
index 1e5b19a11f0..63b795f4c4d 100644
--- a/lib/streamwrappers.php
+++ b/lib/streamwrappers.php
@@ -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);
}
}
diff --git a/lib/templatelayout.php b/lib/templatelayout.php
index 78893457f47..c3da172a7c1 100644
--- a/lib/templatelayout.php
+++ b/lib/templatelayout.php
@@ -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');
diff --git a/lib/updater.php b/lib/updater.php
index 483570b050a..f55e55985d9 100644
--- a/lib/updater.php
+++ b/lib/updater.php
@@ -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');
}
diff --git a/lib/user.php b/lib/user.php
index eff93b501bb..064fcbad96f 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -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);
diff --git a/lib/util.php b/lib/util.php
index 75991d685c6..907b4554037 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -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);
diff --git a/lib/vcategories.php b/lib/vcategories.php
index 6b1d6a316f1..ba6569a244d 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -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));
}
}