@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package phpBB Sitemaker [English] |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package phpBB Sitemaker [English] |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * @ignore |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\services\tree; |
| 11 | 11 | |
@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | protected $data = array(); |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * Construct |
|
| 37 | - * |
|
| 38 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
| 39 | - * @param string $items_table Table name |
|
| 40 | - * @param string $pk Primary key |
|
| 41 | - * @param string $sql_where Column restriction |
|
| 42 | - */ |
|
| 36 | + * Construct |
|
| 37 | + * |
|
| 38 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
| 39 | + * @param string $items_table Table name |
|
| 40 | + * @param string $pk Primary key |
|
| 41 | + * @param string $sql_where Column restriction |
|
| 42 | + */ |
|
| 43 | 43 | public function __construct(\phpbb\db\driver\driver_interface $db, $items_table, $pk, $sql_where = '') |
| 44 | 44 | { |
| 45 | 45 | $this->db = $db; |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | - * Get branch |
|
| 84 | - */ |
|
| 83 | + * Get branch |
|
| 84 | + */ |
|
| 85 | 85 | public function get_branch($node_id, $type = 'all', $order = 'descending', $include_node = true) |
| 86 | 86 | { |
| 87 | 87 | switch ($type) |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $sql = "SELECT * |
| 73 | 73 | FROM $this->items_table |
| 74 | - WHERE $this->pk = " . (int) $node_id ; |
|
| 74 | + WHERE $this->pk = " . (int) $node_id; |
|
| 75 | 75 | $result = $this->db->sql_query($sql); |
| 76 | 76 | $row = $this->db->sql_fetchrow($result); |
| 77 | 77 | $this->db->sql_freeresult($result); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | return $data; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree') |
|
| 177 | + public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree') |
|
| 178 | 178 | { |
| 179 | 179 | $prev_depth = 0; |
| 180 | 180 | $parental_depth = array(0 => -1); |
@@ -183,10 +183,10 @@ discard block |
||
| 183 | 183 | for ($i = 0, $size = sizeof($data); $i < $size; $i++) |
| 184 | 184 | { |
| 185 | 185 | $row = $data[$i]; |
| 186 | - $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
| 187 | - $repeat = abs($prev_depth - $this_depth); |
|
| 186 | + $this_depth = $parental_depth[$row['parent_id']] + 1; |
|
| 187 | + $repeat = abs($prev_depth - $this_depth); |
|
| 188 | 188 | |
| 189 | - $tpl_data = array( |
|
| 189 | + $tpl_data = array( |
|
| 190 | 190 | 'S_PREV_DEPTH' => $prev_depth, |
| 191 | 191 | 'S_THIS_DEPTH' => $this_depth, |
| 192 | 192 | 'S_NUM_KIDS' => $this->count_descendants($row), |
@@ -237,8 +237,7 @@ |
||
| 237 | 237 | { |
| 238 | 238 | $padding .= $pad_with; |
| 239 | 239 | $padding_store[$row['parent_id']] = $padding; |
| 240 | - } |
|
| 241 | - else if ($row['left_id'] > $right + 1) |
|
| 240 | + } else if ($row['left_id'] > $right + 1) |
|
| 242 | 241 | { |
| 243 | 242 | $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; |
| 244 | 243 | } |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\services\tree; |
| 11 | 11 | |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * Set additional sql where restrictions |
|
| 39 | - */ |
|
| 38 | + * Set additional sql where restrictions |
|
| 39 | + */ |
|
| 40 | 40 | public function set_sql_where($sql_where) |
| 41 | 41 | { |
| 42 | 42 | $this->sql_where = $sql_where; |
@@ -283,8 +283,8 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | /** |
| 286 | - * Update right side of tree |
|
| 287 | - */ |
|
| 286 | + * Update right side of tree |
|
| 287 | + */ |
|
| 288 | 288 | protected function update_right_side(&$data, &$right_id, $index, $branch) |
| 289 | 289 | { |
| 290 | 290 | $right_id++; |
@@ -214,23 +214,23 @@ |
||
| 214 | 214 | foreach ($branch as $i => $row) |
| 215 | 215 | { |
| 216 | 216 | $left_id = $right_id + 1; |
| 217 | - $right_id = $right_id + 2; |
|
| 217 | + $right_id = $right_id + 2; |
|
| 218 | 218 | |
| 219 | 219 | $sql_data[$i] = $row; |
| 220 | - $sql_data[$i]['parent_id'] = $parent_id; |
|
| 221 | - $sql_data[$i]['left_id'] = $left_id; |
|
| 222 | - $sql_data[$i]['right_id'] = $right_id; |
|
| 223 | - $sql_data[$i]['depth'] = $depth; |
|
| 220 | + $sql_data[$i]['parent_id'] = $parent_id; |
|
| 221 | + $sql_data[$i]['left_id'] = $left_id; |
|
| 222 | + $sql_data[$i]['right_id'] = $right_id; |
|
| 223 | + $sql_data[$i]['depth'] = $depth; |
|
| 224 | 224 | |
| 225 | 225 | if ($row['parent_id']) |
| 226 | 226 | { |
| 227 | - $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
| 228 | - $right_id = $left_id + 1; |
|
| 227 | + $left_id = $sql_data[$row['parent_id']]['right_id']; |
|
| 228 | + $right_id = $left_id + 1; |
|
| 229 | 229 | |
| 230 | - $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
| 231 | - $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
| 232 | - $sql_data[$i]['left_id'] = $left_id; |
|
| 233 | - $sql_data[$i]['right_id'] = $right_id; |
|
| 230 | + $sql_data[$i]['parent_id'] = $row['parent_id']; |
|
| 231 | + $sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1; |
|
| 232 | + $sql_data[$i]['left_id'] = $left_id; |
|
| 233 | + $sql_data[$i]['right_id'] = $right_id; |
|
| 234 | 234 | |
| 235 | 235 | $this->update_right_side($sql_data, $right_id, $row['parent_id'], $branch); |
| 236 | 236 | } |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | if (is_array($message)) |
| 42 | 42 | { |
| 43 | 43 | $this->message = (string) $message[0]; |
| 44 | - } |
|
| 45 | - else |
|
| 44 | + } else |
|
| 46 | 45 | { |
| 47 | 46 | $this->message = $message; |
| 48 | 47 | } |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function execute($style_id) |
| 15 | 15 | { |
| 16 | - $name = $this->request->variable('block', ''); |
|
| 17 | - $route = $this->request->variable('route', ''); |
|
| 16 | + $name = $this->request->variable('block', ''); |
|
| 17 | + $route = $this->request->variable('route', ''); |
|
| 18 | 18 | |
| 19 | 19 | if (($block_instance = $this->block_factory->get_block($name)) === null) |
| 20 | 20 | { |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public function execute($style_id) |
| 21 | 21 | { |
| 22 | 22 | $ext_name = $this->request->variable('ext', ''); |
| 23 | - $route = $this->request->variable('route', ''); |
|
| 23 | + $route = $this->request->variable('route', ''); |
|
| 24 | 24 | $from_route = $this->request->variable('from_route', ''); |
| 25 | 25 | $from_style = $this->request->variable('from_style', $style_id); |
| 26 | 26 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | if (!empty($collection)) |
| 51 | 51 | { |
| 52 | 52 | return $collection->get_entities(); |
| 53 | - } |
|
| 54 | - else |
|
| 53 | + } else |
|
| 55 | 54 | { |
| 56 | 55 | return array(); |
| 57 | 56 | } |
@@ -88,8 +87,7 @@ discard block |
||
| 88 | 87 | if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions)) |
| 89 | 88 | { |
| 90 | 89 | $this->route_mapper->delete($route); |
| 91 | - } |
|
| 92 | - else |
|
| 90 | + } else |
|
| 93 | 91 | { |
| 94 | 92 | $route->set_has_blocks($has_blocks); |
| 95 | 93 | $this->route_mapper->save($route); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -135,8 +135,7 @@ discard block |
||
| 135 | 135 | if ($this->request->is_set('style')) |
| 136 | 136 | { |
| 137 | 137 | return $this->request->variable('style', 0); |
| 138 | - } |
|
| 139 | - else |
|
| 138 | + } else |
|
| 140 | 139 | { |
| 141 | 140 | return (!$this->config['override_user_style']) ? $this->user->data['user_style'] : $this->config['default_style']; |
| 142 | 141 | } |
@@ -172,8 +171,7 @@ discard block |
||
| 172 | 171 | self::SHOW_BLOCK_LANDING => true, |
| 173 | 172 | self::SHOW_BLOCK_SUBPAGE => false, |
| 174 | 173 | ); |
| 175 | - } |
|
| 176 | - else |
|
| 174 | + } else |
|
| 177 | 175 | { |
| 178 | 176 | $modes = array( |
| 179 | 177 | self::SHOW_BLOCK_BOTH => true, |
@@ -200,8 +198,7 @@ discard block |
||
| 200 | 198 | } |
| 201 | 199 | |
| 202 | 200 | $u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode=' . (($edit_mode) ? 0 : 1)); |
| 203 | - } |
|
| 204 | - else |
|
| 201 | + } else |
|
| 205 | 202 | { |
| 206 | 203 | $edit_mode = false; |
| 207 | 204 | } |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -368,7 +368,7 @@ |
||
| 368 | 368 | { |
| 369 | 369 | $this->_prep_checkbox_field_for_display($vars, $type, $field); |
| 370 | 370 | |
| 371 | - $vars['method'] ='build_multi_select'; |
|
| 371 | + $vars['method'] = 'build_multi_select'; |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | /** |
@@ -405,8 +405,7 @@ |
||
| 405 | 405 | if (is_array($title)) |
| 406 | 406 | { |
| 407 | 407 | $this->_add_lang_vars($title); |
| 408 | - } |
|
| 409 | - else if (!isset($this->user->lang[$title])) |
|
| 408 | + } else if (!isset($this->user->lang[$title])) |
|
| 410 | 409 | { |
| 411 | 410 | $this->user->lang[$title] = $title; |
| 412 | 411 | } |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2015 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2015 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\model\menus\entity; |
| 11 | 11 | |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | list($controller_service, $controller_method) = explode(':', $controller); |
| 142 | 142 | $controller_params = $symfony_request->attributes->get('_route_params'); |
| 143 | 143 | $controller_object = $this->phpbb_container->get($controller_service); |
| 144 | - $controller_class = get_class($controller_object); |
|
| 144 | + $controller_class = get_class($controller_object); |
|
| 145 | 145 | |
| 146 | 146 | $r = new \ReflectionMethod($controller_class, $controller_method); |
| 147 | 147 | $params = $r->getParameters(); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |