diff options
author | kondou <kondou@ts.unde.re> | 2013-09-11 12:12:40 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-11 12:12:40 +0200 |
commit | 83d3df41117b1886cb728a79cb80f4722cc118c9 (patch) | |
tree | 4b37482cb28a77bd0f6557ebaf4c8eb20e4179d7 /apps/files/ajax | |
parent | c6ca9c1e9d8e25f4dad5ca18f2f335b19a4a3c0c (diff) | |
download | nextcloud-server-83d3df41117b1886cb728a79cb80f4722cc118c9.tar.gz nextcloud-server-83d3df41117b1886cb728a79cb80f4722cc118c9.zip |
Split some lines, use ===, avoid unnecessary operation
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/rawlist.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index 0541353e98a..23d9926b9fc 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -19,9 +19,7 @@ $files = array(); if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, 'httpd/unix-directory' ) as $i ) { $i["date"] = OCP\Util::formatDate($i["mtime"] ); - $i['mimetype_icon'] = ($i['type'] == 'dir') - ? \mimetype_icon('dir') - : \mimetype_icon($i['mimetype']); + $i['mimetype_icon'] = \mimetype_icon('dir'); $files[] = $i; } } @@ -30,14 +28,18 @@ if (is_array($mimetypes) && count($mimetypes)) { foreach ($mimetypes as $mimetype) { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $i ) { $i["date"] = OCP\Util::formatDate($i["mtime"]); - $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); + $i['mimetype_icon'] = $i['type'] === 'dir' ? + \mimetype_icon('dir') : + \mimetype_icon($i['mimetype']); $files[] = $i; } } } else { foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) { $i["date"] = OCP\Util::formatDate($i["mtime"]); - $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); + $i['mimetype_icon'] = $i['type'] === 'dir' ? + \mimetype_icon('dir') : + \mimetype_icon($i['mimetype']); $files[] = $i; } } |