@@ -137,8 +137,9 @@ discard block |
||
| 137 | 137 | protected function MustacheRender($items, $mustache_template) |
| 138 | 138 | { |
| 139 | 139 | $m = new \Mustache_Engine(array('escape' => function($value) { |
| 140 | - if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value) |
|
| 141 | - return str_replace('*[[DONOTESCAPE]]*', '', $value); |
|
| 140 | + if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value) { |
|
| 141 | + return str_replace('*[[DONOTESCAPE]]*', '', $value); |
|
| 142 | + } |
|
| 142 | 143 | return htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); |
| 143 | 144 | })); |
| 144 | 145 | return $m->render($mustache_template, $items); |
@@ -163,8 +164,9 @@ discard block |
||
| 163 | 164 | $jpeg_already_set = false; |
| 164 | 165 | foreach ($ct_file as $ct) |
| 165 | 166 | { |
| 166 | - if ((string) $ct_file->Default[$i]['Extension'] == "jpeg") |
|
| 167 | - $jpeg_already_set = true; |
|
| 167 | + if ((string) $ct_file->Default[$i]['Extension'] == "jpeg") { |
|
| 168 | + $jpeg_already_set = true; |
|
| 169 | + } |
|
| 168 | 170 | $i++; |
| 169 | 171 | } |
| 170 | 172 | |
@@ -293,10 +295,11 @@ discard block |
||
| 293 | 295 | $img_rework = \Image::make($this->storagePath($this->local_path.'word/media/'.$imgs[$k]['img_file_src'])); |
| 294 | 296 | $w = $img['width']; |
| 295 | 297 | $h = $img['height']; |
| 296 | - if ($w > $h) |
|
| 297 | - $h = null; |
|
| 298 | - else |
|
| 299 | - $w = null; |
|
| 298 | + if ($w > $h) { |
|
| 299 | + $h = null; |
|
| 300 | + } else { |
|
| 301 | + $w = null; |
|
| 302 | + } |
|
| 300 | 303 | $img_rework->resize($w, $h, function($constraint) { |
| 301 | 304 | $constraint->aspectRatio(); |
| 302 | 305 | $constraint->upsize(); |