Completed
Push — master ( 4233fc...e6ac24 )
by Khoa
03:46
created
ext/vinabb/web/controllers/acp/helper/setting_tasks.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 	protected $lang_data;
41 41
 
42 42
 	/**
43
-	* Constructor
44
-	*
45
-	* @param \vinabb\web\controllers\cache\service_interface	$cache		Cache service
46
-	* @param \phpbb\config\config								$config		Config object
47
-	* @param \phpbb\db\driver\driver_interface					$db			Database object
48
-	* @param \phpbb\language\language							$language	Language object
49
-	* @param \phpbb\log\log										$log		Log object
50
-	* @param \phpbb\request\request								$request	Request object
51
-	* @param \phpbb\user										$user		User object
52
-	*/
43
+	 * Constructor
44
+	 *
45
+	 * @param \vinabb\web\controllers\cache\service_interface	$cache		Cache service
46
+	 * @param \phpbb\config\config								$config		Config object
47
+	 * @param \phpbb\db\driver\driver_interface					$db			Database object
48
+	 * @param \phpbb\language\language							$language	Language object
49
+	 * @param \phpbb\log\log										$log		Log object
50
+	 * @param \phpbb\request\request								$request	Request object
51
+	 * @param \phpbb\user										$user		User object
52
+	 */
53 53
 	public function __construct(
54 54
 		\vinabb\web\controllers\cache\service_interface $cache,
55 55
 		\phpbb\config\config $config,
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	/**
75
-	* Radio options for the config item 'maintenance_mode'
76
-	*
77
-	* @return array
78
-	*/
75
+	 * Radio options for the config item 'maintenance_mode'
76
+	 *
77
+	 * @return array
78
+	 */
79 79
 	public function maintenance_mode_type_data()
80 80
 	{
81 81
 		return [
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Check only founders can set the founder-level maintenance mode
92
-	*
93
-	* @param int $value Input value
94
-	* @return bool
95
-	*/
91
+	 * Check only founders can set the founder-level maintenance mode
92
+	 *
93
+	 * @param int $value Input value
94
+	 * @return bool
95
+	 */
96 96
 	public function maintenance_mode_founder($value)
97 97
 	{
98 98
 		return !($value == constants::MAINTENANCE_MODE_FOUNDER && $this->user->data['user_type'] != USER_FOUNDER);
99 99
 	}
100 100
 
101 101
 	/**
102
-	* Kill out all normal administrators from the ACP
103
-	* keep only founder-level sessions
104
-	*
105
-	* @param int $value Input value
106
-	*/
102
+	 * Kill out all normal administrators from the ACP
103
+	 * keep only founder-level sessions
104
+	 *
105
+	 * @param int $value Input value
106
+	 */
107 107
 	public function maintenance_mode_founder_task($value)
108 108
 	{
109 109
 		if ($value == constants::MAINTENANCE_MODE_FOUNDER)
@@ -133,20 +133,20 @@  discard block
 block discarded – undo
133 133
 	}
134 134
 
135 135
 	/**
136
-	* Convert the scheduled maintenance time from 'number of minutes' into 'UNIX timestamp'
137
-	*
138
-	* @param string $value Input value
139
-	*/
136
+	 * Convert the scheduled maintenance time from 'number of minutes' into 'UNIX timestamp'
137
+	 *
138
+	 * @param string $value Input value
139
+	 */
140 140
 	public function maintenance_time_task($value)
141 141
 	{
142 142
 		$this->config->set('vinabb_web_maintenance_time', $this->user->get_timestamp_from_format(constants::FORMAT_DATETIME_W3C, $value));
143 143
 	}
144 144
 
145 145
 	/**
146
-	* Reset the stored newest phpBB version if the branch has changed
147
-	*
148
-	* @param string $value Input value
149
-	*/
146
+	 * Reset the stored newest phpBB version if the branch has changed
147
+	 *
148
+	 * @param string $value Input value
149
+	 */
150 150
 	public function reset_phpbb_version_task($value)
151 151
 	{
152 152
 		if ($value != '' && $this->config['vinabb_web_check_phpbb_branch'] != '')
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 
160 160
 	/**
161
-	* Reset the stored newest phpBB legacy version if the branch has changed
162
-	*
163
-	* @param string $value Input value
164
-	*/
161
+	 * Reset the stored newest phpBB legacy version if the branch has changed
162
+	 *
163
+	 * @param string $value Input value
164
+	 */
165 165
 	public function reset_phpbb_legacy_version_task($value)
166 166
 	{
167 167
 		if ($value != '' && $this->config['vinabb_web_check_phpbb_legacy_branch'] != '')
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
 	}
174 174
 
175 175
 	/**
176
-	* Reset the stored newest phpBB development version if the branch has changed
177
-	*
178
-	* @param string $value Input value
179
-	*/
176
+	 * Reset the stored newest phpBB development version if the branch has changed
177
+	 *
178
+	 * @param string $value Input value
179
+	 */
180 180
 	public function reset_phpbb_dev_version_task($value)
181 181
 	{
182 182
 		if ($value != '' && $this->config['vinabb_web_check_phpbb_dev_branch'] != '')
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
 	}
189 189
 
190 190
 	/**
191
-	* Reset the stored newest PHP versions if the branch has changed
192
-	*
193
-	* @param string $value Input value
194
-	*/
191
+	 * Reset the stored newest PHP versions if the branch has changed
192
+	 *
193
+	 * @param string $value Input value
194
+	 */
195 195
 	public function reset_php_versions_task($value)
196 196
 	{
197 197
 		if ($value != '' && $this->config['vinabb_web_check_php_branches'] != '')
@@ -203,21 +203,21 @@  discard block
 block discarded – undo
203 203
 	}
204 204
 
205 205
 	/**
206
-	* Get default language name
207
-	*
208
-	* @return string
209
-	*/
206
+	 * Get default language name
207
+	 *
208
+	 * @return string
209
+	 */
210 210
 	public function get_default_lang_name()
211 211
 	{
212 212
 		return $this->lang_data[$this->config['default_lang']]['english_name'] . ' (' . $this->lang_data[$this->config['default_lang']]['local_name'] . ')';
213 213
 	}
214 214
 
215 215
 	/**
216
-	* Select an extra language to switch
217
-	*
218
-	* @param string $selected_lang 2-letter language ISO code
219
-	* @return string HTML code
220
-	*/
216
+	 * Select an extra language to switch
217
+	 *
218
+	 * @param string $selected_lang 2-letter language ISO code
219
+	 * @return string HTML code
220
+	 */
221 221
 	public function build_lang_list($selected_lang)
222 222
 	{
223 223
 		$lang_switch_options = '<option value=""' . (($selected_lang == '') ? ' selected' : '') . '>' . $this->language->lang('SELECT_LANG') . '</option>';
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
 	}
235 235
 
236 236
 	/**
237
-	* Select categories (not postable forums)
238
-	*
239
-	* @param int $selected_forum Selected forum ID
240
-	* @return string HTML code
241
-	*/
237
+	 * Select categories (not postable forums)
238
+	 *
239
+	 * @param int $selected_forum Selected forum ID
240
+	 * @return string HTML code
241
+	 */
242 242
 	public function build_forum_list($selected_forum)
243 243
 	{
244 244
 		$forum_options = '<option value=""' . (($selected_forum == 0) ? ' selected' : '') . '>' . $this->language->lang('SELECT_FORUM') . '</option>';
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
 	}
256 256
 
257 257
 	/**
258
-	* Clear menu cache when change BB type icon
259
-	*/
258
+	 * Clear menu cache when change BB type icon
259
+	 */
260 260
 	public function clear_menu_cache()
261 261
 	{
262 262
 		$this->cache->clear_menus();
Please login to merge, or discard this patch.
ext/vinabb/web/migrations/v10x/bbcode.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 	protected $insert_data;
29 29
 
30 30
 	/**
31
-	* Update data
32
-	*
33
-	* @return array
34
-	*/
31
+	 * Update data
32
+	 *
33
+	 * @return array
34
+	 */
35 35
 	public function update_data()
36 36
 	{
37 37
 		return [['custom', [[&$this, 'add_bbcode_tags']]]];
38 38
 	}
39 39
 
40 40
 	/**
41
-	* Add new BBCode tags for SCEditor
42
-	*/
41
+	 * Add new BBCode tags for SCEditor
42
+	 */
43 43
 	public function add_bbcode_tags()
44 44
 	{
45 45
 		$this->update_or_insert();
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	/**
51
-	* Update existing BBCode tags with new data
52
-	*/
51
+	 * Update existing BBCode tags with new data
52
+	 */
53 53
 	protected function update_bbcode_tags()
54 54
 	{
55 55
 		if (!empty($this->update_data))
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	/**
68
-	* Insert new BBCode tags
69
-	*/
68
+	 * Insert new BBCode tags
69
+	 */
70 70
 	protected function insert_bbcode_tags()
71 71
 	{
72 72
 		if (!empty($this->insert_data))
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 	}
86 86
 
87 87
 	/**
88
-	* Get BBCode syntax and its replacement HTML code
89
-	* Help line is not used in SCEditor, but let store it as a language key for later
90
-	*/
88
+	 * Get BBCode syntax and its replacement HTML code
89
+	 * Help line is not used in SCEditor, but let store it as a language key for later
90
+	 */
91 91
 	protected function get_bbcode_data()
92 92
 	{
93 93
 		$this->bbcode_data = [
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	/**
109
-	* Generate match and replacement data for BBCode tags
110
-	*/
109
+	 * Generate match and replacement data for BBCode tags
110
+	 */
111 111
 	protected function build_bbcode_data()
112 112
 	{
113 113
 		// Load the class acp_bbcode
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 	}
133 133
 
134 134
 	/**
135
-	* Update existing tags, then insert new ones
136
-	*/
135
+	 * Update existing tags, then insert new ones
136
+	 */
137 137
 	protected function update_or_insert()
138 138
 	{
139 139
 		$this->get_existing_bbcode_tags();
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 	}
154 154
 
155 155
 	/**
156
-	* Get existing BBCode tag names
157
-	*/
156
+	 * Get existing BBCode tag names
157
+	 */
158 158
 	protected function get_existing_bbcode_tags()
159 159
 	{
160 160
 		$sql = 'SELECT bbcode_id, bbcode_tag
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
 	}
170 170
 
171 171
 	/**
172
-	* Get the next BBCode ID for the SQL INSERT query
173
-	*
174
-	* @return int
175
-	*/
172
+	 * Get the next BBCode ID for the SQL INSERT query
173
+	 *
174
+	 * @return int
175
+	 */
176 176
 	protected function get_max_bbcode_id()
177 177
 	{
178 178
 		$sql = 'SELECT MAX(bbcode_id) AS max_bbcode_id
Please login to merge, or discard this patch.