Completed
Branch 1.1.0 (60e131)
by Sylver
03:35
created
controller/admin_controller.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@
 block discarded – undo
55 55
 	protected $u_action;
56 56
 
57 57
 	/**
58
-	* The database tables
59
-	*
60
-	* @var string */
58
+	 * The database tables
59
+	 *
60
+	 * @var string */
61 61
 	protected $smilies_category_table;
62 62
 
63 63
 	/**
64
-	* Constructor
65
-	*/
64
+	 * Constructor
65
+	 */
66 66
 	public function __construct(category $category, config $config, db $db, pagination $pagination, request $request, template $template, user $user, language $language, log $log, $root_path, $smilies_category_table)
67 67
 	{
68 68
 		$this->category				= $category;
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -65,27 +65,27 @@  discard block
 block discarded – undo
65 65
 	*/
66 66
 	public function __construct(category $category, config $config, db $db, pagination $pagination, request $request, template $template, user $user, language $language, log $log, $root_path, $smilies_category_table)
67 67
 	{
68
-		$this->category				= $category;
69
-		$this->config				= $config;
70
-		$this->db					= $db;
71
-		$this->pagination			= $pagination;
72
-		$this->request				= $request;
68
+		$this->category = $category;
69
+		$this->config = $config;
70
+		$this->db = $db;
71
+		$this->pagination = $pagination;
72
+		$this->request = $request;
73 73
 		$this->template				= $template;
74
-		$this->user					= $user;
74
+		$this->user = $user;
75 75
 		$this->language				= $language;
76
-		$this->log					= $log;
76
+		$this->log = $log;
77 77
 		$this->root_path			= $root_path;
78
-		$this->category_table		= $smilies_category_table;
78
+		$this->category_table = $smilies_category_table;
79 79
 	}
80 80
 
81 81
 	public function acp_categories_config()
82 82
 	{
83 83
 		$this->language->add_lang('acp/language');
84
-		$mode		= $this->request->variable('mode', '');
85
-		$action		= $this->request->variable('action', '');
86
-		$id			= $this->request->variable('id', 0);
87
-		$empty_row	= false;
88
-		$form_key	= 'sylver35/smiliescat';
84
+		$mode = $this->request->variable('mode', '');
85
+		$action = $this->request->variable('action', '');
86
+		$id = $this->request->variable('id', 0);
87
+		$empty_row = false;
88
+		$form_key = 'sylver35/smiliescat';
89 89
 		add_form_key($form_key);
90 90
 
91 91
 		if ($action)
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 					$result = $this->db->sql_query($sql);
153 153
 					while ($row = $this->db->sql_fetchrow($result))
154 154
 					{
155
-						$iso	= $row['lang_iso'];
155
+						$iso = $row['lang_iso'];
156 156
 						$lang	= $this->request->variable("lang_$iso", '', true);
157 157
 						$name	= $this->request->variable("name_$iso", '', true);
158 158
 						if ($name === '')
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 						));
217 217
 						$i++;
218 218
 						$list_id[$i] = $row['lang_id'];
219
-						$cat_id		= $row['cat_id'];
220
-						$cat_order	= $row['cat_order'];
221
-						$title		= $row['cat_title'];
219
+						$cat_id = $row['cat_id'];
220
+						$cat_order = $row['cat_order'];
221
+						$title = $row['cat_title'];
222 222
 					}
223 223
 					$this->db->sql_freeresult($result);
224 224
 
@@ -268,11 +268,11 @@  discard block
 block discarded – undo
268 268
 					$result = $this->db->sql_query($sql);
269 269
 					while ($row = $this->db->sql_fetchrow($result))
270 270
 					{
271
-						$iso	= $row['lang_iso'];
271
+						$iso = $row['lang_iso'];
272 272
 						$lang	= $this->request->variable("lang_$iso", '', true);
273 273
 						$name	= $this->request->variable("name_$iso", '', true);
274 274
 						$sort	= $this->request->variable("sort_$iso", '');
275
-						$order	= $this->request->variable('order', 0);
275
+						$order = $this->request->variable('order', 0);
276 276
 						if ($name === '')
277 277
 						{
278 278
 							trigger_error($this->language->lang('SC_CATEGORY_ERROR', $this->language->lang('SC_CATEGORY_NAME')) . adm_back_link($this->u_action . '&action=edit&id=' . $id), E_USER_WARNING);
@@ -494,11 +494,11 @@  discard block
 block discarded – undo
494 494
 	{
495 495
 		$this->language->add_lang('acp/posting');
496 496
 		$action		= $this->request->variable('action', '');
497
-		$start		= $this->request->variable('start', 0);
497
+		$start = $this->request->variable('start', 0);
498 498
 		$select		= $this->request->variable('select', -1);
499
-		$id			= $this->request->variable('id', -1);
500
-		$lang		= $this->user->lang_name;
501
-		$form_key	= 'sylver35/smiliescat';
499
+		$id = $this->request->variable('id', -1);
500
+		$lang = $this->user->lang_name;
501
+		$form_key = 'sylver35/smiliescat';
502 502
 		add_form_key($form_key);
503 503
 
504 504
 		if ($action)
@@ -573,12 +573,12 @@  discard block
 block discarded – undo
573 573
 		}
574 574
 		else
575 575
 		{
576
-			$category		= $i = 0;
576
+			$category = $i = 0;
577 577
 			$smiley_url		= '';
578 578
 			$spacer_cat		= false;
579
-			$smilies_count	= $this->category->smilies_count($select);
580
-			$cat_title		= $this->language->lang('SC_CATEGORY_DEFAUT');
581
-			$where			= ($select !== -1) ? "cat_id = $select" : 'smiley_id > 0';
579
+			$smilies_count = $this->category->smilies_count($select);
580
+			$cat_title = $this->language->lang('SC_CATEGORY_DEFAUT');
581
+			$where = ($select !== -1) ? "cat_id = $select" : 'smiley_id > 0';
582 582
 
583 583
 			if ($select !== 0)
584 584
 			{
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -158,8 +158,7 @@  discard block
 block discarded – undo
158 158
 						if ($name === '')
159 159
 						{
160 160
 							trigger_error($this->language->lang('SC_CATEGORY_ERROR', $this->language->lang('SC_CATEGORY_NAME')) . adm_back_link($this->u_action . '&action=add'), E_USER_WARNING);
161
-						}
162
-						else
161
+						} else
163 162
 						{
164 163
 							$sql_in = array_merge($sql_in, array(
165 164
 								'cat_lang'		=> $lang,
@@ -276,16 +275,14 @@  discard block
 block discarded – undo
276 275
 						if ($name === '')
277 276
 						{
278 277
 							trigger_error($this->language->lang('SC_CATEGORY_ERROR', $this->language->lang('SC_CATEGORY_NAME')) . adm_back_link($this->u_action . '&action=edit&id=' . $id), E_USER_WARNING);
279
-						}
280
-						else
278
+						} else
281 279
 						{
282 280
 							if ($sort == 'edit')
283 281
 							{
284 282
 								$sql = 'UPDATE ' . $this->category_table . " SET cat_name = '" . $this->category->capitalize($name) . "', cat_title = '" . $this->category->capitalize($title) . "'
285 283
 									WHERE cat_lang = '" . $this->db->sql_escape($lang) . "' AND cat_id = $id";
286 284
 								$this->db->sql_query($sql);
287
-							}
288
-							else if ($sort == 'create')
285
+							} else if ($sort == 'create')
289 286
 							{
290 287
 								$sql_in = array(
291 288
 									'cat_id'		=> $id,
@@ -371,8 +368,7 @@  discard block
 block discarded – undo
371 368
 							'MESSAGE_TEXT'	=> $this->language->lang('SC_MOVE_SUCCESS'),
372 369
 							'REFRESH_DATA'	=> array('time'		=> 2),
373 370
 						));
374
-					}
375
-					else
371
+					} else
376 372
 					{
377 373
 						trigger_error($this->language->lang('SC_MOVE_SUCCESS') . adm_back_link($this->u_action));
378 374
 					}
@@ -409,13 +405,11 @@  discard block
 block discarded – undo
409 405
 								'MESSAGE_TEXT'	=> $this->language->lang('SC_DELETE_SUCCESS'),
410 406
 								'REFRESH_DATA'	=> array('time'		=> 2),
411 407
 							));
412
-						}
413
-						else
408
+						} else
414 409
 						{
415 410
 							trigger_error($this->language->lang('SC_DELETE_SUCCESS') . adm_back_link($this->u_action));
416 411
 						}
417
-					}
418
-					else
412
+					} else
419 413
 					{
420 414
 						confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields(array(
421 415
 							'mode'		=> $mode,
@@ -431,8 +425,7 @@  discard block
 block discarded – undo
431 425
 			$this->template->assign_vars(array(
432 426
 				'IN_ACTION'		=> true,
433 427
 			));
434
-		}
435
-		else
428
+		} else
436 429
 		{
437 430
 			$i = 1;
438 431
 			$cat = 0;
@@ -570,8 +563,7 @@  discard block
 block discarded – undo
570 563
 			$this->template->assign_vars(array(
571 564
 				'IN_ACTION'			=> true,
572 565
 			));
573
-		}
574
-		else
566
+		} else
575 567
 		{
576 568
 			$category		= $i = 0;
577 569
 			$smiley_url		= '';
@@ -594,8 +586,7 @@  discard block
 block discarded – undo
594 586
 					'WHERE'		=> "$where AND code <> ''",
595 587
 					'ORDER_BY'	=> 'cat_order ASC, smiley_order ASC',
596 588
 				));
597
-			}
598
-			else
589
+			} else
599 590
 			{
600 591
 				$sql = $this->db->sql_build_query('SELECT', array(
601 592
 					'SELECT'	=> '*',
Please login to merge, or discard this patch.
controller/main.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 	protected $root_path;
57 57
 
58 58
 	/**
59
-	* The database tables
60
-	*
61
-	* @var string */
59
+	 * The database tables
60
+	 *
61
+	 * @var string */
62 62
 	protected $smilies_category_table;
63 63
 
64 64
 	/**
65
-	* Constructor
66
-	*/
65
+	 * Constructor
66
+	 */
67 67
 	public function __construct(category $category, request $request, config $config, helper $helper, path_helper $path_helper, db $db, template $template, user $user, language $language, pagination $pagination, $root_path, $smilies_category_table)
68 68
 	{
69 69
 		$this->category			= $category;
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
85
-	*/
84
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
85
+	 */
86 86
 	public function popup_smilies_category()
87 87
 	{
88 88
 		$title	= '';
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,18 +66,18 @@  discard block
 block discarded – undo
66 66
 	*/
67 67
 	public function __construct(category $category, request $request, config $config, helper $helper, path_helper $path_helper, db $db, template $template, user $user, language $language, pagination $pagination, $root_path, $smilies_category_table)
68 68
 	{
69
-		$this->category			= $category;
70
-		$this->request			= $request;
69
+		$this->category = $category;
70
+		$this->request = $request;
71 71
 		$this->config			= $config;
72 72
 		$this->helper			= $helper;
73
-		$this->path_helper		= $path_helper;
74
-		$this->db 				= $db;
73
+		$this->path_helper = $path_helper;
74
+		$this->db = $db;
75 75
 		$this->template			= $template;
76
-		$this->user				= $user;
76
+		$this->user = $user;
77 77
 		$this->language			= $language;
78
-		$this->pagination		= $pagination;
78
+		$this->pagination = $pagination;
79 79
 		$this->root_path		= $root_path;
80
-		$this->category_table	= $smilies_category_table;
80
+		$this->category_table = $smilies_category_table;
81 81
 	}
82 82
 
83 83
 	/**
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 	public function popup_smilies_category()
87 87
 	{
88 88
 		$title	= '';
89
-		$cat_id	= $cat_order = $i = 0;
89
+		$cat_id = $cat_order = $i = 0;
90 90
 		$start	= $this->request->variable('start', 0);
91 91
 		$cat	= $this->request->variable('select', -1);
92 92
 		$cat	= ($cat == -1) ? $this->config['smilies_category_nb'] : $cat;
93
-		$max_id	= $this->category->get_max_id();
94
-		$count	= $this->category->smilies_count($cat);
93
+		$max_id = $this->category->get_max_id();
94
+		$count = $this->category->smilies_count($cat);
95 95
 		$url	= $this->helper->route('sylver35_smiliescat_smilies_pop');
96
-		$lang	= $this->user->lang_name;
96
+		$lang = $this->user->lang_name;
97 97
 		$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
98 98
 
99 99
 		$sql = $this->db->sql_build_query('SELECT', array(
Please login to merge, or discard this patch.
event/listener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	public function __construct(category $category, helper $helper, template $template)
29 29
 	{
30 30
 		$this->category		= $category;
31
-		$this->helper		= $helper;
31
+		$this->helper = $helper;
32 32
 		$this->template		= $template;
33 33
 	}
34 34
 
Please login to merge, or discard this patch.
core/category.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
 	protected $ext_manager;
34 34
 
35 35
 	/**
36
-	* The database tables
37
-	*
38
-	* @var string */
36
+	 * The database tables
37
+	 *
38
+	 * @var string */
39 39
 	protected $smilies_category_table;
40 40
 
41 41
 	/**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
 	public function __construct(cache $cache, db $db, user $user, language $language, manager $ext_manager, $smilies_category_table)
45 45
 	{
46 46
 		$this->cache			= $cache;
47
-		$this->db				= $db;
47
+		$this->db = $db;
48 48
 		$this->user				= $user;
49
-		$this->language			= $language;
50
-		$this->ext_manager		= $ext_manager;
51
-		$this->category_table	= $smilies_category_table;
49
+		$this->language = $language;
50
+		$this->ext_manager = $ext_manager;
51
+		$this->category_table = $smilies_category_table;
52 52
 	}
53 53
 
54 54
 	public function get_version()
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,8 +218,7 @@
 block discarded – undo
218 218
 				$row = $this->db->sql_fetchrow($result);
219 219
 				$cat_name = $row['cat_name'];
220 220
 				$this->db->sql_freeresult($result);
221
-			}
222
-			else
221
+			} else
223 222
 			{
224 223
 				$cat_name = $this->language->lang('SC_CATEGORY_DEFAUT');
225 224
 			}
Please login to merge, or discard this patch.