]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the new expression 2817/head
authorJoas Schilling <coding@schilljs.com>
Thu, 5 Jan 2017 10:45:43 +0000 (11:45 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 5 Jan 2017 13:30:25 +0000 (14:30 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Repair/RepairInvalidShares.php

index e0f66049784142bd204ac0a9933dfd20bd405b0c..04624c910dd928cdf997905c852a8528e1330471 100644 (file)
@@ -99,16 +99,7 @@ class RepairInvalidShares implements IRepairStep {
                $mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;
                $builder = $this->connection->getQueryBuilder();
 
-
-               if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
-                       $permsFunc = $builder->createFunction(
-                               'bitand(' . $builder->getColumnName('permissions') . ', ' . $mask . ')'
-                       );
-               } else {
-                       $permsFunc = $builder->createFunction(
-                               '(' . $builder->getColumnName('permissions') . ' & ' . $mask . ')'
-                       );
-               }
+               $permsFunc = $builder->expr()->bitwiseAnd('permissions', $mask);
                $builder
                        ->update('share')
                        ->set('permissions', $permsFunc)