fix merge conflicts

This commit is contained in:
Georg Ehrke 2012-06-13 11:40:00 +02:00
commit 9bdad6fdbf
5 changed files with 15 additions and 8 deletions

View File

@ -81,7 +81,7 @@
<type>text</type> <type>text</type>
<default></default> <default></default>
<notnull>false</notnull> <notnull>false</notnull>
<length>100</length> <length>255</length>
</field> </field>
<field> <field>
@ -133,7 +133,7 @@
<type>text</type> <type>text</type>
<default></default> <default></default>
<notnull>false</notnull> <notnull>false</notnull>
<length>100</length> <length>255</length>
</field> </field>
<field> <field>

View File

@ -104,10 +104,6 @@ class OC_Share {
$counter++; $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 // Update mtime of shared folder to invoke a file cache rescan
$rootView=new OC_FilesystemView('/'); $rootView=new OC_FilesystemView('/');
if (!$rootView->is_dir($sharedFolder)) { if (!$rootView->is_dir($sharedFolder)) {
@ -119,6 +115,10 @@ class OC_Share {
$rootView->mkdir($sharedFolder); $rootView->mkdir($sharedFolder);
} }
$rootView->touch($sharedFolder); $rootView->touch($sharedFolder);
if (isset($gid)) {
$uid = $uid."@".$gid;
}
$query->execute(array($uid_owner, $uid, $source, $target, $permissions));
} }
} }
} }

View File

@ -170,14 +170,18 @@ class OC_Config{
} }
$content .= ");\n?>\n"; $content .= ");\n?>\n";
$filename = OC::$SERVERROOT."/config/config.php";
// Write the file // Write the file
$result=@file_put_contents( OC::$SERVERROOT."/config/config.php", $content ); $result=@file_put_contents( $filename, $content );
if(!$result) { if(!$result) {
$tmpl = new OC_Template( '', 'error', 'guest' ); $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(); $tmpl->printPage();
exit; exit;
} }
// Prevent others not to read the config
@chmod($filename, 0640);
return true; return true;
} }
} }

View File

@ -319,6 +319,9 @@ class OC_Filesystem{
if(substr($mountpoint,-1)!=='/'){ if(substr($mountpoint,-1)!=='/'){
$mountpoint=$mountpoint.'/'; $mountpoint=$mountpoint.'/';
} }
if (self::getView() != null && $mountpoint != '/' && !self::is_dir(basename($mountpoint))) {
self::mkdir(basename($mountpoint));
}
self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments); self::$mounts[$mountpoint]=array('class'=>$class,'arguments'=>$arguments);
} }