Completed
Push — 3.2.x ( ea081a...9c40d5 )
by Erwan
01:49
created
notification/type/directory_website_error_cron.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -18,52 +18,52 @@  discard block
 block discarded – undo
18 18
 class directory_website_error_cron extends \phpbb\notification\type\base
19 19
 {
20 20
 	/**
21
-	* Get notification type name
22
-	*
23
-	* @return string
24
-	*/
21
+	 * Get notification type name
22
+	 *
23
+	 * @return string
24
+	 */
25 25
 	public function get_type()
26 26
 	{
27 27
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website_error_cron';
28 28
 	}
29 29
 
30 30
 	/**
31
-	* Notification option data (for outputting to the user)
32
-	*
33
-	* @var bool|array False if the service should use it's default data
34
-	* 					Array of data (including keys 'id', 'lang', and 'group')
35
-	*/
31
+	 * Notification option data (for outputting to the user)
32
+	 *
33
+	 * @var bool|array False if the service should use it's default data
34
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
35
+	 */
36 36
 	public static $notification_option = array(
37 37
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_ERROR_CHECK',
38 38
 		'group'	=> 'NOTIFICATION_DIR_UCP',
39 39
 	);
40 40
 
41 41
 	/**
42
-	* Is available
43
-	*
44
-	* @return bool True/False whether or not this is available to the user
45
-	*/
42
+	 * Is available
43
+	 *
44
+	 * @return bool True/False whether or not this is available to the user
45
+	 */
46 46
 	public function is_available()
47 47
 	{
48 48
 		return true;
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Get link id
53
-	*
54
-	* @param array $data The data from the link
55
-	* @return int
56
-	*/
52
+	 * Get link id
53
+	 *
54
+	 * @param array $data The data from the link
55
+	 * @return int
56
+	 */
57 57
 	static public function get_item_id($data)
58 58
 	{
59 59
 		return (int) $data['link_id'];
60 60
 	}
61 61
 
62 62
 	/**
63
-	* Get parent id - it's not used
64
-	*
65
-	* @param array $data The data from the link
66
-	*/
63
+	 * Get parent id - it's not used
64
+	 *
65
+	 * @param array $data The data from the link
66
+	 */
67 67
 	static public function get_item_parent_id($data)
68 68
 	{
69 69
 		// No parent
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	/**
74
-	* Find the users who want to receive notifications
75
-	*
76
-	* @param	array	$data		Data from submit link
77
-	* @param	array	$options	Options for finding users for notification
78
-	* @return	array
79
-	*/
74
+	 * Find the users who want to receive notifications
75
+	 *
76
+	 * @param	array	$data		Data from submit link
77
+	 * @param	array	$options	Options for finding users for notification
78
+	 * @return	array
79
+	 */
80 80
 	public function find_users_for_notification($data, $options = array())
81 81
 	{
82 82
 		$users = array();
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 	/**
107
-	* Get the HTML formatted title of this notification
108
-	*
109
-	* @return string
110
-	*/
107
+	 * Get the HTML formatted title of this notification
108
+	 *
109
+	 * @return string
110
+	 */
111 111
 	public function get_title()
112 112
 	{
113 113
 		$link_name = $this->get_data('link_name');
@@ -117,20 +117,20 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 
119 119
 	/**
120
-	* Get email template
121
-	*
122
-	* @return string
123
-	*/
120
+	 * Get email template
121
+	 *
122
+	 * @return string
123
+	 */
124 124
 	public function get_email_template()
125 125
 	{
126 126
 		return '@ernadoo_phpbbdirectory/directory_website_error_cron';
127 127
 	}
128 128
 
129 129
 	/**
130
-	* Get email template variables
131
-	*
132
-	* @return array
133
-	*/
130
+	 * Get email template variables
131
+	 *
132
+	 * @return array
133
+	 */
134 134
 	public function get_email_template_variables()
135 135
 	{
136 136
 		return array(
@@ -142,33 +142,33 @@  discard block
 block discarded – undo
142 142
 	}
143 143
 
144 144
 	/**
145
-	* Get the url to this item
146
-	*
147
-	* @return string URL
148
-	*/
145
+	 * Get the url to this item
146
+	 *
147
+	 * @return string URL
148
+	 */
149 149
 	public function get_url()
150 150
 	{
151 151
 		return '';
152 152
 	}
153 153
 
154 154
 	/**
155
-	* Users needed to query before this notification can be displayed
156
-	*
157
-	* @return array Array of user_ids
158
-	*/
155
+	 * Users needed to query before this notification can be displayed
156
+	 *
157
+	 * @return array Array of user_ids
158
+	 */
159 159
 	public function users_to_query()
160 160
 	{
161 161
 		return array();
162 162
 	}
163 163
 
164 164
 	/**
165
-	* Function for preparing the data for insertion in an SQL query
166
-	* (The service handles insertion)
167
-	*
168
-	* @param	array	$data				Data from submit link
169
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
170
-	* @return	array						Array of data ready to be inserted into the database
171
-	*/
165
+	 * Function for preparing the data for insertion in an SQL query
166
+	 * (The service handles insertion)
167
+	 *
168
+	 * @param	array	$data				Data from submit link
169
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
170
+	 * @return	array						Array of data ready to be inserted into the database
171
+	 */
172 172
 	public function create_insert_array($data, $pre_create_data = array())
173 173
 	{
174 174
 		$this->set_data('link_name', $data['link_name']);
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
 	}
183 183
 
184 184
 	/**
185
-	* Function for preparing the data for update in an SQL query
186
-	* (The service handles insertion)
187
-	*
188
-	* @param array $type_data Data unique to this notification type
189
-	* @return array Array of data ready to be updated in the database
190
-	*/
185
+	 * Function for preparing the data for update in an SQL query
186
+	 * (The service handles insertion)
187
+	 *
188
+	 * @param array $type_data Data unique to this notification type
189
+	 * @return array Array of data ready to be updated in the database
190
+	 */
191 191
 	public function create_update_array($type_data)
192 192
 	{
193 193
 		$data = $this->create_insert_array($type_data);
Please login to merge, or discard this patch.
notification/type/directory_website_in_queue.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -18,31 +18,31 @@  discard block
 block discarded – undo
18 18
 class directory_website_in_queue extends \phpbb\notification\type\base
19 19
 {
20 20
 	/**
21
-	* Get notification type name
22
-	*
23
-	* @return string
24
-	*/
21
+	 * Get notification type name
22
+	 *
23
+	 * @return string
24
+	 */
25 25
 	public function get_type()
26 26
 	{
27 27
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website_in_queue';
28 28
 	}
29 29
 
30 30
 	/**
31
-	* Notification option data (for outputting to the user)
32
-	*
33
-	* @var bool|array False if the service should use it's default data
34
-	* 					Array of data (including keys 'id', 'lang', and 'group')
35
-	*/
31
+	 * Notification option data (for outputting to the user)
32
+	 *
33
+	 * @var bool|array False if the service should use it's default data
34
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
35
+	 */
36 36
 	public static $notification_option = array(
37 37
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_IN_MODERATION_QUEUE',
38 38
 		'group'	=> 'NOTIFICATION_DIR_UCP',
39 39
 	);
40 40
 
41 41
 	/**
42
-	* Permission to check for (in find_users_for_notification)
43
-	*
44
-	* @var string Permission name
45
-	*/
42
+	 * Permission to check for (in find_users_for_notification)
43
+	 *
44
+	 * @var string Permission name
45
+	 */
46 46
 	protected $permission = 'a_';
47 47
 
48 48
 	/** @var \phpbb\user_loader */
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	/**
57
-	* Is available
58
-	*
59
-	* @return bool True/False whether or not this is available to the user
60
-	*/
57
+	 * Is available
58
+	 *
59
+	 * @return bool True/False whether or not this is available to the user
60
+	 */
61 61
 	public function is_available()
62 62
 	{
63 63
 		$has_permission = $this->auth->acl_get($this->permission, true);
@@ -66,21 +66,21 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	/**
69
-	* Get link id
70
-	*
71
-	* @param array $data The data from the link
72
-	* @return int
73
-	*/
69
+	 * Get link id
70
+	 *
71
+	 * @param array $data The data from the link
72
+	 * @return int
73
+	 */
74 74
 	static public function get_item_id($data)
75 75
 	{
76 76
 		return (int) $data['link_id'];
77 77
 	}
78 78
 
79 79
 	/**
80
-	* Get parent id - it's not used
81
-	*
82
-	* @param array $data The data from the link
83
-	*/
80
+	 * Get parent id - it's not used
81
+	 *
82
+	 * @param array $data The data from the link
83
+	 */
84 84
 	static public function get_item_parent_id($data)
85 85
 	{
86 86
 		// No parent
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Find the users who want to receive notifications
92
-	*
93
-	* @param	array	$data		Data from submit link
94
-	* @param	array	$options	Options for finding users for notification
95
-	* @return	array
96
-	*/
91
+	 * Find the users who want to receive notifications
92
+	 *
93
+	 * @param	array	$data		Data from submit link
94
+	 * @param	array	$options	Options for finding users for notification
95
+	 * @return	array
96
+	 */
97 97
 	public function find_users_for_notification($data, $options = array())
98 98
 	{
99 99
 		$options = array_merge(array(
@@ -113,18 +113,18 @@  discard block
 block discarded – undo
113 113
 	}
114 114
 
115 115
 	/**
116
-	* Get the user's avatar
117
-	*/
116
+	 * Get the user's avatar
117
+	 */
118 118
 	public function get_avatar()
119 119
 	{
120 120
 		return $this->user_loader->get_avatar($this->get_data('user_from'), false, true);
121 121
 	}
122 122
 
123 123
 	/**
124
-	* Get the HTML formatted title of this notification
125
-	*
126
-	* @return string
127
-	*/
124
+	 * Get the HTML formatted title of this notification
125
+	 *
126
+	 * @return string
127
+	 */
128 128
 	public function get_title()
129 129
 	{
130 130
 		$link_name = $this->get_data('link_name');
@@ -134,30 +134,30 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	* Get email template
138
-	*
139
-	* @return string
140
-	*/
137
+	 * Get email template
138
+	 *
139
+	 * @return string
140
+	 */
141 141
 	public function get_email_template()
142 142
 	{
143 143
 		return '@ernadoo_phpbbdirectory/directory_website_in_queue';
144 144
 	}
145 145
 
146 146
 	/**
147
-	* Get email template variables
148
-	*
149
-	* @return array
150
-	*/
147
+	 * Get email template variables
148
+	 *
149
+	 * @return array
150
+	 */
151 151
 	public function get_email_template_variables()
152 152
 	{
153 153
 		return array();
154 154
 	}
155 155
 
156 156
 	/**
157
-	* Get the url to this item
158
-	*
159
-	* @return string URL
160
-	*/
157
+	 * Get the url to this item
158
+	 *
159
+	 * @return string URL
160
+	 */
161 161
 	public function get_url()
162 162
 	{
163 163
 		global $phpbb_admin_path;
@@ -166,23 +166,23 @@  discard block
 block discarded – undo
166 166
 	}
167 167
 
168 168
 	/**
169
-	* Users needed to query before this notification can be displayed
170
-	*
171
-	* @return array Array of user_ids
172
-	*/
169
+	 * Users needed to query before this notification can be displayed
170
+	 *
171
+	 * @return array Array of user_ids
172
+	 */
173 173
 	public function users_to_query()
174 174
 	{
175 175
 		return array($this->get_data('user_from'));
176 176
 	}
177 177
 
178 178
 	/**
179
-	* Function for preparing the data for insertion in an SQL query
180
-	* (The service handles insertion)
181
-	*
182
-	* @param	array	$data				Data from submit link
183
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
184
-	* @return	array						Array of data ready to be inserted into the database
185
-	*/
179
+	 * Function for preparing the data for insertion in an SQL query
180
+	 * (The service handles insertion)
181
+	 *
182
+	 * @param	array	$data				Data from submit link
183
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
184
+	 * @return	array						Array of data ready to be inserted into the database
185
+	 */
186 186
 	public function create_insert_array($data, $pre_create_data = array())
187 187
 	{
188 188
 		$this->set_data('user_from', $data['user_from']);
Please login to merge, or discard this patch.
search/fulltext_directory.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,32 +16,32 @@
 block discarded – undo
16 16
 	protected $db;
17 17
 
18 18
 	/**
19
-	* Constructor
20
-	*
21
-	* @param \phpbb\db\driver\driver_interface $db
22
-	*/
19
+	 * Constructor
20
+	 *
21
+	 * @param \phpbb\db\driver\driver_interface $db
22
+	 */
23 23
 	public function __construct(\phpbb\db\driver\driver_interface $db)
24 24
 	{
25 25
 		$this->db = $db;
26 26
 	}
27 27
 
28 28
 	/**
29
-	* Performs a search on keywords depending on display specific params. You have to run split_keywords() first
30
-	*
31
-	* @param	array		$keywords_ary		contains each words to search
32
-	* @param	string		$fields				contains either titleonly (link titles should be searched), desconly (only description bodies should be searched)
33
-	* @param	string		$terms				is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
34
-	* @param	array		$sort_by_sql		contains SQL code for the ORDER BY part of a query
35
-	* @param	string		$sort_key			is the key of $sort_by_sql for the selected sorting
36
-	* @param	string		$sort_dir			is either a or d representing ASC and DESC
37
-	* @param	string		$sort_days			specifies the maximum amount of days a post may be old
38
-	* @param	array		$ex_cid_ary			specifies an array of category ids which should not be searched
39
-	* @param	int			$cat_id				is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
40
-	* @param	array		&$id_ary			passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
41
-	* @param	int			$start				indicates the first index of the page
42
-	* @param	int			$per_page			number of ids each page is supposed to contain
43
-	* @return	int								total number of results
44
-	*/
29
+	 * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
30
+	 *
31
+	 * @param	array		$keywords_ary		contains each words to search
32
+	 * @param	string		$fields				contains either titleonly (link titles should be searched), desconly (only description bodies should be searched)
33
+	 * @param	string		$terms				is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
34
+	 * @param	array		$sort_by_sql		contains SQL code for the ORDER BY part of a query
35
+	 * @param	string		$sort_key			is the key of $sort_by_sql for the selected sorting
36
+	 * @param	string		$sort_dir			is either a or d representing ASC and DESC
37
+	 * @param	string		$sort_days			specifies the maximum amount of days a post may be old
38
+	 * @param	array		$ex_cid_ary			specifies an array of category ids which should not be searched
39
+	 * @param	int			$cat_id				is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
40
+	 * @param	array		&$id_ary			passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
41
+	 * @param	int			$start				indicates the first index of the page
42
+	 * @param	int			$per_page			number of ids each page is supposed to contain
43
+	 * @return	int								total number of results
44
+	 */
45 45
 	public function keyword_search($keywords_ary, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_cid_ary, $cat_id, &$id_ary, $start, $per_page)
46 46
 	{
47 47
 		$matches = array();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
 			$match_search_query = '';
70 70
 			foreach ($matches as $match)
71 71
 			{
72
-				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
73
-				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . strtolower($word) . $this->db->get_any_char()));
72
+				$match_search_query .= (($match_search_query) ? ' OR ' : '').'LOWER('.$match.') ';
73
+				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char().strtolower($word).$this->db->get_any_char()));
74 74
 			}
75
-			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
75
+			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')).'('.$match_search_query.')';
76 76
 		}
77 77
 		$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
78 78
 
79 79
 		if (is_array($sort_by_sql[$sort_key]))
80 80
 		{
81
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
81
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
82 82
 		}
83 83
 		else
84 84
 		{
85
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
85
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
86 86
 		}
87 87
 
88 88
 		$sql_array = array(
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 			'FROM'		=> array(
91 91
 					$this->links_table	=> 'l'),
92 92
 			'WHERE'		=> 'l.link_active = 1
93
-				' . (($search_query) ? 'AND (' . $search_query . ')' : '') . '
94
-				' . (sizeof($ex_cid_ary) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '') . '
95
-				' . (($cat_id) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $cat_id) : '') . '
96
-				' . (($sort_days) ? ' AND l.link_time >= ' . (time() - ($sort_days * 86400)) : ''),
93
+				' . (($search_query) ? 'AND ('.$search_query.')' : '').'
94
+				' . (sizeof($ex_cid_ary) ? ' AND '.$this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '').'
95
+				' . (($cat_id) ? ' AND '.$this->db->sql_in_set('l.link_cat', $cat_id) : '').'
96
+				' . (($sort_days) ? ' AND l.link_time >= '.(time() - ($sort_days * 86400)) : ''),
97 97
 			'ORDER_BY'	=> $sql_sort_order
98 98
 		);
99 99
 
Please login to merge, or discard this patch.
notification/type/directory_website_approved.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -21,32 +21,32 @@  discard block
 block discarded – undo
21 21
 	protected $helper;
22 22
 
23 23
 	/**
24
-	* Set the controller helper
25
-	*
26
-	* @param \phpbb\controller\helper $helper
27
-	* @return null
28
-	*/
24
+	 * Set the controller helper
25
+	 *
26
+	 * @param \phpbb\controller\helper $helper
27
+	 * @return null
28
+	 */
29 29
 	public function set_controller_helper(\phpbb\controller\helper $helper)
30 30
 	{
31 31
 		$this->helper = $helper;
32 32
 	}
33 33
 
34 34
 	/**
35
-	* Get notification type name
36
-	*
37
-	* @return string
38
-	*/
35
+	 * Get notification type name
36
+	 *
37
+	 * @return string
38
+	 */
39 39
 	public function get_type()
40 40
 	{
41 41
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website_approved';
42 42
 	}
43 43
 
44 44
 	/**
45
-	* Notification option data (for outputting to the user)
46
-	*
47
-	* @var bool|array False if the service should use it's default data
48
-	* 					Array of data (including keys 'id', 'lang', and 'group')
49
-	*/
45
+	 * Notification option data (for outputting to the user)
46
+	 *
47
+	 * @var bool|array False if the service should use it's default data
48
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
49
+	 */
50 50
 	public static $notification_option = array(
51 51
 		'id'	=> 'dir_moderation_queue',
52 52
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE',
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 	);
55 55
 
56 56
 	/**
57
-	* Permission to check for (in find_users_for_notification)
58
-	*
59
-	* @var string Permission name
60
-	*/
57
+	 * Permission to check for (in find_users_for_notification)
58
+	 *
59
+	 * @var string Permission name
60
+	 */
61 61
 	protected $permission = array('a_', 'm_');
62 62
 
63 63
 	/**
64
-	* Is available
65
-	*
66
-	* @return bool True/False whether or not this is available to the user
67
-	*/
64
+	 * Is available
65
+	 *
66
+	 * @return bool True/False whether or not this is available to the user
67
+	 */
68 68
 	public function is_available()
69 69
 	{
70 70
 		$has_permission = $this->auth->acl_gets($this->permission, true);
@@ -73,21 +73,21 @@  discard block
 block discarded – undo
73 73
 	}
74 74
 
75 75
 	/**
76
-	* Get link id
77
-	*
78
-	* @param array $data The data from the link
79
-	* @return int
80
-	*/
76
+	 * Get link id
77
+	 *
78
+	 * @param array $data The data from the link
79
+	 * @return int
80
+	 */
81 81
 	static public function get_item_id($data)
82 82
 	{
83 83
 		return (int) $data['link_id'];
84 84
 	}
85 85
 
86 86
 	/**
87
-	* Get parent id - it's not used
88
-	*
89
-	* @param array $data The data from the link
90
-	*/
87
+	 * Get parent id - it's not used
88
+	 *
89
+	 * @param array $data The data from the link
90
+	 */
91 91
 	static public function get_item_parent_id($data)
92 92
 	{
93 93
 		// No parent
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 	}
96 96
 
97 97
 	/**
98
-	* Find the users who want to receive notifications
99
-	*
100
-	* @param	array	$data		Data from submit link
101
-	* @param	array	$options	Options for finding users for notification
102
-	* @return	array
103
-	*/
98
+	 * Find the users who want to receive notifications
99
+	 *
100
+	 * @param	array	$data		Data from submit link
101
+	 * @param	array	$options	Options for finding users for notification
102
+	 * @return	array
103
+	 */
104 104
 	public function find_users_for_notification($data, $options = array())
105 105
 	{
106 106
 		$options = array_merge(array(
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	/**
119
-	* Get the HTML formatted title of this notification
120
-	*
121
-	* @return string
122
-	*/
119
+	 * Get the HTML formatted title of this notification
120
+	 *
121
+	 * @return string
122
+	 */
123 123
 	public function get_title()
124 124
 	{
125 125
 		$link_name = $this->get_data('link_name');
@@ -129,20 +129,20 @@  discard block
 block discarded – undo
129 129
 	}
130 130
 
131 131
 	/**
132
-	* Get email template
133
-	*
134
-	* @return string
135
-	*/
132
+	 * Get email template
133
+	 *
134
+	 * @return string
135
+	 */
136 136
 	public function get_email_template()
137 137
 	{
138 138
 		return '@ernadoo_phpbbdirectory/directory_website_approved';
139 139
 	}
140 140
 
141 141
 	/**
142
-	* Get email template variables
143
-	*
144
-	* @return array
145
-	*/
142
+	 * Get email template variables
143
+	 *
144
+	 * @return array
145
+	 */
146 146
 	public function get_email_template_variables()
147 147
 	{
148 148
 		return array(
@@ -151,33 +151,33 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 
153 153
 	/**
154
-	* Get the url to this item
155
-	*
156
-	* @return string URL
157
-	*/
154
+	 * Get the url to this item
155
+	 *
156
+	 * @return string URL
157
+	 */
158 158
 	public function get_url()
159 159
 	{
160 160
 		return $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $this->get_data('cat_id')));
161 161
 	}
162 162
 
163 163
 	/**
164
-	* Users needed to query before this notification can be displayed
165
-	*
166
-	* @return array Array of user_ids
167
-	*/
164
+	 * Users needed to query before this notification can be displayed
165
+	 *
166
+	 * @return array Array of user_ids
167
+	 */
168 168
 	public function users_to_query()
169 169
 	{
170 170
 		return array();
171 171
 	}
172 172
 
173 173
 	/**
174
-	* Function for preparing the data for insertion in an SQL query
175
-	* (The service handles insertion)
176
-	*
177
-	* @param	array	$data				Data from submit link
178
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
179
-	* @return	array						Array of data ready to be inserted into the database
180
-	*/
174
+	 * Function for preparing the data for insertion in an SQL query
175
+	 * (The service handles insertion)
176
+	 *
177
+	 * @param	array	$data				Data from submit link
178
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
179
+	 * @return	array						Array of data ready to be inserted into the database
180
+	 */
181 181
 	public function create_insert_array($data, $pre_create_data = array())
182 182
 	{
183 183
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
migrations/v20x/v2_0_0.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 class v2_0_0 extends \phpbb\db\migration\container_aware_migration
14 14
 {
15 15
 	/**
16
-	* @inheritDoc
17
-	*/
16
+	 * @inheritDoc
17
+	 */
18 18
 	static public function depends_on()
19 19
 	{
20 20
 		return array(
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	/**
26
-	* @inheritDoc
27
-	*/
26
+	 * @inheritDoc
27
+	 */
28 28
 	public function update_data()
29 29
 	{
30 30
 		return array(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		{
46 46
 			$default_reparser = new $fast_reparsers[0][0](
47 47
 				$this->db,
48
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[0][1]);
48
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[0][1]);
49 49
 
50 50
 			$resume_data = array(
51 51
 				'reparser'	=> 0,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		{
61 61
 			$reparser = new $fast_reparsers[$resume_data['reparser']][0](
62 62
 				$this->db,
63
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[$resume_data['reparser']][1]
63
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[$resume_data['reparser']][1]
64 64
 				);
65 65
 
66 66
 			// New reparser
Please login to merge, or discard this patch.
textreparser/plugins/comment_text.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 class comment_text extends \phpbb\textreparser\row_based_plugin
14 14
 {
15 15
 	/**
16
-	* {@inheritdoc}
17
-	*/
16
+	 * {@inheritdoc}
17
+	 */
18 18
 	public function get_columns()
19 19
 	{
20 20
 		return array(
Please login to merge, or discard this patch.
acp/phpbbdirectory_module.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 	public $u_action;
20 20
 
21 21
 	/**
22
-	*
23
-	* @param int	$id
24
-	* @param string	$mode
25
-	*/
22
+	 *
23
+	 * @param int	$id
24
+	 * @param string	$mode
25
+	 */
26 26
 	public function main($id, $mode)
27 27
 	{
28 28
 		global $request, $phpbb_container;
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 	}
188 188
 
189 189
 	/**
190
-	* Display thumb services available
191
-	*
192
-	* @param 	string	$url_selected
193
-	* @return 	string
194
-	*/
190
+	 * Display thumb services available
191
+	 *
192
+	 * @param 	string	$url_selected
193
+	 * @return 	string
194
+	 */
195 195
 	public function get_thumb_service_list($url_selected)
196 196
 	{
197 197
 		$thumbshot = array(
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
 	}
212 212
 
213 213
 	/**
214
-	* Display order drop-down list
215
-	*
216
-	* @param	string	$order_selected
217
-	* @return	string
218
-	*/
214
+	 * Display order drop-down list
215
+	 *
216
+	 * @param	string	$order_selected
217
+	 * @return	string
218
+	 */
219 219
 	public function get_order_list($order_selected)
220 220
 	{
221 221
 		global $user;
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 	}
245 245
 
246 246
 	/**
247
-	* Adjust all three max_filesize config vars for display
248
-	*/
247
+	 * Adjust all three max_filesize config vars for display
248
+	 */
249 249
 	public function max_filesize($value, $key = '')
250 250
 	{
251 251
 		// Determine size var and adjust the value accordingly
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		{
205 205
 			$selected = ($url == $url_selected) ? 'selected="selected"' : '';
206 206
 
207
-			$select_options .= '<option value="' . $url . '" ' . $selected . '>' . parse_url($url, PHP_URL_HOST) . '</option>';
207
+			$select_options .= '<option value="'.$url.'" '.$selected.'>'.parse_url($url, PHP_URL_HOST).'</option>';
208 208
 		}
209 209
 
210 210
 		return $select_options;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		{
238 238
 			$selected = ($i == $order_selected) ? 'selected="selected"' : '';
239 239
 			$order_substr = trim(str_replace(' ', '_', $i));
240
-			$tpl .= '<option value="' . $i . '" ' . $selected . '>' . $user->lang['DIR_ORDER_' . strtoupper($order_substr)] . '</option>';
240
+			$tpl .= '<option value="'.$i.'" '.$selected.'>'.$user->lang['DIR_ORDER_'.strtoupper($order_substr)].'</option>';
241 241
 		}
242 242
 
243 243
 		return ($tpl);
@@ -254,6 +254,6 @@  discard block
 block discarded – undo
254 254
 		$value = $filesize['value'];
255 255
 
256 256
 		// size and maxlength must not be specified for input of type number
257
-		return '<input type="number" id="' . $key . '" min="0" max="999999999999999" step="any" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
257
+		return '<input type="number" id="'.$key.'" min="0" max="999999999999999" step="any" name="config['.$key.']" value="'.$value.'" /> <select name="'.$key.'">'.size_select_options($size_var).'</select>';
258 258
 	}
259 259
 }
Please login to merge, or discard this patch.
controller/links.php 2 patches
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -69,22 +69,22 @@  discard block
 block discarded – undo
69 69
 	protected $php_ext;
70 70
 
71 71
 	/**
72
-	* Constructor
73
-	*
74
-	* @param \phpbb\db\driver\driver_interface 		$db					Database object
75
-	* @param \phpbb\config\config					$config				Config object
76
-	* @param \phpbb\language\language				$language			Language object
77
-	* @param \phpbb\template\template				$template			Template object
78
-	* @param \phpbb\user							$user				User object
79
-	* @param \phpbb\controller\helper				$helper				Controller helper object
80
-	* @param \phpbb\request\request					$request			Request object
81
-	* @param \phpbb\auth\auth						$auth				Auth object
82
-	* @param \phpbb\captcha\factory					$captcha_factory	Captcha object
83
-	* @param \ernadoo\phpbbdirectory\core\categorie	$categorie			PhpBB Directory extension categorie object
84
-	* @param \ernadoo\phpbbdirectory\core\link		$link				PhpBB Directory extension link object
85
-	* @param string									$root_path			phpBB root path
86
-	* @param string									$php_ext   			phpEx
87
-	*/
72
+	 * Constructor
73
+	 *
74
+	 * @param \phpbb\db\driver\driver_interface 		$db					Database object
75
+	 * @param \phpbb\config\config					$config				Config object
76
+	 * @param \phpbb\language\language				$language			Language object
77
+	 * @param \phpbb\template\template				$template			Template object
78
+	 * @param \phpbb\user							$user				User object
79
+	 * @param \phpbb\controller\helper				$helper				Controller helper object
80
+	 * @param \phpbb\request\request					$request			Request object
81
+	 * @param \phpbb\auth\auth						$auth				Auth object
82
+	 * @param \phpbb\captcha\factory					$captcha_factory	Captcha object
83
+	 * @param \ernadoo\phpbbdirectory\core\categorie	$categorie			PhpBB Directory extension categorie object
84
+	 * @param \ernadoo\phpbbdirectory\core\link		$link				PhpBB Directory extension link object
85
+	 * @param string									$root_path			phpBB root path
86
+	 * @param string									$php_ext   			phpEx
87
+	 */
88 88
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
89 89
 	{
90 90
 		$this->db				= $db;
@@ -109,12 +109,12 @@  discard block
 block discarded – undo
109 109
 	}
110 110
 
111 111
 	/**
112
-	* Delete a link
113
-	*
114
-	* @param	int	$cat_id		The category ID
115
-	* @param	int	$link_id		The link ID
116
-	* @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
117
-	*/
112
+	 * Delete a link
113
+	 *
114
+	 * @param	int	$cat_id		The category ID
115
+	 * @param	int	$link_id		The link ID
116
+	 * @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
117
+	 */
118 118
 	public function delete_link($cat_id, $link_id)
119 119
 	{
120 120
 		if ($this->request->is_set_post('cancel'))
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
 	}
158 158
 
159 159
 	/**
160
-	* Edit a link
161
-	*
162
-	* @param	int	$cat_id		The category ID
163
-	* @param	int	$link_id	The link ID
164
-	* @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
165
-	* @throws	\phpbb\exception\http_exception
166
-	*/
160
+	 * Edit a link
161
+	 *
162
+	 * @param	int	$cat_id		The category ID
163
+	 * @param	int	$link_id	The link ID
164
+	 * @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
165
+	 * @throws	\phpbb\exception\http_exception
166
+	 */
167 167
 	public function edit_link($cat_id, $link_id)
168 168
 	{
169 169
 		$sql = 'SELECT link_user_id
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
 	}
239 239
 
240 240
 	/**
241
-	* Display add form
242
-	*
243
-	* @param	int	$cat_id		The category ID
244
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
245
-	* @throws	\phpbb\exception\http_exception
246
-	*/
241
+	 * Display add form
242
+	 *
243
+	 * @param	int	$cat_id		The category ID
244
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
245
+	 * @throws	\phpbb\exception\http_exception
246
+	 */
247 247
 	public function new_link($cat_id)
248 248
 	{
249 249
 		if (!$this->auth->acl_get('u_submit_dir'))
@@ -285,23 +285,23 @@  discard block
 block discarded – undo
285 285
 	}
286 286
 
287 287
 	/**
288
-	* View link controller
289
-	*
290
-	* @param	int	$link_id		The link ID
291
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
292
-	*/
288
+	 * View link controller
289
+	 *
290
+	 * @param	int	$link_id		The link ID
291
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
292
+	 */
293 293
 	public function view_link($link_id)
294 294
 	{
295 295
 		return $this->link->view($link_id);
296 296
 	}
297 297
 
298 298
 	/**
299
-	* Vote for a link
300
-	*
301
-	* @param	int $cat_id		The category ID
302
-	* @param	int $link_id	The link ID
303
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
304
-	*/
299
+	 * Vote for a link
300
+	 *
301
+	 * @param	int $cat_id		The category ID
302
+	 * @param	int $link_id	The link ID
303
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
304
+	 */
305 305
 	public function vote_link($cat_id, $link_id)
306 306
 	{
307 307
 		$this->categorie->get($cat_id);
@@ -337,14 +337,14 @@  discard block
 block discarded – undo
337 337
 	}
338 338
 
339 339
 	/**
340
-	* Routine
341
-	*
342
-	* @param	int		$cat_id		The category ID
343
-	* @param	int		$link_id	The link ID
344
-	* @param	string	$mode		add|edit
345
-	* @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
346
-	* @throws	\phpbb\exception\http_exception
347
-	*/
340
+	 * Routine
341
+	 *
342
+	 * @param	int		$cat_id		The category ID
343
+	 * @param	int		$link_id	The link ID
344
+	 * @param	string	$mode		add|edit
345
+	 * @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
346
+	 * @throws	\phpbb\exception\http_exception
347
+	 */
348 348
 	private function _data_processing($cat_id, $link_id = 0, $mode = 'new')
349 349
 	{
350 350
 		if (($mode == 'edit' && !$this->auth->acl_get('m_edit_dir') && !$this->auth->acl_get('u_edit_dir')) || ($mode == 'new' && !$this->auth->acl_get('u_submit_dir')))
@@ -434,8 +434,8 @@  discard block
 block discarded – undo
434 434
 		if (!$error)
435 435
 		{
436 436
 			/**
437
-			* No errrors, we execute heavy tasks wich need a valid url
438
-			*/
437
+			 * No errrors, we execute heavy tasks wich need a valid url
438
+			 */
439 439
 
440 440
 			// Banner
441 441
 			$this->link->banner_process($this->banner, $error);
@@ -520,11 +520,11 @@  discard block
 block discarded – undo
520 520
 	}
521 521
 
522 522
 	/**
523
-	* Display a banner
524
-	*
525
-	* @param	string $banner_img		Path to banner file
526
-	* @return	Response object
527
-	*/
523
+	 * Display a banner
524
+	 *
525
+	 * @param	string $banner_img		Path to banner file
526
+	 * @return	Response object
527
+	 */
528 528
 	public function return_banner($banner_img)
529 529
 	{
530 530
 		if (!function_exists('file_gc'))
@@ -558,13 +558,13 @@  discard block
 block discarded – undo
558 558
 	}
559 559
 
560 560
 	/**
561
-	* Populate form when an error occurred
562
-	*
563
-	* @param	int		$cat_id		The category ID
564
-	* @param	string	$mode		add|edit
565
-	* @param	string	$title		Page title (depends of $mode)
566
-	* @return	null
567
-	*/
561
+	 * Populate form when an error occurred
562
+	 *
563
+	 * @param	int		$cat_id		The category ID
564
+	 * @param	string	$mode		add|edit
565
+	 * @param	string	$title		Page title (depends of $mode)
566
+	 * @return	null
567
+	 */
568 568
 	private function _populate_form($cat_id, $mode, $title)
569 569
 	{
570 570
 		global $phpbb_extension_manager;
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 	*/
88 88
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
89 89
 	{
90
-		$this->db				= $db;
91
-		$this->config			= $config;
90
+		$this->db = $db;
91
+		$this->config = $config;
92 92
 		$this->language			= $language;
93 93
 		$this->template			= $template;
94 94
 		$this->user				= $user;
95
-		$this->helper			= $helper;
96
-		$this->request			= $request;
95
+		$this->helper = $helper;
96
+		$this->request = $request;
97 97
 		$this->auth				= $auth;
98
-		$this->captcha_factory 	= $captcha_factory;
98
+		$this->captcha_factory = $captcha_factory;
99 99
 		$this->categorie		= $categorie;
100 100
 		$this->link				= $link;
101 101
 		$this->root_path		= $root_path;
102
-		$this->php_ext			= $php_ext;
102
+		$this->php_ext = $php_ext;
103 103
 
104 104
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
105 105
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		$sql = 'SELECT link_user_id
127
-			FROM ' . $this->links_table . '
127
+			FROM ' . $this->links_table.'
128 128
 			WHERE link_id = ' . (int) $link_id;
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		$link_data = $this->db->sql_fetchrow($result);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
149 149
 			meta_refresh(3, $meta_info);
150
-			$message = $this->language->lang('DIR_DELETE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)) . '">', '</a>');
150
+			$message = $this->language->lang('DIR_DELETE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)).'">', '</a>');
151 151
 			return $this->helper->message($message);
152 152
 		}
153 153
 		else
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	public function edit_link($cat_id, $link_id)
168 168
 	{
169 169
 		$sql = 'SELECT link_user_id
170
-			FROM ' . $this->links_table . '
170
+			FROM ' . $this->links_table.'
171 171
 			WHERE link_id = ' . (int) $link_id;
172 172
 		$result = $this->db->sql_query($sql);
173 173
 		$link_data = $this->db->sql_fetchrow($result);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$cat_id		= $this->request->variable('id', $cat_id);
184 184
 		$submit		= $this->request->is_set_post('submit') ? true : false;
185 185
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
186
-		$title		= $this->language->lang('DIR_EDIT_SITE');
186
+		$title = $this->language->lang('DIR_EDIT_SITE');
187 187
 
188 188
 		$this->template->assign_block_vars('dir_navlinks', array(
189 189
 			'FORUM_NAME'	=> $title,
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		else
204 204
 		{
205 205
 			$sql = 'SELECT link_id, link_uid, link_flags, link_bitfield, link_cat, link_url, link_description, link_guest_email, link_name, link_rss, link_back, link_banner, link_flag, link_cat, link_time
206
-				FROM ' . $this->links_table . '
206
+				FROM ' . $this->links_table.'
207 207
 				WHERE link_id = ' . (int) $link_id;
208 208
 			$result = $this->db->sql_query($sql);
209 209
 
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 				'old_banner'	=> $site['link_banner'],
220 220
 			);
221 221
 
222
-			$site_description		= generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
-			$site['link_banner'] 	= (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
222
+			$site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
+			$site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
224 224
 
225
-			$this->url			= $site['link_url'];
226
-			$this->site_name	= $site['link_name'];
225
+			$this->url = $site['link_url'];
226
+			$this->site_name = $site['link_name'];
227 227
 			$this->description	= $site_description['text'];
228 228
 			$this->guest_email	= $site['link_guest_email'];
229
-			$this->rss			= $site['link_rss'];
230
-			$this->banner 		= $site['link_banner'];
229
+			$this->rss = $site['link_rss'];
230
+			$this->banner = $site['link_banner'];
231 231
 			$this->back			= $site['link_back'];
232 232
 			$this->flag 		= $site['link_flag'];
233 233
 		}
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		$cat_id		= $this->request->variable('id', $cat_id);
255 255
 		$submit		= $this->request->is_set_post('submit') ? true : false;
256 256
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
257
-		$title		= $this->language->lang('DIR_NEW_SITE');
257
+		$title = $this->language->lang('DIR_NEW_SITE');
258 258
 
259 259
 		$this->template->assign_block_vars('dir_navlinks', array(
260 260
 			'FORUM_NAME'	=> $title,
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 		// We check if user had already vot for this website.
320 320
 		$sql = 'SELECT vote_link_id
321
-			FROM ' . $this->votes_table . '
321
+			FROM ' . $this->votes_table.'
322 322
 			WHERE ' . $this->db->sql_build_array('SELECT', $data);
323 323
 		$result = $this->db->sql_query($sql);
324 324
 		$data = $this->db->sql_fetchrow($result);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
 		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
334 334
 		meta_refresh(3, $meta_info);
335
-		$message = $this->language->lang('DIR_VOTE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>');
335
+		$message = $this->language->lang('DIR_VOTE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$meta_info.'">', '</a>');
336 336
 		return $this->helper->message($message);
337 337
 	}
338 338
 
@@ -357,18 +357,18 @@  discard block
 block discarded – undo
357 357
 			return $this->helper->message('FORM_INVALID');
358 358
 		}
359 359
 
360
-		$this->url			= $this->request->variable('url', '');
361
-		$this->site_name	= $this->request->variable('site_name', '', true);
360
+		$this->url = $this->request->variable('url', '');
361
+		$this->site_name = $this->request->variable('site_name', '', true);
362 362
 		$this->description	= $this->request->variable('description', '', true);
363 363
 		$this->guest_email	= $this->request->variable('guest_email', '');
364
-		$this->rss			= $this->request->variable('rss', '');
365
-		$this->banner 		= $this->request->variable('banner', '');
364
+		$this->rss = $this->request->variable('rss', '');
365
+		$this->banner = $this->request->variable('banner', '');
366 366
 		$this->back			= $this->request->variable('back', '');
367 367
 		$this->flag 		= $this->request->variable('flag', '');
368 368
 
369 369
 		if (!function_exists('validate_data'))
370 370
 		{
371
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
371
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
372 372
 		}
373 373
 
374 374
 		// We define variables to check
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
 			'site_name' =>			array(
392 392
 				array('string', false, 1, 100)),
393 393
 			'website'		=>		array(
394
-				array('string',	false, 12, 255),
395
-				array('match',	true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
394
+				array('string', false, 12, 255),
395
+				array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
396 396
 			'description'	=>		array(
397 397
 				array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])),
398 398
 			'rss'			=>		array(
399 399
 				array('string', true, 12, 255),
400
-				array('match',	empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
400
+				array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
401 401
 			'banner'		=>		array(
402 402
 				array('string', true, 5, 255)),
403 403
 			'back'			=>		array(
404
-				array('string',	!$this->categorie->data['cat_link_back'], 12, 255),
404
+				array('string', !$this->categorie->data['cat_link_back'], 12, 255),
405 405
 				array(array($this->link, 'link_back'), true)),
406 406
 			'cat'			=>		array(
407 407
 				array('num', '', 1))
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 		// Still no errors?? So let's go!
451 451
 		if (!$error)
452 452
 		{
453
-			$this->banner	= (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
-			$this->url		= $this->link->clean_url($this->url);
453
+			$this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
+			$this->url = $this->link->clean_url($this->url);
455 455
 
456 456
 			$data_edit = array(
457 457
 				'link_user_id'		=> $this->link_user_id,
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
501 501
 			meta_refresh(3, $meta_info);
502 502
 			$message	= ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK');
503
-			$message	= $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)) . '">', '</a>');
503
+			$message	= $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)).'">', '</a>');
504 504
 			return $this->helper->message($message);
505 505
 		}
506 506
 		else
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 	{
530 530
 		if (!function_exists('file_gc'))
531 531
 		{
532
-			include($this->root_path . 'includes/functions_download.' . $this->php_ext);
532
+			include($this->root_path.'includes/functions_download.'.$this->php_ext);
533 533
 		}
534 534
 
535 535
 		$file_path = $this->get_banner_path($banner_img);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 
585 585
 		if (!function_exists('display_custom_bbcodes'))
586 586
 		{
587
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
587
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
588 588
 		}
589 589
 		display_custom_bbcodes();
590 590
 		add_form_key('dir_form');
@@ -593,17 +593,17 @@  discard block
 block discarded – undo
593 593
 		$flag_path = $ext_path.'images/flags/';
594 594
 
595 595
 		$s_guest	= (!$this->user->data['is_registered'] || !empty($this->guest_email));
596
-		$s_rss		= $this->config['dir_activ_rss'];
597
-		$s_banner	= $this->config['dir_activ_banner'];
596
+		$s_rss = $this->config['dir_activ_rss'];
597
+		$s_banner = $this->config['dir_activ_banner'];
598 598
 		$s_back		= $this->categorie->data['cat_link_back'];
599 599
 		$s_flag		= $this->config['dir_activ_flag'];
600 600
 
601 601
 		$this->template->assign_vars(array(
602
-			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) 	? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
603
-			'IMG_STATUS'			=> ($this->config['allow_bbcode'])	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
602
+			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'),
603
+			'IMG_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
604 604
 			'SMILIES_STATUS'		=> ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
605 605
 			'URL_STATUS'			=> ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
606
-			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
606
+			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
607 607
 
608 608
 			'L_TITLE'				=> $title,
609 609
 			'L_DIR_DESCRIPTION_EXP'	=> $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']),
Please login to merge, or discard this patch.
controller/acp/validation.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -66,22 +66,22 @@  discard block
 block discarded – undo
66 66
 	private $links_data;
67 67
 
68 68
 	/**
69
-	* Constructor
70
-	*
71
-	* @param \phpbb\config\config								$config				Config object
72
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
73
-	* @param \phpbb\pagination									$pagination			Pagination object
74
-	* @param \phpbb\language\language							$language			Language object
75
-	* @param \phpbb\log\log										$log				Log object
76
-	* @param \phpbb\notification\manager						$notification		Notification object
77
-	* @param \phpbb\request\request								$request			Request object
78
-	* @param \phpbb\template\template							$template			Template object
79
-	* @param \phpbb\user										$user				User object
80
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
81
-	* @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
82
-	* @param string												$root_path			phpBB root path
83
-	* @param string												$php_ext   			phpEx
84
-	*/
69
+	 * Constructor
70
+	 *
71
+	 * @param \phpbb\config\config								$config				Config object
72
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
73
+	 * @param \phpbb\pagination									$pagination			Pagination object
74
+	 * @param \phpbb\language\language							$language			Language object
75
+	 * @param \phpbb\log\log										$log				Log object
76
+	 * @param \phpbb\notification\manager						$notification		Notification object
77
+	 * @param \phpbb\request\request								$request			Request object
78
+	 * @param \phpbb\template\template							$template			Template object
79
+	 * @param \phpbb\user										$user				User object
80
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
81
+	 * @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
82
+	 * @param string												$root_path			phpBB root path
83
+	 * @param string												$php_ext   			phpEx
84
+	 */
85 85
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
86 86
 	{
87 87
 		$this->config		= $config;
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 	}
103 103
 
104 104
 	/**
105
-	* Display confirm box
106
-	*
107
-	* @param	array $mark Website selected for (dis)approval
108
-	* @return	null
109
-	*/
105
+	 * Display confirm box
106
+	 *
107
+	 * @param	array $mark Website selected for (dis)approval
108
+	 * @return	null
109
+	 */
110 110
 	public function display_confirm($mark)
111 111
 	{
112 112
 		$s_hidden_fields = array(
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	/**
121
-	* Display website list for (dis)approval
122
-	*
123
-	* @return null
124
-	*/
121
+	 * Display website list for (dis)approval
122
+	 *
123
+	 * @return null
124
+	 */
125 125
 	public function display_websites()
126 126
 	{
127 127
 		global $phpbb_admin_path;
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 	}
226 226
 
227 227
 	/**
228
-	* Get link's information and call appropriate action
229
-	*
230
-	* @param	array $mark Website selected for (dis)approval
231
-	* @return	null
232
-	*/
228
+	 * Get link's information and call appropriate action
229
+	 *
230
+	 * @param	array $mark Website selected for (dis)approval
231
+	 * @return	null
232
+	 */
233 233
 	public function exec_action($mark)
234 234
 	{
235 235
 		$this->_get_infos_links($mark);
@@ -252,10 +252,10 @@  discard block
 block discarded – undo
252 252
 	}
253 253
 
254 254
 	/**
255
-	* Notify users which had submitted their websites
256
-	*
257
-	* @return null
258
-	*/
255
+	 * Notify users which had submitted their websites
256
+	 *
257
+	 * @return null
258
+	 */
259 259
 	public function notifiy_submiters()
260 260
 	{
261 261
 		if (!class_exists('messenger'))
@@ -299,22 +299,22 @@  discard block
 block discarded – undo
299 299
 	}
300 300
 
301 301
 	/**
302
-	* Set page url
303
-	*
304
-	* @param	string $u_action Custom form action
305
-	* @return	null
306
-	* @access	public
307
-	*/
302
+	 * Set page url
303
+	 *
304
+	 * @param	string $u_action Custom form action
305
+	 * @return	null
306
+	 * @access	public
307
+	 */
308 308
 	public function set_page_url($u_action)
309 309
 	{
310 310
 		$this->u_action = $u_action;
311 311
 	}
312 312
 
313 313
 	/**
314
-	* Approve action
315
-	*
316
-	* @return null
317
-	*/
314
+	 * Approve action
315
+	 *
316
+	 * @return null
317
+	 */
318 318
 	private function _action_approved()
319 319
 	{
320 320
 		foreach ($this->links_data as $row)
@@ -343,10 +343,10 @@  discard block
 block discarded – undo
343 343
 	}
344 344
 
345 345
 	/**
346
-	* Disapprove action
347
-	*
348
-	* @return null
349
-	*/
346
+	 * Disapprove action
347
+	 *
348
+	 * @return null
349
+	 */
350 350
 	private function _action_disapproved()
351 351
 	{
352 352
 		foreach ($this->links_data as $row)
@@ -367,11 +367,11 @@  discard block
 block discarded – undo
367 367
 	}
368 368
 
369 369
 	/**
370
-	* Get informations about links selected
371
-	*
372
-	* @param	$mark Website selected for (dis)approval
373
-	* @return	null
374
-	*/
370
+	 * Get informations about links selected
371
+	 *
372
+	 * @param	$mark Website selected for (dis)approval
373
+	 * @return	null
374
+	 */
375 375
 	private function _get_infos_links($mark)
376 376
 	{
377 377
 		$sql_array = array(
@@ -406,11 +406,11 @@  discard block
 block discarded – undo
406 406
 	}
407 407
 
408 408
 	/**
409
-	* Notify users which watch categories
410
-	*
411
-	* @param	$row Informations about website
412
-	* @return	null
413
-	*/
409
+	 * Notify users which watch categories
410
+	 *
411
+	 * @param	$row Informations about website
412
+	 * @return	null
413
+	 */
414 414
 	private function _notify_suscribers($row)
415 415
 	{
416 416
 		$notification_data = array(
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -84,21 +84,21 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
86 86
 	{
87
-		$this->config		= $config;
88
-		$this->db			= $db;
89
-		$this->pagination	= $pagination;
87
+		$this->config = $config;
88
+		$this->db = $db;
89
+		$this->pagination = $pagination;
90 90
 		$this->language		= $language;
91 91
 		$this->phpbb_log	= $log;
92
-		$this->notification	= $notification;
93
-		$this->request		= $request;
92
+		$this->notification = $notification;
93
+		$this->request = $request;
94 94
 		$this->template		= $template;
95 95
 		$this->user			= $user;
96 96
 		$this->categorie	= $categorie;
97 97
 		$this->link			= $link;
98 98
 		$this->root_path	= $root_path;
99
-		$this->php_ext		= $php_ext;
99
+		$this->php_ext = $php_ext;
100 100
 
101
-		$this->action		= $this->request->variable('action', '');
101
+		$this->action = $this->request->variable('action', '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
 		global $phpbb_admin_path;
128 128
 
129 129
 		// Sort keys
130
-		$sort_days	= $this->request->variable('st', 0);
130
+		$sort_days = $this->request->variable('st', 0);
131 131
 		$sort_key	= $this->request->variable('sk', 't');
132 132
 		$sort_dir	= $this->request->variable('sd', 'd');
133 133
 
134 134
 		// Number of entries to display
135 135
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
136 136
 
137
-		$start	= $this->request->variable('start', 0);
137
+		$start = $this->request->variable('start', 0);
138 138
 
139 139
 		// Categorie ordering options
140 140
 		$limit_days		= array(0 => $this->language->lang('SEE_ALL'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
 
151 151
 		if (is_array($sort_by_sql[$sort_key]))
152 152
 		{
153
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
153
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
154 154
 		}
155 155
 		else
156 156
 		{
157
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
157
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
158 158
 		}
159 159
 
160 160
 		$sql = 'SELECT COUNT(1) AS total_links
161
-			FROM ' . $this->links_table . '
161
+			FROM ' . $this->links_table.'
162 162
 			WHERE link_active = 0' .
163 163
 				(($sql_where) ? " AND link_time >= $sql_where" : '');
164 164
 		$result = $this->db->sql_query($sql);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 					'ON'	=> 'u.user_id = l.link_user_id'
183 183
 				)
184 184
 			),
185
-			'WHERE'		=> 'l.link_active = 0' . (($sql_where) ? " AND l.link_time >= $sql_where" : ''),
185
+			'WHERE'		=> 'l.link_active = 0'.(($sql_where) ? " AND l.link_time >= $sql_where" : ''),
186 186
 			'ORDER_BY'	=> $sql_sort_order);
187 187
 
188 188
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$option_ary = array('approved' => 'DIR_LINK_ACTIVATE', 'disapproved' => 'DIR_LINK_DELETE');
211 211
 
212
-		$base_url = $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page";
212
+		$base_url = $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page";
213 213
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_links, $per_page, $start);
214 214
 
215 215
 		$this->template->assign_vars(array(
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			'S_SORT_DIR'		=> $s_sort_dir,
221 221
 			'LINKS_PER_PAGE'	=> $per_page,
222 222
 
223
-			'U_ACTION'			=> $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
223
+			'U_ACTION'			=> $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
224 224
 		));
225 225
 	}
226 226
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				return;
249 249
 		}
250 250
 
251
-		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_' . strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
251
+		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_'.strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
252 252
 	}
253 253
 
254 254
 	/**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	{
261 261
 		if (!class_exists('messenger'))
262 262
 		{
263
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
263
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
264 264
 		}
265 265
 		$messenger = new \messenger(false);
266 266
 
@@ -327,15 +327,15 @@  discard block
 block discarded – undo
327 327
 				'link_cat'		=> (int) $row['link_cat'],
328 328
 			);
329 329
 
330
-			$sql = 'UPDATE ' . $this->links_table . '
331
-							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
330
+			$sql = 'UPDATE '.$this->links_table.'
331
+							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
332 332
 							WHERE link_id = ' . (int) $row['link_id'];
333 333
 			$this->db->sql_query($sql);
334 334
 		}
335 335
 
336 336
 		foreach ($this->cat_data as $cat_id => $count)
337 337
 		{
338
-			$sql = 'UPDATE ' . $this->categories_table . '
338
+			$sql = 'UPDATE '.$this->categories_table.'
339 339
 							SET cat_links = cat_links + '.$count.'
340 340
 							WHERE cat_id = ' . (int) $cat_id;
341 341
 			$this->db->sql_query($sql);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 				}
362 362
 			}
363 363
 
364
-			$sql = 'DELETE FROM ' . $this->links_table . ' WHERE link_id = ' . (int) $row['link_id'];
364
+			$sql = 'DELETE FROM '.$this->links_table.' WHERE link_id = '.(int) $row['link_id'];
365 365
 			$this->db->sql_query($sql);
366 366
 		}
367 367
 	}
Please login to merge, or discard this patch.