NoSpaceAfterComma II
This commit is contained in:
parent
e73b817a38
commit
561cbb2de6
|
@ -42,13 +42,13 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(is_null(self::$blackList)) {
|
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)) {
|
if(self::isEncrypted($path)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$extension=substr($path,strrpos($path,'.')+1);
|
$extension=substr($path, strrpos($path, '.')+1);
|
||||||
if(array_search($extension,self::$blackList)===false) {
|
if(array_search($extension, self::$blackList)===false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tmpl = new OCP\Template( 'files_encryption', 'settings');
|
$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');
|
$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true');
|
||||||
$tmpl->assign('blacklist',$blackList);
|
$tmpl->assign('blacklist',$blackList);
|
||||||
$tmpl->assign('encryption_enabled',$enabled);
|
$tmpl->assign('encryption_enabled',$enabled);
|
||||||
|
|
|
@ -225,7 +225,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
||||||
$path1=$this->cleanPath($path1);
|
$path1=$this->cleanPath($path1);
|
||||||
$path2=$this->root.$this->cleanPath($path2);
|
$path2=$this->root.$this->cleanPath($path2);
|
||||||
try{
|
try{
|
||||||
$response=$this->client->request('MOVE',$path1,null, array('Destination'=>$path2));
|
$response=$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
|
||||||
return true;
|
return true;
|
||||||
}catch(Exception $e) {
|
}catch(Exception $e) {
|
||||||
echo $e;
|
echo $e;
|
||||||
|
@ -239,7 +239,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
||||||
$path1=$this->cleanPath($path1);
|
$path1=$this->cleanPath($path1);
|
||||||
$path2=$this->root.$this->cleanPath($path2);
|
$path2=$this->root.$this->cleanPath($path2);
|
||||||
try{
|
try{
|
||||||
$response=$this->client->request('COPY',$path1,null, array('Destination'=>$path2));
|
$response=$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
|
||||||
return true;
|
return true;
|
||||||
}catch(Exception $e) {
|
}catch(Exception $e) {
|
||||||
echo $e;
|
echo $e;
|
||||||
|
|
|
@ -94,7 +94,7 @@ class MDB2_Driver_Function_sqlite3 extends MDB2_Driver_Function_Common
|
||||||
if (!is_null($length)) {
|
if (!is_null($length)) {
|
||||||
return "substr($value,$position,$length)";
|
return "substr($value,$position,$length)";
|
||||||
}
|
}
|
||||||
return "substr($value,$position,length($value))";
|
return "substr($value, $position, length($value))";
|
||||||
}
|
}
|
||||||
|
|
||||||
// }}}
|
// }}}
|
||||||
|
|
|
@ -102,7 +102,7 @@ class OC_FileCache{
|
||||||
$data['versioned']=(int)$data['versioned'];
|
$data['versioned']=(int)$data['versioned'];
|
||||||
$user=OC_User::getUser();
|
$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(?,?,?,?,?,?,?,?,?,?,?,?,?)');
|
$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)) {
|
if(OC_DB::isError($result)) {
|
||||||
OC_Log::write('files', 'error while writing file('.$fullpath.') to cache', OC_Log::ERROR);
|
OC_Log::write('files', 'error while writing file('.$fullpath.') to cache', OC_Log::ERROR);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ class OC_FileCache{
|
||||||
$newPath=$root.$newPath;
|
$newPath=$root.$newPath;
|
||||||
$newParent=self::getParentId($newPath);
|
$newParent=self::getParentId($newPath);
|
||||||
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `parent`=? ,`name`=?, `path`=?, `path_hash`=? WHERE `path_hash`=?');
|
$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)) {
|
if(($cache=OC_Cache::getUserCache(true)) && $cache->hasKey('fileid/'.$oldPath)) {
|
||||||
$cache->set('fileid/'.$newPath, $cache->get('fileid/'.$oldPath));
|
$cache->set('fileid/'.$newPath, $cache->get('fileid/'.$oldPath));
|
||||||
|
@ -176,7 +176,7 @@ class OC_FileCache{
|
||||||
while($row= $query->execute(array($oldPath.'/%'))->fetchRow()) {
|
while($row= $query->execute(array($oldPath.'/%'))->fetchRow()) {
|
||||||
$old=$row['path'];
|
$old=$row['path'];
|
||||||
$new=$newPath.substr($old, $oldLength);
|
$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)) {
|
if(($cache=OC_Cache::getUserCache(true)) && $cache->hasKey('fileid/'.$old)) {
|
||||||
$cache->set('fileid/'.$new, $cache->get('fileid/'.$old));
|
$cache->set('fileid/'.$new, $cache->get('fileid/'.$old));
|
||||||
|
|
|
@ -38,7 +38,7 @@ class OC_TemplateLayout extends OC_Template {
|
||||||
foreach(OC_App::getEnabledApps() as $app) {
|
foreach(OC_App::getEnabledApps() as $app) {
|
||||||
$apps_paths[$app] = OC_App::getAppWebPath($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)) {
|
if (OC_Config::getValue('installed', false) && !OC_AppConfig::getValue('core', 'remote_core.css', false)) {
|
||||||
OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
|
OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
|
||||||
|
|
Loading…
Reference in New Issue