@@ -69,8 +69,7 @@ |
||
69 | 69 | if (is_dir($file)) |
70 | 70 | { |
71 | 71 | recursiveRemoveDirectory($file); |
72 | - } |
|
73 | - else |
|
72 | + } else |
|
74 | 73 | { |
75 | 74 | unlink($file); |
76 | 75 | } |
@@ -47,8 +47,7 @@ discard block |
||
47 | 47 | // Replace the md5 with the ' again and remove the space at the end to prevent \' troubles |
48 | 48 | $user_data['username'] = utf8_substr(str_replace("{{$import_schema}}", "'", $user_data['username']), 0, -1); |
49 | 49 | $image_name = utf8_substr(str_replace("{{$import_schema}}", "'", $image_name), 0, -1); |
50 | - } |
|
51 | - else |
|
50 | + } else |
|
52 | 51 | { |
53 | 52 | global $phpEx; |
54 | 53 | trigger_error($user->lang('MISSING_IMPORT_SCHEMA', ($import_schema . '.' . $phpEx)), E_USER_WARNING); |
@@ -198,8 +197,7 @@ discard block |
||
198 | 197 | if ($filename || ($image_name == '')) |
199 | 198 | { |
200 | 199 | $sql_ary['image_name'] = str_replace("_", " ", utf8_substr($image_src, 0, utf8_strrpos($image_src, '.'))); |
201 | - } |
|
202 | - else |
|
200 | + } else |
|
203 | 201 | { |
204 | 202 | $sql_ary['image_name'] = str_replace('{NUM}', $num_offset + $done_images, $image_name); |
205 | 203 | } |
@@ -239,14 +237,12 @@ discard block |
||
239 | 237 | if (!$errors) |
240 | 238 | { |
241 | 239 | trigger_error(sprintf($user->lang['IMPORT_FINISHED'], $done_images) . adm_back_link($this->u_action)); |
242 | - } |
|
243 | - else |
|
240 | + } else |
|
244 | 241 | { |
245 | 242 | $errors = explode("\n", $errors); |
246 | 243 | trigger_error(sprintf($user->lang['IMPORT_FINISHED_ERRORS'], $done_images - sizeof($errors)) . implode('<br />', $errors) . adm_back_link($this->u_action), E_USER_WARNING); |
247 | 244 | } |
248 | - } |
|
249 | - else |
|
245 | + } else |
|
250 | 246 | { |
251 | 247 | // Write the new list |
252 | 248 | $this->create_import_schema($import_schema, $album_id, $user_data, $start_time, $num_offset, $done_images, $todo_images, $image_name, $filename, $images); |
@@ -256,8 +252,7 @@ discard block |
||
256 | 252 | meta_refresh(1, $forward_url); |
257 | 253 | trigger_error(sprintf($user->lang['IMPORT_DEBUG_MES'], $done_images, $todo_images)); |
258 | 254 | } |
259 | - } |
|
260 | - else if ($submit) |
|
255 | + } else if ($submit) |
|
261 | 256 | { |
262 | 257 | if (!check_form_key('acp_gallery')) |
263 | 258 | { |
@@ -313,8 +308,7 @@ discard block |
||
313 | 308 | $album_id = $gallery_album->generate_personal_album($user_row['username'], $user_row['user_id'], $user_row['user_colour'], $image_user); |
314 | 309 | } |
315 | 310 | unset($image_user); |
316 | - } |
|
317 | - else |
|
311 | + } else |
|
318 | 312 | { |
319 | 313 | $album_id = $image_user->get_data('personal_album_id'); |
320 | 314 | if (!$album_id) |
@@ -196,8 +196,7 @@ discard block |
||
196 | 196 | if (isset($user_image_count[(int) $row['image_user_id']])) |
197 | 197 | { |
198 | 198 | $user_image_count[(int) $row['image_user_id']]++; |
199 | - } |
|
200 | - else |
|
199 | + } else |
|
201 | 200 | { |
202 | 201 | $user_image_count[(int) $row['image_user_id']] = 1; |
203 | 202 | } |
@@ -246,8 +245,7 @@ discard block |
||
246 | 245 | $this->gallery_config->set('newest_pega_username', $newest_pega['username']); |
247 | 246 | $this->gallery_config->set('newest_pega_user_colour', $newest_pega['user_colour']); |
248 | 247 | $this->gallery_config->set('newest_pega_album_id', $newest_pega['album_id']); |
249 | - } |
|
250 | - else |
|
248 | + } else |
|
251 | 249 | { |
252 | 250 | $this->gallery_config->set('newest_pega_user_id', 0); |
253 | 251 | $this->gallery_config->set('newest_pega_username', ''); |
@@ -244,8 +244,7 @@ |
||
244 | 244 | if (is_array($ids)) |
245 | 245 | { |
246 | 246 | return array_map('intval', $ids); |
247 | - } |
|
248 | - else |
|
247 | + } else |
|
249 | 248 | { |
250 | 249 | return array((int) $ids); |
251 | 250 | } |
@@ -244,8 +244,7 @@ |
||
244 | 244 | if (is_array($ids)) |
245 | 245 | { |
246 | 246 | return array_map('intval', $ids); |
247 | - } |
|
248 | - else |
|
247 | + } else |
|
249 | 248 | { |
250 | 249 | return array((int) $ids); |
251 | 250 | } |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | $mod_array[] = 0; |
87 | 87 | } |
88 | - } |
|
89 | - else |
|
88 | + } else |
|
90 | 89 | { |
91 | 90 | $mod_array = array($album); |
92 | 91 | } |
@@ -162,8 +161,7 @@ discard block |
||
162 | 161 | $this->template->assign_vars(array( |
163 | 162 | 'TOTAL_PAGES' => $this->lang->lang('PAGE_TITLE_NUMBER', $page + 1), |
164 | 163 | )); |
165 | - } |
|
166 | - else |
|
164 | + } else |
|
167 | 165 | { |
168 | 166 | $this->pagination->generate_template_pagination(array( |
169 | 167 | 'routes' => array( |
@@ -160,8 +160,7 @@ discard block |
||
160 | 160 | if (isset($this->data[$key])) |
161 | 161 | { |
162 | 162 | return $this->data[$key]; |
163 | - } |
|
164 | - else if ($default && $this->get_default_value($key) !== null) |
|
163 | + } else if ($default && $this->get_default_value($key) !== null) |
|
165 | 164 | { |
166 | 165 | return $this->get_default_value($key); |
167 | 166 | } |
@@ -359,12 +358,10 @@ discard block |
||
359 | 358 | if (is_array($user_ids) && !empty($user_ids)) |
360 | 359 | { |
361 | 360 | $sql_where = 'WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids)); |
362 | - } |
|
363 | - else if ($user_ids == 'all') |
|
361 | + } else if ($user_ids == 'all') |
|
364 | 362 | { |
365 | 363 | $sql_where = ''; |
366 | - } |
|
367 | - else |
|
364 | + } else |
|
368 | 365 | { |
369 | 366 | $sql_where = 'WHERE user_id = ' . (int) $user_ids; |
370 | 367 | } |
@@ -395,8 +392,7 @@ discard block |
||
395 | 392 | { |
396 | 393 | // While incrementing, the iamges might be lower than 0. |
397 | 394 | $validated_data[$name] = (int) $value; |
398 | - } |
|
399 | - else |
|
395 | + } else |
|
400 | 396 | { |
401 | 397 | $validated_data[$name] = max(0, (int) $value); |
402 | 398 | } |
@@ -542,8 +538,7 @@ discard block |
||
542 | 538 | 'warnings' => 0, |
543 | 539 | 'allow_pm' => 0, |
544 | 540 | ); |
545 | - } |
|
546 | - else |
|
541 | + } else |
|
547 | 542 | { |
548 | 543 | $user_sig = ''; |
549 | 544 | // We add the signature to every posters entry because enable_sig is post dependent |
@@ -589,8 +584,7 @@ discard block |
||
589 | 584 | if ((!empty($row['user_allow_viewemail']) && $this->auth->acl_get('u_sendemail')) || $this->auth->acl_get('a_email')) |
590 | 585 | { |
591 | 586 | $user_cache[$user_id]['email'] = ($this->config['board_email_form'] && $this->config['email_enable']) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=email&u=$user_id") : (($this->config['board_hide_emails'] && !$this->auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']); |
592 | - } |
|
593 | - else |
|
587 | + } else |
|
594 | 588 | { |
595 | 589 | $user_cache[$user_id]['email'] = ''; |
596 | 590 | } |
@@ -603,8 +597,7 @@ discard block |
||
603 | 597 | if ($diff == 0) |
604 | 598 | { |
605 | 599 | $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0; |
606 | - } |
|
607 | - else |
|
600 | + } else |
|
608 | 601 | { |
609 | 602 | $diff = ($diff < 0) ? 1 : 0; |
610 | 603 | } |
@@ -222,8 +222,7 @@ discard block |
||
222 | 222 | { |
223 | 223 | $padding .= ' '; |
224 | 224 | $padding_store[$row['parent_id']] = $padding; |
225 | - } |
|
226 | - else if ($row['left_id'] > $right + 1) |
|
225 | + } else if ($row['left_id'] > $right + 1) |
|
227 | 226 | { |
228 | 227 | $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; |
229 | 228 | } |
@@ -249,15 +248,13 @@ discard block |
||
249 | 248 | if (($select_id == $this->gallery_auth->get_setting_permissions()) && !$row['album_user_id']) |
250 | 249 | { |
251 | 250 | $list = true; |
252 | - } |
|
253 | - else if (!$row['album_user_id']) |
|
251 | + } else if (!$row['album_user_id']) |
|
254 | 252 | { |
255 | 253 | if ($this->gallery_auth->acl_check('a_list', $row['album_id'], $row['album_user_id']) || defined('IN_ADMIN')) |
256 | 254 | { |
257 | 255 | $list = true; |
258 | 256 | } |
259 | - } |
|
260 | - else if (!$ignore_personals) |
|
257 | + } else if (!$ignore_personals) |
|
261 | 258 | { |
262 | 259 | if ($row['album_user_id'] == $this->user->data['user_id']) |
263 | 260 | { |
@@ -268,16 +265,14 @@ discard block |
||
268 | 265 | if ($requested_permission) |
269 | 266 | { |
270 | 267 | $requested_own = !$this->gallery_auth->acl_check($requested_permission, $this->gallery_auth->get_own_album()); |
271 | - } |
|
272 | - else |
|
268 | + } else |
|
273 | 269 | { |
274 | 270 | $requested_own = false; // We need the negated version of true here |
275 | 271 | } |
276 | 272 | } |
277 | 273 | $list = (!$list) ? $access_own : $list; |
278 | 274 | $disabled = (!$disabled) ? $requested_own : $disabled; |
279 | - } |
|
280 | - else if ($row['album_user_id']) |
|
275 | + } else if ($row['album_user_id']) |
|
281 | 276 | { |
282 | 277 | if (!$c_access_personal) |
283 | 278 | { |
@@ -286,8 +281,7 @@ discard block |
||
286 | 281 | if ($requested_permission) |
287 | 282 | { |
288 | 283 | $requested_personal = !$this->gallery_auth->acl_check($requested_permission, $this->gallery_auth->get_personal_album()); |
289 | - } |
|
290 | - else |
|
284 | + } else |
|
291 | 285 | { |
292 | 286 | $requested_personal = false; // We need the negated version of true here |
293 | 287 | } |
@@ -299,8 +293,7 @@ discard block |
||
299 | 293 | if (($album_user_id != \phpbbgallery\core\block::PUBLIC_ALBUM) && ($album_user_id != $row['album_user_id'])) |
300 | 294 | { |
301 | 295 | $list = false; |
302 | - } |
|
303 | - else if (($album_user_id != \phpbbgallery\core\block::PUBLIC_ALBUM) && ($row['parent_id'] == 0)) |
|
296 | + } else if (($album_user_id != \phpbbgallery\core\block::PUBLIC_ALBUM) && ($row['parent_id'] == 0)) |
|
304 | 297 | { |
305 | 298 | $disabled = true; |
306 | 299 | } |
@@ -318,8 +311,7 @@ discard block |
||
318 | 311 | $gallery_albumbox = "<select name='$select_name' id='$select_name'>"; |
319 | 312 | $gallery_albumbox .= $album_list; |
320 | 313 | $gallery_albumbox .= '</select>'; |
321 | - } |
|
322 | - else |
|
314 | + } else |
|
323 | 315 | { |
324 | 316 | $gallery_albumbox = $album_list; |
325 | 317 | } |
@@ -388,8 +380,7 @@ discard block |
||
388 | 380 | 'album_last_user_colour' => $row['image_user_colour'], |
389 | 381 | 'album_last_user_id' => $row['image_user_id'], |
390 | 382 | ); |
391 | - } |
|
392 | - else |
|
383 | + } else |
|
393 | 384 | { |
394 | 385 | // No approved image, so we clear the columns |
395 | 386 | $sql_ary = array( |
@@ -204,8 +204,7 @@ discard block |
||
204 | 204 | $sql_array['GROUP_BY'] = 'l.description, l.log_id, i.image_id'; |
205 | 205 | break; |
206 | 206 | } |
207 | - } |
|
208 | - else |
|
207 | + } else |
|
209 | 208 | { |
210 | 209 | $sql_array['ORDER_BY'] = 'l.log_time ' . (isset($additional['sort_dir']) ? 'ASC' : 'DESC'); |
211 | 210 | $sql_array['GROUP_BY'] = 'l.log_time, l.log_id, i.image_id'; |
@@ -219,8 +218,7 @@ discard block |
||
219 | 218 | if ($row) |
220 | 219 | { |
221 | 220 | $count = $row['count']; |
222 | - } |
|
223 | - else |
|
221 | + } else |
|
224 | 222 | { |
225 | 223 | $count = 0; |
226 | 224 | } |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | 'params' => array( |
282 | 280 | ), |
283 | 281 | ), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
284 | - } |
|
285 | - else if ($album == -1) |
|
282 | + } else if ($album == -1) |
|
286 | 283 | { |
287 | 284 | $url_array = array( |
288 | 285 | 'i' => '-phpbbgallery-core-acp-gallery_logs_module', |
@@ -303,8 +300,7 @@ discard block |
||
303 | 300 | $url = http_build_query($url_array,'','&'); |
304 | 301 | |
305 | 302 | $this->pagination->generate_template_pagination(append_sid('index.php?' . $url), 'pagination', 'page', $count, $limit, ($page-1) * $limit); |
306 | - } |
|
307 | - else |
|
303 | + } else |
|
308 | 304 | { |
309 | 305 | $this->pagination->generate_template_pagination(array( |
310 | 306 | 'routes' => array( |