@@ -16,4 +16,4 @@ |
||
| 16 | 16 | * @license http://www.opensource.org/licenses/mit-license.php MIT License |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; |
|
| 19 | +require 'webroot'.DIRECTORY_SEPARATOR.'index.php'; |
|
@@ -105,4 +105,4 @@ |
||
| 105 | 105 | * Load the CakePHP default routes. Only remove this if you do not want to use |
| 106 | 106 | * the built-in default routes. |
| 107 | 107 | */ |
| 108 | - require CAKE . 'Config' . DS . 'routes.php'; |
|
| 108 | + require CAKE.'Config'.DS.'routes.php'; |
|
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include App::path('Lib')[0] . 'BaseFunctions.php'; |
|
| 3 | +include App::path('Lib')[0].'BaseFunctions.php'; |
|
| 4 | 4 | |
| 5 | 5 | // Load Composer autoload. |
| 6 | -require ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'autoload.php'; |
|
| 6 | +require ROOT.DS.APP_DIR.DS.'Vendor'.DS.'autoload.php'; |
|
| 7 | 7 | Cake2ComposerAutoloadFix(); |
| 8 | 8 | |
| 9 | 9 | /** |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | /** |
| 211 | 211 | * Check if the forum is installed |
| 212 | 212 | */ |
| 213 | -if ( file_exists(APP . 'Config' . DS . 'installed.txt') ) : |
|
| 213 | +if (file_exists(APP.'Config'.DS.'installed.txt')) : |
|
| 214 | 214 | Configure::write('Saito.installed', TRUE); |
| 215 | 215 | else : |
| 216 | 216 | Configure::write('Saito.installed', FALSE); |
@@ -337,8 +337,8 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | Cache::config('_cake_core_', array( |
| 339 | 339 | 'engine' => $engine, |
| 340 | - 'prefix' => $prefix . 'cake_core_', |
|
| 341 | - 'path' => CACHE . 'persistent' . DS, |
|
| 340 | + 'prefix' => $prefix.'cake_core_', |
|
| 341 | + 'path' => CACHE.'persistent'.DS, |
|
| 342 | 342 | 'serialize' => ($engine === 'File'), |
| 343 | 343 | 'duration' => $duration |
| 344 | 344 | )); |
@@ -349,8 +349,8 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | Cache::config('_cake_model_', array( |
| 351 | 351 | 'engine' => $engine, |
| 352 | - 'prefix' => $prefix . 'cake_model_', |
|
| 353 | - 'path' => CACHE . 'models' . DS, |
|
| 352 | + 'prefix' => $prefix.'cake_model_', |
|
| 353 | + 'path' => CACHE.'models'.DS, |
|
| 354 | 354 | 'serialize' => ($engine === 'File'), |
| 355 | 355 | 'duration' => $duration |
| 356 | 356 | )); |
@@ -26,18 +26,18 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | if ($lastAction !== 'add'): |
| 28 | 28 | if ($this->Session->read('paginator.lastPage')): |
| 29 | - $indexPage .= '/page:' . $this->Session->read('paginator.lastPage'); |
|
| 29 | + $indexPage .= '/page:'.$this->Session->read('paginator.lastPage'); |
|
| 30 | 30 | endif; |
| 31 | 31 | endif; |
| 32 | - $indexPage .= '/jump:' . $tid; |
|
| 32 | + $indexPage .= '/jump:'.$tid; |
|
| 33 | 33 | |
| 34 | 34 | return $indexPage; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function getFastLink($entry, $params = array('class' => '')) { |
| 38 | 38 | // @todo @performance |
| 39 | - $out = "<a href='{$this->request->webroot}entries/view/{$entry['Entry']['id']}' class='{$params['class']}'>" . |
|
| 40 | - $this->getSubject($this->dic->newInstance('\Saito\Posting\Posting', ['rawData' => $entry])) . '</a>'; |
|
| 39 | + $out = "<a href='{$this->request->webroot}entries/view/{$entry['Entry']['id']}' class='{$params['class']}'>". |
|
| 40 | + $this->getSubject($this->dic->newInstance('\Saito\Posting\Posting', ['rawData' => $entry])).'</a>'; |
|
| 41 | 41 | return $out; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | public function renderThread(&$tree, array $options = []) { |
| 74 | 74 | $options += [ |
| 75 | 75 | 'lineCache' => $this->_View->get('LineCache'), |
| 76 | - 'maxThreadDepthIndent' => (int)Configure::read('Saito.Settings.thread_depth_indent'), |
|
| 76 | + 'maxThreadDepthIndent' => (int) Configure::read('Saito.Settings.thread_depth_indent'), |
|
| 77 | 77 | 'renderer' => 'thread', |
| 78 | 78 | 'rootWrap' => false |
| 79 | 79 | ]; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $_nErrorsToShow = 20; |
| 79 | 79 | $errors = preg_split('/(?=^\d{4}-\d{2}-\d{2})/m', $log, -1, PREG_SPLIT_NO_EMPTY); |
| 80 | 80 | if (empty($errors)) { |
| 81 | - return '<p>' . __('No log file found.') . '</p>'; |
|
| 81 | + return '<p>'.__('No log file found.').'</p>'; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $out = ''; |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | $_i = self::tagId(); |
| 90 | 90 | $_details = $e->details(); |
| 91 | 91 | if (!empty($_details)) { |
| 92 | - $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#' . $_i . '\').toggle(); return false;">' . __('Details') . '</button>' . "\n"; |
|
| 92 | + $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#'.$_i.'\').toggle(); return false;">'.__('Details').'</button>'."\n"; |
|
| 93 | 93 | } |
| 94 | - $out .= '<pre style="font-size: 10px;">' . "\n"; |
|
| 94 | + $out .= '<pre style="font-size: 10px;">'."\n"; |
|
| 95 | 95 | $out .= '<div class="row"><div class="span2" style="text-align: right">'; |
| 96 | 96 | $out .= $this->TimeH->formatTime($e->time(), 'eng'); |
| 97 | 97 | |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | $out .= '<div class="span7">'; |
| 100 | 100 | $out .= $e->message(); |
| 101 | 101 | if (!empty($_details)) { |
| 102 | - $out .= '<span id="' . $_i . '" style="display: none;">' . "\n"; |
|
| 102 | + $out .= '<span id="'.$_i.'" style="display: none;">'."\n"; |
|
| 103 | 103 | $out .= $_details; |
| 104 | 104 | $out .= '</span>'; |
| 105 | 105 | } |
| 106 | 106 | $out .= '</div></div>'; |
| 107 | - $out .= '</pre>' . "\n"; |
|
| 107 | + $out .= '</pre>'."\n"; |
|
| 108 | 108 | if ($k++ > $_nErrorsToShow) { |
| 109 | 109 | break; |
| 110 | 110 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | protected $_assetsIncluded = false; |
| 18 | 18 | |
| 19 | 19 | public function beforeRender($viewFile) { |
| 20 | - $this->_apiEnabled = (bool)Configure::read('Saito.Settings.map_enabled'); |
|
| 20 | + $this->_apiEnabled = (bool) Configure::read('Saito.Settings.map_enabled'); |
|
| 21 | 21 | if (!$this->_apiEnabled) { |
| 22 | 22 | return; |
| 23 | 23 | } |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | $this->Html->script([ |
| 37 | 37 | '../dist/leaflet/leaflet.js', |
| 38 | 38 | '../dist/leaflet/leaflet.markercluster.js', |
| 39 | - '//open.mapquestapi.com/sdk/leaflet/v1.0/mq-map.js?key=' . $this->_apiKey, |
|
| 40 | - '//open.mapquestapi.com/sdk/leaflet/v1.0/mq-geocoding.js?key=' . $this->_apiKey |
|
| 39 | + '//open.mapquestapi.com/sdk/leaflet/v1.0/mq-map.js?key='.$this->_apiKey, |
|
| 40 | + '//open.mapquestapi.com/sdk/leaflet/v1.0/mq-geocoding.js?key='.$this->_apiKey |
|
| 41 | 41 | ], |
| 42 | 42 | ['inline' => false, 'block' => 'script-head']); |
| 43 | 43 | $this->_assetsIncluded = true; |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | // @performance |
| 77 | 77 | // filter out every field except the place fields |
| 78 | 78 | $users[$key] = [ |
| 79 | - 'id' => (int)$user['User']['id'], |
|
| 79 | + 'id' => (int) $user['User']['id'], |
|
| 80 | 80 | 'name' => $user['User']['username'], |
| 81 | - 'lat' => (float)$user['User']['user_place_lat'], |
|
| 82 | - 'lng' => (float)$user['User']['user_place_lng'] |
|
| 81 | + 'lat' => (float) $user['User']['user_place_lat'], |
|
| 82 | + 'lng' => (float) $user['User']['user_place_lng'] |
|
| 83 | 83 | ]; |
| 84 | 84 | if ($edit) { |
| 85 | - $users[$key]['zoom'] = (int)$user['User']['user_place_zoom']; |
|
| 85 | + $users[$key]['zoom'] = (int) $user['User']['user_place_zoom']; |
|
| 86 | 86 | } else { |
| 87 | 87 | // add simple jitter |
| 88 | 88 | $rand = 0; // rand(-9,9) / pow(10, $this->_precision + 1); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return '<style type="text/css">' . implode(" ", $_styles) . '</style>'; |
|
| 56 | + return '<style type="text/css">'.implode(" ", $_styles).'</style>'; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $out = $url; |
| 101 | 101 | if (is_string($url)) { |
| 102 | 102 | if (substr($url, 0, 4) == 'www.') { |
| 103 | - $url = 'http://' . $url; |
|
| 103 | + $url = 'http://'.$url; |
|
| 104 | 104 | } |
| 105 | 105 | if (substr($url, 0, 4) == 'http') { |
| 106 | 106 | $out = $this->Html->link( |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | protected $_themeImgUrl = null; |
| 14 | 14 | |
| 15 | 15 | public function beforeRender($viewFile) { |
| 16 | - $this->_themeImgUrl = $this->request->webroot . 'theme' . DS . $this->theme . |
|
| 17 | - DS . Configure::read('App.imageBaseUrl'); |
|
| 16 | + $this->_themeImgUrl = $this->request->webroot.'theme'.DS.$this->theme. |
|
| 17 | + DS.Configure::read('App.imageBaseUrl'); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function beforeLayout($layoutFile) { |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | public function jQueryTag() { |
| 30 | 30 | $url = 'dist/'; |
| 31 | 31 | $name = 'jquery'; |
| 32 | - if ((int)Configure::read('debug') === 0) { |
|
| 33 | - $name = $name . '.min'; |
|
| 32 | + if ((int) Configure::read('debug') === 0) { |
|
| 33 | + $name = $name.'.min'; |
|
| 34 | 34 | } |
| 35 | - return $this->Html->script($this->Html->assetUrl($url . $name, |
|
| 35 | + return $this->Html->script($this->Html->assetUrl($url.$name, |
|
| 36 | 36 | ['ext' => '.js', 'fullBase' => true])); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | 'title' => Configure::read('Saito.Settings.forum_name') |
| 70 | 70 | ]; |
| 71 | 71 | $html = []; |
| 72 | - $html[] = '<meta name="application-name" content="' . h($options['title']) . '"/>'; |
|
| 72 | + $html[] = '<meta name="application-name" content="'.h($options['title']).'"/>'; |
|
| 73 | 73 | if (isset($options['color'])) { |
| 74 | - $html[] = '<meta name="msapplication-TileColor" content="' . $options['color'] . '"/>'; |
|
| 74 | + $html[] = '<meta name="msapplication-TileColor" content="'.$options['color'].'"/>'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $_basename = $options['baseName']; |
| 78 | 78 | $url = "{$this->_themeImgUrl}{$_basename}.png"; |
| 79 | - $html[] = '<meta name="msapplication-TileImage" content="' . $url . '"/>'; |
|
| 79 | + $html[] = '<meta name="msapplication-TileImage" content="'.$url.'"/>'; |
|
| 80 | 80 | return implode("\n", $html); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $_content += ['first' => '', 'middle' => '', 'last' => '']; |
| 226 | 226 | $out = ''; |
| 227 | 227 | foreach (['first', 'middle', 'last'] as $key) { |
| 228 | - $out .= '<div class="heading-3-' . $key . '">'; |
|
| 228 | + $out .= '<div class="heading-3-'.$key.'">'; |
|
| 229 | 229 | $out .= $options['escape'] ? h($_content[$key]) : $_content[$key]; |
| 230 | 230 | $out .= '</div>'; |
| 231 | 231 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | public function linkToUserProfile($user, ForumsUserInterface $CurrentUser) { |
| 236 | 236 | if ($CurrentUser->isLoggedIn()) { |
| 237 | 237 | return $this->Html->link($user['username'], |
| 238 | - '/users/view/' . $user['id']); |
|
| 238 | + '/users/view/'.$user['id']); |
|
| 239 | 239 | } else { |
| 240 | 240 | return h($user['username']); |
| 241 | 241 | } |