diff --git a/apps/calendar/appinfo/database.xml b/apps/calendar/appinfo/database.xml index 5d2f415c7b..73457e6c6c 100644 --- a/apps/calendar/appinfo/database.xml +++ b/apps/calendar/appinfo/database.xml @@ -81,7 +81,7 @@ text false - 100 + 255 @@ -133,7 +133,7 @@ text false - 100 + 255 diff --git a/apps/calendar/appinfo/version b/apps/calendar/appinfo/version index ea2303bc03..2eb3c4fe4e 100644 --- a/apps/calendar/appinfo/version +++ b/apps/calendar/appinfo/version @@ -1 +1 @@ -0.5 \ No newline at end of file +0.5 diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php index cf5456d704..356c958b6c 100644 --- a/apps/files_sharing/lib_share.php +++ b/apps/files_sharing/lib_share.php @@ -104,10 +104,6 @@ class OC_Share { $counter++; } } - if (isset($gid)) { - $uid = $uid."@".$gid; - } - $query->execute(array($uid_owner, $uid, $source, $target, $permissions)); // Update mtime of shared folder to invoke a file cache rescan $rootView=new OC_FilesystemView('/'); if (!$rootView->is_dir($sharedFolder)) { @@ -119,6 +115,10 @@ class OC_Share { $rootView->mkdir($sharedFolder); } $rootView->touch($sharedFolder); + if (isset($gid)) { + $uid = $uid."@".$gid; + } + $query->execute(array($uid_owner, $uid, $source, $target, $permissions)); } } } diff --git a/lib/config.php b/lib/config.php index e3a9c11f24..9279549b1b 100644 --- a/lib/config.php +++ b/lib/config.php @@ -170,14 +170,18 @@ class OC_Config{ } $content .= ");\n?>\n"; + $filename = OC::$SERVERROOT."/config/config.php"; // Write the file - $result=@file_put_contents( OC::$SERVERROOT."/config/config.php", $content ); + $result=@file_put_contents( $filename, $content ); if(!$result) { $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->printPage(); exit; } + // Prevent others not to read the config + @chmod($filename, 0640); + return true; } } diff --git a/lib/filesystem.php b/lib/filesystem.php index 454bb1aa81..dd74daffa4 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -319,6 +319,9 @@ class OC_Filesystem{ if(substr($mountpoint,-1)!=='/'){ $mountpoint=$mountpoint.'/'; } + if (self::getView() != null && $mountpoint != '/' && !self::is_dir(basename($mountpoint))) { + self::mkdir(basename($mountpoint)); + } self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments); }