Use the new expression
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4128a08333
commit
22e74cf5ac
1 changed files with 1 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue