@@ -124,7 +124,7 @@ |
||
| 124 | 124 | $path = explode('passman/', $iconPath); |
| 125 | 125 | $mime = mime_content_type($iconPath); |
| 126 | 126 | //print_r($path); |
| 127 | - if($mime !== 'directory') { |
|
| 127 | + if ($mime !== 'directory') { |
|
| 128 | 128 | $icon = []; |
| 129 | 129 | $icon['mimetype'] = mime_content_type($iconPath); |
| 130 | 130 | $icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]); |
@@ -55,20 +55,20 @@ |
||
| 55 | 55 | * @param $uid |
| 56 | 56 | * @return string |
| 57 | 57 | */ |
| 58 | - public static function getNameByUid($uid){ |
|
| 58 | + public static function getNameByUid($uid) { |
|
| 59 | 59 | $um = \OC::$server->getUserManager(); |
| 60 | 60 | $u = $um->get($uid); |
| 61 | 61 | return $u->getDisplayName(); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - public static function getDirContents($dir, &$results = array()){ |
|
| 64 | + public static function getDirContents($dir, &$results = array()) { |
|
| 65 | 65 | $files = scandir($dir); |
| 66 | 66 | |
| 67 | - foreach($files as $key => $value){ |
|
| 68 | - $path = realpath($dir.DIRECTORY_SEPARATOR.$value); |
|
| 69 | - if(!is_dir($path)) { |
|
| 67 | + foreach ($files as $key => $value) { |
|
| 68 | + $path = realpath($dir . DIRECTORY_SEPARATOR . $value); |
|
| 69 | + if (!is_dir($path)) { |
|
| 70 | 70 | $results[] = $path; |
| 71 | - } else if($value != "." && $value != "..") { |
|
| 71 | + } else if ($value != "." && $value != "..") { |
|
| 72 | 72 | Utils::getDirContents($path, $results); |
| 73 | 73 | $results[] = $path; |
| 74 | 74 | } |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | * @return string |
| 44 | 44 | */ |
| 45 | 45 | public static function GUID() { |
| 46 | - if (function_exists('com_create_guid') === true) |
|
| 47 | - { |
|
| 46 | + if (function_exists('com_create_guid') === true) { |
|
| 48 | 47 | return trim(com_create_guid(), '{}'); |
| 49 | 48 | } |
| 50 | 49 | |
@@ -55,16 +54,16 @@ discard block |
||
| 55 | 54 | * @param $uid |
| 56 | 55 | * @return string |
| 57 | 56 | */ |
| 58 | - public static function getNameByUid($uid){ |
|
| 57 | + public static function getNameByUid($uid) { |
|
| 59 | 58 | $um = \OC::$server->getUserManager(); |
| 60 | 59 | $u = $um->get($uid); |
| 61 | 60 | return $u->getDisplayName(); |
| 62 | 61 | } |
| 63 | 62 | |
| 64 | - public static function getDirContents($dir, &$results = array()){ |
|
| 63 | + public static function getDirContents($dir, &$results = array()) { |
|
| 65 | 64 | $files = scandir($dir); |
| 66 | 65 | |
| 67 | - foreach($files as $key => $value){ |
|
| 66 | + foreach($files as $key => $value) { |
|
| 68 | 67 | $path = realpath($dir.DIRECTORY_SEPARATOR.$value); |
| 69 | 68 | if(!is_dir($path)) { |
| 70 | 69 | $results[] = $path; |