Use boolean casting for bitwise and result.

This commit is contained in:
Andreas Fischer 2013-08-17 23:41:37 +02:00
parent 4f462e9b6f
commit 4bb0e1567b

View file

@ -133,7 +133,7 @@ if (isset($path)) {
$tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path));
$tmpl->assign('fileTarget', basename($linkItem['file_target']));
$tmpl->assign('dirToken', $linkItem['token']);
$allowPublicUploadEnabled = ($linkItem['permissions'] & OCP\PERMISSION_CREATE) !== 0;
$allowPublicUploadEnabled = (bool) ($linkItem['permissions'] & OCP\PERMISSION_CREATE);
if (\OCP\App::isEnabled('files_encryption')) {
$allowPublicUploadEnabled = false;
}