Merge pull request #8890 from owncloud/cleanup-trashsizes-table-master

table files_trashsizes was still used in some locations -> removed
This commit is contained in:
Thomas Müller 2014-06-05 13:00:50 +02:00
commit f955209a5a
2 changed files with 2 additions and 33 deletions

View File

@ -89,30 +89,4 @@
</table>
<table>
<name>*dbprefix*files_trashsize</name>
<declaration>
<field>
<name>user</name>
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>size</name>
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>50</length>
</field>
</declaration>
</table>
</database>

View File

@ -655,17 +655,12 @@ class Trashbin {
/**
* deletes used space for trash bin in db if user was deleted
*
* @param type $uid id of deleted user
* @param string $uid id of deleted user
* @return bool result of db delete operation
*/
public static function deleteUser($uid) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=?');
$result = $query->execute(array($uid));
if ($result) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trashsize` WHERE `user`=?');
return $query->execute(array($uid));
}
return false;
return $query->execute(array($uid));
}
/**