| @@ -91,8 +91,8 @@ discard block | ||
| 91 | 91 | */ | 
| 92 | 92 | private function clean_styles() | 
| 93 | 93 |  	{ | 
| 94 | - $routes_ary = $this->manager->get_routes_per_style(); | |
| 95 | - $style_ids = $this->get_style_ids(); | |
| 94 | + $routes_ary = $this->manager->get_routes_per_style(); | |
| 95 | + $style_ids = $this->get_style_ids(); | |
| 96 | 96 | |
| 97 | 97 | $routes = array(); | 
| 98 | 98 | foreach ($routes_ary as $style_id => $style_routes) | 
| @@ -122,7 +122,7 @@ discard block | ||
| 122 | 122 | |
| 123 | 123 | foreach ($routes as $route => $row) | 
| 124 | 124 |  		{ | 
| 125 | - $url = $board_url . '/' . (($row['ext_name']) ? 'app.php' : '') . $row['route']; | |
| 125 | + $url = $board_url.'/'.(($row['ext_name']) ? 'app.php' : '').$row['route']; | |
| 126 | 126 | |
| 127 | 127 | // Route no longer exists => remove all blocks for route | 
| 128 | 128 | if ($this->url_checker->exists($url) !== true) | 
| @@ -185,7 +185,7 @@ discard block | ||
| 185 | 185 | |
| 186 | 186 | if (sizeof($block_ids)) | 
| 187 | 187 |  		{ | 
| 188 | -			$this->db->sql_query('DELETE FROM ' . $this->cblocks_table . ' WHERE ' . $this->db->sql_in_set('block_id', $block_ids)); | |
| 188 | +			$this->db->sql_query('DELETE FROM '.$this->cblocks_table.' WHERE '.$this->db->sql_in_set('block_id', $block_ids)); | |
| 189 | 189 | } | 
| 190 | 190 | } | 
| 191 | 191 | |
| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 |  	{ | 
| 26 | 26 | foreach ($data as $name => $value) | 
| 27 | 27 |  		{ | 
| 28 | - $mutator = 'set_' . $name; | |
| 28 | + $mutator = 'set_'.$name; | |
| 29 | 29 | $this->$mutator($value); | 
| 30 | 30 | } | 
| 31 | 31 | } | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | $data = array(); | 
| 66 | 66 | foreach ($attributes as $attribute) | 
| 67 | 67 |  		{ | 
| 68 | - $accessor = 'get_' . $attribute; | |
| 68 | + $accessor = 'get_'.$attribute; | |
| 69 | 69 | $data[$attribute] = $this->$accessor(); | 
| 70 | 70 | } | 
| 71 | 71 | unset($data['db_fields'], $data['required_fields']); | 
| @@ -70,8 +70,8 @@ | ||
| 70 | 70 | */ | 
| 71 | 71 | protected function find_sql(array $sql_where) | 
| 72 | 72 |  	{ | 
| 73 | - return 'SELECT * FROM ' . $this->entity_table . | |
| 74 | -			((sizeof($sql_where)) ? ' WHERE ' . join(' AND ', $sql_where) : '') . ' | |
| 73 | + return 'SELECT * FROM '.$this->entity_table. | |
| 74 | +			((sizeof($sql_where)) ? ' WHERE '.join(' AND ', $sql_where) : '').' | |
| 75 | 75 | ORDER BY route ASC'; | 
| 76 | 76 | } | 
| 77 | 77 | } | 
| @@ -25,8 +25,8 @@ discard block | ||
| 25 | 25 | */ | 
| 26 | 26 | protected function find_sql(array $sql_where) | 
| 27 | 27 |  	{ | 
| 28 | - return 'SELECT * FROM ' . $this->entity_table . | |
| 29 | -			((sizeof($sql_where)) ? ' WHERE ' . join(' AND ', $sql_where) : '') . ' | |
| 28 | + return 'SELECT * FROM '.$this->entity_table. | |
| 29 | +			((sizeof($sql_where)) ? ' WHERE '.join(' AND ', $sql_where) : '').' | |
| 30 | 30 | ORDER BY position, weight ASC'; | 
| 31 | 31 | } | 
| 32 | 32 | |
| @@ -40,12 +40,12 @@ discard block | ||
| 40 | 40 | // move blocks up for position | 
| 41 | 41 | if ($condition instanceof $this->entity_class) | 
| 42 | 42 |  		{ | 
| 43 | -			$this->db->sql_query('UPDATE ' . $this->entity_table . ' | |
| 43 | +			$this->db->sql_query('UPDATE '.$this->entity_table.' | |
| 44 | 44 | SET weight = weight - 1 | 
| 45 | - WHERE weight > ' . (int) $condition->get_weight() . ' | |
| 46 | - AND style = ' . (int) $condition->get_style() . ' | |
| 47 | - AND route_id = ' . (int) $condition->get_route_id() . " | |
| 48 | - AND position = '" . $this->db->sql_escape($condition->get_position()) . "'"); | |
| 45 | + WHERE weight > ' . (int) $condition->get_weight().' | |
| 46 | + AND style = ' . (int) $condition->get_style().' | |
| 47 | + AND route_id = ' . (int) $condition->get_route_id()." | |
| 48 | + AND position = '" . $this->db->sql_escape($condition->get_position())."'"); | |
| 49 | 49 | } | 
| 50 | 50 | } | 
| 51 | 51 | |
| @@ -65,10 +65,10 @@ discard block | ||
| 65 | 65 | protected function move_blocks_down(\blitze\sitemaker\model\entity_interface $entity) | 
| 66 | 66 |  	{ | 
| 67 | 67 | /** @type \blitze\sitemaker\model\blocks\entity\block $entity */ | 
| 68 | - $sql = 'UPDATE ' . $this->entity_table . ' | |
| 68 | + $sql = 'UPDATE '.$this->entity_table.' | |
| 69 | 69 | SET weight = weight + 1 | 
| 70 | - WHERE weight >= ' . (int) $entity->get_weight() . ' | |
| 71 | - AND route_id = ' . (int) $entity->get_route_id() . ' | |
| 70 | + WHERE weight >= ' . (int) $entity->get_weight().' | |
| 71 | + AND route_id = ' . (int) $entity->get_route_id().' | |
| 72 | 72 | AND style = ' . (int) $entity->get_style(); | 
| 73 | 73 | $this->db->sql_query($sql); | 
| 74 | 74 | } | 
| @@ -141,7 +141,7 @@ | ||
| 141 | 141 | */ | 
| 142 | 142 | public function set_class($class) | 
| 143 | 143 |  	{ | 
| 144 | - $this->class = ($class) ? ' ' . $class : ''; | |
| 144 | + $this->class = ($class) ? ' '.$class : ''; | |
| 145 | 145 | return $this; | 
| 146 | 146 | } | 
| 147 | 147 | |
| @@ -172,6 +172,6 @@ | ||
| 172 | 172 | */ | 
| 173 | 173 | protected function get_sql_where($menu_id) | 
| 174 | 174 |  	{ | 
| 175 | - return '%smenu_id = ' . (int) $menu_id; | |
| 175 | + return '%smenu_id = '.(int) $menu_id; | |
| 176 | 176 | } | 
| 177 | 177 | } | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | |
| 63 | 63 |  		if (!function_exists('phpbb_get_user_avatar')) | 
| 64 | 64 |  		{ | 
| 65 | - include($phpbb_root_path . 'includes/functions_display.' . $php_ext); | |
| 65 | + include($phpbb_root_path.'includes/functions_display.'.$php_ext); | |
| 66 | 66 | } | 
| 67 | 67 | } | 
| 68 | 68 | |
| @@ -99,8 +99,8 @@ discard block | ||
| 99 | 99 | */ | 
| 100 | 100 | protected function member_posts(array $row) | 
| 101 | 101 |  	{ | 
| 102 | -		$u_posts = append_sid($this->phpbb_root_path . 'search.' . $this->php_ext, "author_id={$row['user_id']}&sr=posts" . $this->explain_range); | |
| 103 | - $user_posts = '<a href="' . $u_posts . '">' . $row['user_posts'] . '</a>'; | |
| 102 | +		$u_posts = append_sid($this->phpbb_root_path.'search.'.$this->php_ext, "author_id={$row['user_id']}&sr=posts".$this->explain_range); | |
| 103 | + $user_posts = '<a href="'.$u_posts.'">'.$row['user_posts'].'</a>'; | |
| 104 | 104 | |
| 105 | 105 | return array( | 
| 106 | 106 |  			'USERNAME'		=> get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), | 
| @@ -168,7 +168,7 @@ discard block | ||
| 168 | 168 |  			'WHERE'			=> $this->db->sql_in_set('u.user_type', array(USER_NORMAL, USER_FOUNDER)), | 
| 169 | 169 | ); | 
| 170 | 170 | |
| 171 | - $sql_method = 'set_' . $this->settings['query_type'] . '_sql'; | |
| 171 | + $sql_method = 'set_'.$this->settings['query_type'].'_sql'; | |
| 172 | 172 | call_user_func_array(array($this, $sql_method), array(&$sql_ary)); | 
| 173 | 173 | |
| 174 | 174 | $this->set_range_sql($sql_ary); | 
| @@ -198,7 +198,7 @@ discard block | ||
| 198 | 198 | $this->info_header = ''; | 
| 199 | 199 | $this->view_mode = 'member_bots'; | 
| 200 | 200 | |
| 201 | - $sql_ary['WHERE'] = 'u.user_type = ' . USER_IGNORE; | |
| 201 | + $sql_ary['WHERE'] = 'u.user_type = '.USER_IGNORE; | |
| 202 | 202 | } | 
| 203 | 203 | |
| 204 | 204 | /** | 
| @@ -207,7 +207,7 @@ discard block | ||
| 207 | 207 | protected function set_tenured_sql(array &$sql_ary) | 
| 208 | 208 |  	{ | 
| 209 | 209 | $sql_ary['SELECT'] .= ', u.user_regdate as member_date'; | 
| 210 | - $sql_ary['ORDER_BY'] = 'u.user_regdate ' . (($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC'); | |
| 210 | + $sql_ary['ORDER_BY'] = 'u.user_regdate '.(($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC'); | |
| 211 | 211 | |
| 212 | 212 | $this->sql_date_field = 'u.user_regdate'; | 
| 213 | 213 | $this->settings['date_range'] = ''; | 
| @@ -230,7 +230,7 @@ discard block | ||
| 230 | 230 | $sql_ary['SELECT'] .= ', COUNT(p.post_id) as user_posts'; | 
| 231 | 231 | $sql_ary['FROM'] += array(TOPICS_TABLE => 't'); | 
| 232 | 232 | $sql_ary['FROM'] += array(POSTS_TABLE => 'p'); | 
| 233 | - $sql_ary['WHERE'] .= ' AND ' . time() . ' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = ' . ITEM_APPROVED . ' AND p.poster_id = u.user_id'; | |
| 233 | + $sql_ary['WHERE'] .= ' AND '.time().' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = '.ITEM_APPROVED.' AND p.poster_id = u.user_id'; | |
| 234 | 234 | $sql_ary['GROUP_BY'] = 'u.user_id'; | 
| 235 | 235 | $sql_ary['ORDER_BY'] = 'user_posts DESC, u.username ASC'; | 
| 236 | 236 | |
| @@ -247,7 +247,7 @@ discard block | ||
| 247 | 247 | if ($this->settings['date_range'] && $this->sql_date_field) | 
| 248 | 248 |  		{ | 
| 249 | 249 | $range = $this->date_range->get($this->settings['date_range']); | 
| 250 | - $this->explain_range = '&date=' . $range['date']; | |
| 250 | + $this->explain_range = '&date='.$range['date']; | |
| 251 | 251 | |
| 252 | 252 |  			$sql_ary['WHERE'] .= " AND {$this->sql_date_field} BETWEEN {$range['start']} AND {$range['stop']}"; | 
| 253 | 253 | } | 
| @@ -59,6 +59,6 @@ | ||
| 59 | 59 | $class_name = get_class($block_instance); | 
| 60 | 60 |  		list($namespace, $extension) = explode('\\', $class_name); | 
| 61 | 61 | |
| 62 | - return $namespace . '/' . $extension; | |
| 62 | + return $namespace.'/'.$extension; | |
| 63 | 63 | } | 
| 64 | 64 | } | 
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | |
| 35 | 35 | if (isset($allowed_fields[$field])) | 
| 36 | 36 |  		{ | 
| 37 | - $mutator = 'set_' . $field; | |
| 37 | + $mutator = 'set_'.$field; | |
| 38 | 38 | $entity->$mutator($allowed_fields[$field]); | 
| 39 | 39 | $entity = $block_mapper->save($entity); | 
| 40 | 40 | } |