@@ -629,16 +629,16 @@ |
||
| 629 | 629 | $unixTS = $this->getUnixValue(); |
| 630 | 630 | |
| 631 | 631 | if ($now > $unixTS) { |
| 632 | - $difference = $now - $unixTS; |
|
| 632 | + $difference = $now-$unixTS; |
|
| 633 | 633 | $tense = 'ago'; |
| 634 | 634 | } else { |
| 635 | - $difference = $unixTS - $now; |
|
| 635 | + $difference = $unixTS-$now; |
|
| 636 | 636 | $tense = 'from now'; |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | - for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; ++$i) { |
|
| 639 | + for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths)-1; ++$i) { |
|
| 640 | 640 | |
| 641 | - $difference = round($difference / $lengths[$i]); |
|
| 641 | + $difference = round($difference/$lengths[$i]); |
|
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | $difference = round($difference); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | foreach ($attachments[0] as $attachmentURL) { |
| 123 | 123 | $start = mb_strpos($attachmentURL, '/'); |
| 124 | 124 | $end = mb_strrpos($attachmentURL, '"'); |
| 125 | - $fileName = mb_substr($attachmentURL, $start + 1, $end - ($start + 1)); |
|
| 125 | + $fileName = mb_substr($attachmentURL, $start+1, $end-($start+1)); |
|
| 126 | 126 | |
| 127 | 127 | if (method_exists($this->BO, 'getAttachmentSecureURL')) { |
| 128 | 128 | $this->content = str_replace($attachmentURL, 'href="'.$this->BO->getAttachmentSecureURL($fileName).'" rel="nofollow"', $this->content); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $type = 'png'; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean) $config->get('cms.images.widget.secure')); |
|
| 153 | + $img = new Image($path, $image_details[0], $image_details[1], $type, 0.95, false, (boolean)$config->get('cms.images.widget.secure')); |
|
| 154 | 154 | |
| 155 | 155 | $this->content = str_replace($attachmentURL, $img->renderHTMLLink(), $this->content); |
| 156 | 156 | } else { |