mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
Switch logical operators
Unless there is a good reason to keep actual ones 👀
This commit is contained in:
parent
82fc20f9d2
commit
074a9a5e88
1 changed files with 4 additions and 4 deletions
|
|
@ -151,7 +151,7 @@ class Cache implements ICache {
|
|||
$query = $this->getQueryBuilder();
|
||||
$query->selectFileCache();
|
||||
|
||||
if (is_string($file) or $file == '') {
|
||||
if (is_string($file) || $file == '') {
|
||||
// normalize file
|
||||
$file = $this->normalize($file);
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ class Cache implements ICache {
|
|||
$result->closeCursor();
|
||||
|
||||
//merge partial data
|
||||
if (!$data and is_string($file) and isset($this->partial[$file])) {
|
||||
if (!$data && is_string($file) && isset($this->partial[$file])) {
|
||||
return $this->partial[$file];
|
||||
} elseif (!$data) {
|
||||
return $data;
|
||||
|
|
@ -819,7 +819,7 @@ class Cache implements ICache {
|
|||
$this->calculateFolderSize($path, $data);
|
||||
if ($path !== '') {
|
||||
$parent = dirname($path);
|
||||
if ($parent === '.' or $parent === '/') {
|
||||
if ($parent === '.' || $parent === '/') {
|
||||
$parent = '';
|
||||
}
|
||||
if ($isBackgroundScan) {
|
||||
|
|
@ -865,7 +865,7 @@ class Cache implements ICache {
|
|||
*/
|
||||
public function calculateFolderSize($path, $entry = null) {
|
||||
$totalSize = 0;
|
||||
if (is_null($entry) or !isset($entry['fileid'])) {
|
||||
if (is_null($entry) || !isset($entry['fileid'])) {
|
||||
$entry = $this->get($path);
|
||||
}
|
||||
if (isset($entry['mimetype']) && $entry['mimetype'] === FileInfo::MIMETYPE_FOLDER) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue