Merge pull request #3832 from owncloud/oracle_sql_fixes
for oracle use BITAND() instead of & in sharing permissions sql
This commit is contained in:
commit
f3c4a37a78
1 changed files with 7 additions and 1 deletions
|
@ -662,7 +662,13 @@ class Share {
|
|||
// Remove the permissions for all reshares of this item
|
||||
if (!empty($ids)) {
|
||||
$ids = "'".implode("','", $ids)."'";
|
||||
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `permissions` = `permissions` & ?'
|
||||
// TODO this should be done with Doctrine platform objects
|
||||
if (\OC_Config::getValue( "dbtype") === 'oci') {
|
||||
$andOp = 'BITAND(`permissions`, ?)';
|
||||
} else {
|
||||
$andOp = '`permissions` & ?';
|
||||
}
|
||||
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `permissions` = '.$andOp
|
||||
.' WHERE `id` IN ('.$ids.')');
|
||||
$query->execute(array($permissions));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue