Update database.xml to current database fields, remove hard coded MTGap when mounting shared storage provider

This commit is contained in:
Michael Gapczynski 2011-07-20 14:42:48 -04:00
parent abf6ba621a
commit 1cfa911ce3
3 changed files with 12 additions and 18 deletions

Binary file not shown.

View File

@ -8,10 +8,16 @@
<name>*dbprefix*sharing</name>
<declaration>
<field>
<name>item</name>
<name>uid_owner</name>
<type>text</type>
<notnull>true</notnull>
<length>128</length>
<length>64</length>
</field>
<field>
<name>uid_shared_with</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>source</name>
@ -26,22 +32,10 @@
<length>128</length>
</field>
<field>
<name>uid_owner</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>uid_shared_with</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>permissions</name>
<type>text</type>
<type>integer</type>
<notnull>true</notnull>
<length>3</length>
<length>1</length>
</field>
</declaration>
</table>

View File

@ -166,8 +166,8 @@ class OC_UTIL {
OC_FILESYSTEM::mount($rootStorage,'/');
// TODO add this storage provider in a proper way
$sharedStorage = OC_FILESYSTEM::createStorage('shared',array('datadir'=>'/MTGap/files/Share/'));
OC_FILESYSTEM::mount($sharedStorage,'MTGap/files/Share/');
$sharedStorage = OC_FILESYSTEM::createStorage('shared',array('datadir'=>'/'.$_SESSION['user_id'].'/files/Share/'));
OC_FILESYSTEM::mount($sharedStorage,'/'.$_SESSION['user_id'].'/files/Share/');
$CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root";
if( !is_dir( $CONFIG_DATADIRECTORY )){