@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $fileExists = File::exists($id); |
| 14 | 14 | |
| 15 | 15 | if ($icon) { |
| 16 | - $icon_file = $fileExists ? 'z-attach.png': 'z-attach-off.png'; |
|
| 16 | + $icon_file = $fileExists ? 'z-attach.png' : 'z-attach-off.png'; |
|
| 17 | 17 | $img_src = Base_ThemeCommon::get_template_file(self::module_name(), $icon_file); |
| 18 | 18 | $icon_img = '<img src="' . $img_src . '" style="vertical-align:bottom">'; |
| 19 | 19 | } |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | $file = File::get($id); |
| 25 | 25 | |
| 26 | - if (! $fileName = $label) { |
|
| 26 | + if (!$fileName = $label) { |
|
| 27 | 27 | $fileName = ($file['name']?? '') ?: '[' . __('missing file name') . ']'; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if ($nolink || ! $file) { |
|
| 31 | - return $fileName . ($fileExists ? '': ' [' . __('missing file') . ']'); |
|
| 30 | + if ($nolink || !$file) { |
|
| 31 | + return $fileName . ($fileExists ? '' : ' [' . __('missing file') . ']'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $link_href = ''; |
@@ -49,6 +49,6 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $ret = '<a ' . $link_href . '>' . $icon_img . '<span class="file_name">' . $fileName . '</span></a>'; |
| 51 | 51 | |
| 52 | - return $inline? $ret: '<div class="file_link">'.$ret.'</div>'; |
|
| 52 | + return $inline ? $ret : '<div class="file_link">' . $ret . '</div>'; |
|
| 53 | 53 | } |
| 54 | 54 | } |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | $icon_file = $fileExists ? 'z-attach.png': 'z-attach-off.png'; |
| 17 | 17 | $img_src = Base_ThemeCommon::get_template_file(self::module_name(), $icon_file); |
| 18 | 18 | $icon_img = '<img src="' . $img_src . '" style="vertical-align:bottom">'; |
| 19 | - } |
|
| 20 | - else { |
|
| 19 | + } else { |
|
| 21 | 20 | $icon_img = ''; |
| 22 | 21 | } |
| 23 | 22 | |