exit();
}
}
- $basePath = substr($pathAndUser['path'] , strlen('/'.$fileOwner.'/files'));
+ $basePath = substr($pathAndUser['path'], strlen('/'.$fileOwner.'/files'));
$path = $basePath;
if (isset($_GET['path'])) {
$path .= $_GET['path'];
if($sizeDiff==0) return;
$item = OC_FileCache_Cached::get($path);
//stop walking up the filetree if we hit a non-folder or reached to root folder
- if($path == '/' || $path=='' || $item['mimetype'] !== 'httpd/unix-directory'){
+ if($path == '/' || $path=='' || $item['mimetype'] !== 'httpd/unix-directory') {
return;
}
$id = $item['id'];
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `size`=`size`+? WHERE `id`=?');
$query->execute(array($sizeDiff, $id));
$path=dirname($path);
- if($path == '' or $path =='/'){
+ if($path == '' or $path =='/') {
return;
}
$parent = OC_FileCache_Cached::get($path);
$id = $parent['id'];
//stop walking up the filetree if we hit a non-folder
- if($parent['mimetype'] !== 'httpd/unix-directory'){
+ if($parent['mimetype'] !== 'httpd/unix-directory') {
return;
}
}
if(OC::$CLI) {
return 'localhost';
}
- if(OC_Config::getValue('overwritehost', '')<>''){
+ if(OC_Config::getValue('overwritehost', '')<>'') {
return OC_Config::getValue('overwritehost');
}
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
* Returns the server protocol. It respects reverse proxy servers and load balancers
*/
public static function serverProtocol() {
- if(OC_Config::getValue('overwriteprotocol', '')<>''){
+ if(OC_Config::getValue('overwriteprotocol', '')<>'') {
return OC_Config::getValue('overwriteprotocol');
}
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$username = $_POST["username"];
$group = $_POST["group"];
-if($username == OC_User::getUser() && $group == "admin" && OC_Group::inGroup($username, 'admin')){
+if($username == OC_User::getUser() && $group == "admin" && OC_Group::inGroup($username, 'admin')) {
$l = OC_L10N::get('core');
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Admins can\'t remove themself from the admin group'))));
exit();