Skip to content

Commit

Permalink
Fix comparisions in the trashbin app
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed May 10, 2017
1 parent e15a698 commit ef202f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function shouldMoveToTrash($path){
return false;
}

if ($this->userManager->userExists($parts[1]) && $parts[2] == 'files') {
if ($this->userManager->userExists($parts[1]) && $parts[2] === 'files') {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Trashbin.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function getUidAndFilename($filename) {
return [null, null];
}
Filesystem::initMountPoints($uid);
if ($uid != User::getUser()) {
if ($uid !== User::getUser()) {
$info = Filesystem::getFileInfo($filename);
$ownerView = new View('/' . $uid . '/files');
try {
Expand Down
4 changes: 2 additions & 2 deletions apps/testing/locking/provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ public function releaseAll(array $parameters) {
if (strpos($lock, 'locking_') === 0) {
$path = substr($lock, strlen('locking_'));

if ($type === ILockingProvider::LOCK_EXCLUSIVE && $this->config->getAppValue('testing', $lock) == ILockingProvider::LOCK_EXCLUSIVE) {
if ($type === ILockingProvider::LOCK_EXCLUSIVE && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_EXCLUSIVE) {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
} else if ($type === ILockingProvider::LOCK_SHARED && $this->config->getAppValue('testing', $lock) == ILockingProvider::LOCK_SHARED) {
} else if ($type === ILockingProvider::LOCK_SHARED && (int) $this->config->getAppValue('testing', $lock) === ILockingProvider::LOCK_SHARED) {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
} else {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
Expand Down

0 comments on commit ef202f3

Please sign in to comment.