diff options
-rw-r--r-- | apps/files_external/lib/google.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/irods.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/smb.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/index.php | 2 | ||||
-rw-r--r-- | lib/app.php | 2 | ||||
-rw-r--r-- | lib/archive.php | 2 | ||||
-rw-r--r-- | lib/cache/file.php | 4 | ||||
-rw-r--r-- | lib/cache/fileglobal.php | 4 | ||||
-rw-r--r-- | lib/files/cache/scanner.php | 2 | ||||
-rw-r--r-- | lib/files/storage/common.php | 6 | ||||
-rw-r--r-- | lib/files/view.php | 2 | ||||
-rw-r--r-- | lib/installer.php | 2 |
12 files changed, 17 insertions, 17 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index ef8dd6d8cad..b27b9ae3f32 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -206,7 +206,7 @@ class Google extends \OC\Files\Storage\Common { public function rmdir($path) { if (trim($path, '/') === '') { $dir = $this->opendir($path); - while ($file = readdir($dir)) { + while (($file = readdir($dh)) !== false) { if (!\OC\Files\Filesystem::isIgnoredDir($file)) { if (!$this->unlink($path.'/'.$file)) { return false; @@ -587,4 +587,4 @@ class Google extends \OC\Files\Storage\Common { return false; } -}
\ No newline at end of file +} diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php index a343ac5fb27..7ec3b3a0cfc 100644 --- a/apps/files_external/lib/irods.php +++ b/apps/files_external/lib/irods.php @@ -137,7 +137,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ private function collectionMTime($path) { $dh = $this->opendir($path); $lastCTime = $this->filemtime($path); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if ($file != '.' and $file != '..') { $time = $this->filemtime($file); if ($time > $lastCTime) { diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 655c3c9a816..dd265cada1c 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -89,7 +89,7 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ private function shareMTime() { $dh=$this->opendir(''); $lastCtime=0; - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if ($file!='.' and $file!='..') { $ctime=$this->filemtime($file); if ($ctime>$lastCtime) { diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php index a32b7414ac6..72a9c2bbcb0 100644 --- a/apps/files_trashbin/index.php +++ b/apps/files_trashbin/index.php @@ -23,7 +23,7 @@ if ($dir) { $dirlisting = true; $dirContent = $view->opendir($dir); $i = 0; - while($entryName = readdir($dirContent)) { + while(($entryName = readdir($dirContent)) !== false) { if ( $entryName != '.' && $entryName != '..' ) { $pos = strpos($dir.'/', '/', 1); $tmp = substr($dir, 0, $pos); diff --git a/lib/app.php b/lib/app.php index 908405fe3a7..bca0e5e05fc 100644 --- a/lib/app.php +++ b/lib/app.php @@ -674,7 +674,7 @@ class OC_App{ } $dh = opendir( $apps_dir['path'] ); - while( $file = readdir( $dh ) ) { + while (($file = readdir($dh)) !== false) { if ($file[0] != '.' and is_file($apps_dir['path'].'/'.$file.'/appinfo/app.php')) { diff --git a/lib/archive.php b/lib/archive.php index 61239c82076..e0438041dab 100644 --- a/lib/archive.php +++ b/lib/archive.php @@ -121,7 +121,7 @@ abstract class OC_Archive{ function addRecursive($path, $source) { if($dh=opendir($source)) { $this->addFolder($path); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file=='.' or $file=='..') { continue; } diff --git a/lib/cache/file.php b/lib/cache/file.php index ba3dedaf8f3..9fee6034a71 100644 --- a/lib/cache/file.php +++ b/lib/cache/file.php @@ -80,7 +80,7 @@ class OC_Cache_File{ $storage = $this->getStorage(); if($storage and $storage->is_dir('/')) { $dh=$storage->opendir('/'); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) { $storage->unlink('/'.$file); } @@ -94,7 +94,7 @@ class OC_Cache_File{ if($storage and $storage->is_dir('/')) { $now = time(); $dh=$storage->opendir('/'); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..') { $mtime = $storage->filemtime('/'.$file); if ($mtime < $now) { diff --git a/lib/cache/fileglobal.php b/lib/cache/fileglobal.php index 6d01964e185..2fbd8ca3edb 100644 --- a/lib/cache/fileglobal.php +++ b/lib/cache/fileglobal.php @@ -69,7 +69,7 @@ class OC_Cache_FileGlobal{ $prefix = $this->fixKey($prefix); if($cache_dir and is_dir($cache_dir)) { $dh=opendir($cache_dir); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..' and ($prefix==='' || strpos($file, $prefix) === 0)) { unlink($cache_dir.$file); } @@ -88,7 +88,7 @@ class OC_Cache_FileGlobal{ $cache_dir = self::getCacheDir(); if($cache_dir and is_dir($cache_dir)) { $dh=opendir($cache_dir); - while($file=readdir($dh)) { + while (($file = readdir($dh)) !== false) { if($file!='.' and $file!='..') { $mtime = filemtime($cache_dir.$file); if ($mtime < $now) { diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index 0c510eee96f..e2f414be952 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -157,7 +157,7 @@ class Scanner extends BasicEmitter { $newChildren = array(); if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) { \OC_DB::beginTransaction(); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { $child = ($path) ? $path . '/' . $file : $file; if (!Filesystem::isIgnoredDir($file)) { $newChildren[] = $file; diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index f2651f77070..36f8c587f38 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -141,7 +141,7 @@ abstract class Common implements \OC\Files\Storage\Storage { return false; } else { $directoryHandle = $this->opendir($directory); - while ($contents = readdir($directoryHandle)) { + while (($contents = readdir($directoryHandle)) !== false) { if (!\OC\Files\Filesystem::isIgnoredDir($contents)) { $path = $directory . '/' . $contents; if ($this->is_dir($path)) { @@ -224,7 +224,7 @@ abstract class Common implements \OC\Files\Storage\Storage { private function addLocalFolder($path, $target) { if ($dh = $this->opendir($path)) { - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if ($file !== '.' and $file !== '..') { if ($this->is_dir($path . '/' . $file)) { mkdir($target . '/' . $file); @@ -242,7 +242,7 @@ abstract class Common implements \OC\Files\Storage\Storage { $files = array(); $dh = $this->opendir($dir); if ($dh) { - while ($item = readdir($dh)) { + while (($item = readdir($dh)) !== false) { if ($item == '.' || $item == '..') continue; if (strstr(strtolower($item), strtolower($query)) !== false) { $files[] = $dir . '/' . $item; diff --git a/lib/files/view.php b/lib/files/view.php index 1753d9a89ba..37e2a93733e 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -489,7 +489,7 @@ class View { } else { if ($this->is_dir($path1) && ($dh = $this->opendir($path1))) { $result = $this->mkdir($path2); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { $result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file); } diff --git a/lib/installer.php b/lib/installer.php index 4ddfd17660d..cbca19b1565 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -109,7 +109,7 @@ class OC_Installer{ if(!is_file($extractDir.'/appinfo/info.xml')) { //try to find it in a subdir $dh=opendir($extractDir); - while($folder=readdir($dh)) { + while (($folder = readdir($dh)) !== false) { if($folder[0]!='.' and is_dir($extractDir.'/'.$folder)) { if(is_file($extractDir.'/'.$folder.'/appinfo/info.xml')) { $extractDir.='/'.$folder; |