summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-28 10:22:59 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-28 10:22:59 -0700
commitf3c4a37a78763df5481b01be936f73ca70426ed3 (patch)
tree04ad3bfc8b696a4728f7778b8d71d2b946a3a323 /lib/public
parent7d3490036c40a0529d4d58561c15f0c59fbf9686 (diff)
parent6ad7a0336f58685f18454fd622395cf25d6908c1 (diff)
downloadnextcloud-server-f3c4a37a78763df5481b01be936f73ca70426ed3.tar.gz
nextcloud-server-f3c4a37a78763df5481b01be936f73ca70426ed3.zip
Merge pull request #3832 from owncloud/oracle_sql_fixes
for oracle use BITAND() instead of & in sharing permissions sql
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index a98cfda2089..de7025d7b15 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -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));
}