@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | public $u_action; |
44 | 44 | |
45 | 45 | /** |
46 | - * Constructor |
|
47 | - */ |
|
46 | + * Constructor |
|
47 | + */ |
|
48 | 48 | public function __construct() |
49 | 49 | { |
50 | 50 | global $cache, $config, $db, $phpbb_log, $request, $template, $user; |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * Main ACP module |
|
66 | - * |
|
67 | - * @access public |
|
68 | - */ |
|
65 | + * Main ACP module |
|
66 | + * |
|
67 | + * @access public |
|
68 | + */ |
|
69 | 69 | public function main() |
70 | 70 | { |
71 | 71 | $this->tpl_name = 'acp_dbtool'; |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * Run database tool |
|
89 | - * |
|
90 | - * @access protected |
|
91 | - */ |
|
88 | + * Run database tool |
|
89 | + * |
|
90 | + * @access protected |
|
91 | + */ |
|
92 | 92 | protected function run_tool() |
93 | 93 | { |
94 | 94 | $operation = $this->request->variable('operation', ''); |
@@ -123,14 +123,14 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
126 | - * Perform table SQL query and return any messages |
|
127 | - * |
|
128 | - * @param string $operation OPTIMIZE, REPAIR, or CHECK |
|
129 | - * @param string $tables Comma delineated string of all tables to be processed |
|
130 | - * @param int $disable_board The user's option to disable the board during run time |
|
131 | - * @return string Any errors or status information |
|
132 | - * @access protected |
|
133 | - */ |
|
126 | + * Perform table SQL query and return any messages |
|
127 | + * |
|
128 | + * @param string $operation OPTIMIZE, REPAIR, or CHECK |
|
129 | + * @param string $tables Comma delineated string of all tables to be processed |
|
130 | + * @param int $disable_board The user's option to disable the board during run time |
|
131 | + * @return string Any errors or status information |
|
132 | + * @access protected |
|
133 | + */ |
|
134 | 134 | protected function process($operation, $tables, $disable_board = 0) |
135 | 135 | { |
136 | 136 | $this->extend_execution_limits(); |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * Generate Show Table Data |
|
164 | - * |
|
165 | - * @access protected |
|
166 | - */ |
|
163 | + * Generate Show Table Data |
|
164 | + * |
|
165 | + * @access protected |
|
166 | + */ |
|
167 | 167 | protected function display_tables() |
168 | 168 | { |
169 | 169 | $table_data = array(); |
@@ -206,47 +206,47 @@ discard block |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
209 | - * Is the database using MySQL |
|
210 | - * |
|
211 | - * @return bool True if MySQL, false otherwise |
|
212 | - * @access protected |
|
213 | - */ |
|
209 | + * Is the database using MySQL |
|
210 | + * |
|
211 | + * @return bool True if MySQL, false otherwise |
|
212 | + * @access protected |
|
213 | + */ |
|
214 | 214 | protected function is_mysql() |
215 | 215 | { |
216 | 216 | return $this->db->get_sql_layer() === 'mysql4' || $this->db->get_sql_layer() === 'mysqli'; |
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
220 | - * Is requested operation to optimize, repair or check tables |
|
221 | - * |
|
222 | - * @param string $operation The name of the operation |
|
223 | - * @return bool True if valid operation, false otherwise |
|
224 | - * @access public |
|
225 | - */ |
|
220 | + * Is requested operation to optimize, repair or check tables |
|
221 | + * |
|
222 | + * @param string $operation The name of the operation |
|
223 | + * @return bool True if valid operation, false otherwise |
|
224 | + * @access public |
|
225 | + */ |
|
226 | 226 | public function is_valid_operation($operation) |
227 | 227 | { |
228 | 228 | return in_array($operation, array('OPTIMIZE', 'REPAIR', 'CHECK')); |
229 | 229 | } |
230 | 230 | |
231 | 231 | /** |
232 | - * Only allow tables using MyISAM, InnoDB or Archive storage engines |
|
233 | - * |
|
234 | - * @param string $engine The name of the engine |
|
235 | - * @return bool True if valid engine, false otherwise |
|
236 | - * @access public |
|
237 | - */ |
|
232 | + * Only allow tables using MyISAM, InnoDB or Archive storage engines |
|
233 | + * |
|
234 | + * @param string $engine The name of the engine |
|
235 | + * @return bool True if valid engine, false otherwise |
|
236 | + * @access public |
|
237 | + */ |
|
238 | 238 | public function is_valid_engine($engine) |
239 | 239 | { |
240 | 240 | return in_array(strtolower($engine), array('myisam', 'innodb', 'archive')); |
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * Is the storage engine InnoDB |
|
245 | - * |
|
246 | - * @param string $engine The name of the engine |
|
247 | - * @return bool True if InnoDB engine, false otherwise |
|
248 | - * @access public |
|
249 | - */ |
|
244 | + * Is the storage engine InnoDB |
|
245 | + * |
|
246 | + * @param string $engine The name of the engine |
|
247 | + * @return bool True if InnoDB engine, false otherwise |
|
248 | + * @access public |
|
249 | + */ |
|
250 | 250 | public function is_innodb($engine) |
251 | 251 | { |
252 | 252 | return strtolower($engine) === 'innodb'; |
@@ -271,12 +271,12 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
274 | - * Display file size in the proper units |
|
275 | - * |
|
276 | - * @param int $size Number representing bytes |
|
277 | - * @return string $size with the correct units symbol appended |
|
278 | - * @access public |
|
279 | - */ |
|
274 | + * Display file size in the proper units |
|
275 | + * |
|
276 | + * @param int $size Number representing bytes |
|
277 | + * @return string $size with the correct units symbol appended |
|
278 | + * @access public |
|
279 | + */ |
|
280 | 280 | public function file_size($size) |
281 | 281 | { |
282 | 282 | $file_size_units = array(' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB'); |
@@ -284,10 +284,10 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
287 | - * Extend execution limits to mitigate timeouts |
|
288 | - * |
|
289 | - * @access protected |
|
290 | - */ |
|
287 | + * Extend execution limits to mitigate timeouts |
|
288 | + * |
|
289 | + * @access protected |
|
290 | + */ |
|
291 | 291 | protected function extend_execution_limits() |
292 | 292 | { |
293 | 293 | // Disable safe mode to allow set_time_limit to work |