@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | { |
| 86 | 86 | $desctiption = strip_tags($event['post_row']['MESSAGE']); |
| 87 | 87 | //Facebook only displays the first 300 characters of a description, so we can cut the post text after 300 characters |
| 88 | - $this->description = (strlen($desctiption) > 300) ? preg_replace("/[^ ]*$/", '', substr($desctiption, 0, 300)) . '...' : $desctiption; |
|
| 88 | + $this->description = (strlen($desctiption) > 300) ? preg_replace("/[^ ]*$/", '', substr($desctiption, 0, 300)) . '...' : $desctiption; |
|
| 89 | 89 | $this->template->assign_vars(array( |
| 90 | 90 | 'OG_DESCRIPTION' => $this->description, |
| 91 | 91 | )); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | { |
| 272 | 272 | $handle = curl_multi_info_read($mh); |
| 273 | 273 | $content[$platform] = curl_multi_getcontent($ch); |
| 274 | - curl_multi_remove_handle($mh, $handle['handle'] ); |
|
| 274 | + curl_multi_remove_handle($mh, $handle['handle']); |
|
| 275 | 275 | } |
| 276 | 276 | curl_multi_close($mh); |
| 277 | 277 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $shares['google'] = isset($matches[1]) ? $matches[1] : 0; |
| 294 | 294 | |
| 295 | 295 | preg_match('#<span class="pluginCountTextDisconnected">([0-9]+)</span>#s', $content['facebook'], $matches); |
| 296 | - $shares['facebook'] = isset($matches[1]) ? $matches[1] : 0 ; |
|
| 296 | + $shares['facebook'] = isset($matches[1]) ? $matches[1] : 0; |
|
| 297 | 297 | |
| 298 | 298 | $pageinfo = json_decode($content['twitter'], true); |
| 299 | 299 | $shares['twitter'] = isset($pageinfo['count']) ? $pageinfo['count'] : 0; |
@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | $host = $this->request->server('HTTP_HOST'); |
| 161 | 161 | $https = $this->request->server('HTTPS'); |
| 162 | 162 | $url = ($https ? 'https://' : 'http://') . $host . '/' . $page; |
| 163 | - } |
|
| 164 | - else |
|
| 163 | + } else |
|
| 165 | 164 | { |
| 166 | 165 | $url = generate_board_url() . '/viewtopic.php?f=' . $event['topic_data']['forum_id'] . '&t=' . $event['topic_data']['topic_id']; |
| 167 | 166 | } |
@@ -304,8 +303,7 @@ discard block |
||
| 304 | 303 | // Write data to cache |
| 305 | 304 | $this->cache->put($cache_file, $shares, $cachetime); |
| 306 | 305 | return $shares; |
| 307 | - } |
|
| 308 | - else |
|
| 306 | + } else |
|
| 309 | 307 | { |
| 310 | 308 | // return data from cache |
| 311 | 309 | return $shares; |