@@ -121,8 +121,7 @@ discard block |
||
| 121 | 121 | { |
| 122 | 122 | $mode = array_shift($args); |
| 123 | 123 | $args[0] = $this->path($mode) . $this->phpEx_file($args[0]); |
| 124 | - } |
|
| 125 | - else |
|
| 124 | + } else |
|
| 126 | 125 | { |
| 127 | 126 | $args[0] = $this->path() . $this->phpEx_file($args[0]); |
| 128 | 127 | } |
@@ -197,8 +196,7 @@ discard block |
||
| 197 | 196 | if (!is_array($file)) |
| 198 | 197 | { |
| 199 | 198 | include($this->path($path) . $sub_directory . $this->phpEx_file($file)); |
| 200 | - } |
|
| 201 | - else |
|
| 199 | + } else |
|
| 202 | 200 | { |
| 203 | 201 | foreach ($file as $real_file) |
| 204 | 202 | { |
@@ -244,8 +242,7 @@ discard block |
||
| 244 | 242 | if (strpos($path, 'https:/') === 0) |
| 245 | 243 | { |
| 246 | 244 | $path = 'https://' . substr($path, 7); |
| 247 | - } |
|
| 248 | - else if (strpos($path, 'http:/') === 0) |
|
| 245 | + } else if (strpos($path, 'http:/') === 0) |
|
| 249 | 246 | { |
| 250 | 247 | $path = 'http://' . substr($path, 6); |
| 251 | 248 | } |
@@ -300,15 +297,13 @@ discard block |
||
| 300 | 297 | if ($this->config['force_server_vars'] == 1) |
| 301 | 298 | { |
| 302 | 299 | $url = $this->config['server_protocol'] . $url; |
| 303 | - } |
|
| 304 | - else |
|
| 300 | + } else |
|
| 305 | 301 | { |
| 306 | 302 | $is_secure = $this->request->server('HTTPS', ''); |
| 307 | 303 | if ($is_secure == 'on') |
| 308 | 304 | { |
| 309 | 305 | $url = 'https://' . $url; |
| 310 | - } |
|
| 311 | - else |
|
| 306 | + } else |
|
| 312 | 307 | { |
| 313 | 308 | $url = 'http://' . $url; |
| 314 | 309 | } |
@@ -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', ''); |
@@ -223,14 +223,12 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | trigger_error($message_string . adm_back_link($this->u_action)); |
| 226 | - } |
|
| 227 | - else if ($delete || $prune || (isset($_POST['cancel']))) |
|
| 226 | + } else if ($delete || $prune || (isset($_POST['cancel']))) |
|
| 228 | 227 | { |
| 229 | 228 | if (isset($_POST['cancel'])) |
| 230 | 229 | { |
| 231 | 230 | trigger_error($user->lang['CLEAN_GALLERY_ABORT'] . adm_back_link($this->u_action), E_USER_WARNING); |
| 232 | - } |
|
| 233 | - else |
|
| 231 | + } else |
|
| 234 | 232 | { |
| 235 | 233 | $user->lang['CLEAN_GALLERY_CONFIRM'] = $user->lang['CONFIRM_CLEAN']; |
| 236 | 234 | if ($missing_sources) |
@@ -261,8 +259,7 @@ discard block |
||
| 261 | 259 | if (in_array($row['album_user_id'], $personals_bad)) |
| 262 | 260 | { |
| 263 | 261 | $personals_bad_names[] = $row['album_name']; |
| 264 | - } |
|
| 265 | - else |
|
| 262 | + } else |
|
| 266 | 263 | { |
| 267 | 264 | $missing_personals_names[] = $row['album_name']; |
| 268 | 265 | } |
@@ -280,8 +277,7 @@ discard block |
||
| 280 | 277 | if ($prune && empty($prune_pattern)) |
| 281 | 278 | { |
| 282 | 279 | trigger_error($user->lang['CLEAN_PRUNE_NO_PATTERN'] . adm_back_link($this->u_action), E_USER_WARNING); |
| 283 | - } |
|
| 284 | - else if ($prune && $prune_pattern) |
|
| 280 | + } else if ($prune && $prune_pattern) |
|
| 285 | 281 | { |
| 286 | 282 | $user->lang['CLEAN_GALLERY_CONFIRM'] = $user->lang('CONFIRM_PRUNE', $core_cleanup->lang_prune_pattern($prune_pattern)) . '<br />' . $user->lang['CLEAN_GALLERY_CONFIRM']; |
| 287 | 283 | } |
@@ -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 | } |
@@ -117,8 +117,7 @@ discard block |
||
| 117 | 117 | try |
| 118 | 118 | { |
| 119 | 119 | $this->loader->load($album_id); |
| 120 | - } |
|
| 121 | - catch (\Exception $e) |
|
| 120 | + } catch (\Exception $e) |
|
| 122 | 121 | { |
| 123 | 122 | throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST'); |
| 124 | 123 | } |
@@ -178,8 +177,7 @@ discard block |
||
| 178 | 177 | 'phpbbgallery_core_album_upload', |
| 179 | 178 | array('album_id' => (int) $album_id) |
| 180 | 179 | )); |
| 181 | - } |
|
| 182 | - else |
|
| 180 | + } else |
|
| 183 | 181 | { |
| 184 | 182 | if ($album_data['contest_start'] + $album_data['contest_rating'] > time()) |
| 185 | 183 | { |
@@ -236,8 +234,7 @@ discard block |
||
| 236 | 234 | if (in_array($sort_key, array('r', 'ra'))) |
| 237 | 235 | { |
| 238 | 236 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC'); |
| 239 | - } |
|
| 240 | - else |
|
| 237 | + } else |
|
| 241 | 238 | { |
| 242 | 239 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
| 243 | 240 | } |
@@ -460,8 +457,7 @@ discard block |
||
| 460 | 457 | )); |
| 461 | 458 | $this->url->meta_refresh(3, $back_link); |
| 462 | 459 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
| 463 | - } |
|
| 464 | - else |
|
| 460 | + } else |
|
| 465 | 461 | { |
| 466 | 462 | $this->notifications_helper->add_albums($album_id); |
| 467 | 463 | $this->template->assign_vars(array( |
@@ -470,14 +466,12 @@ discard block |
||
| 470 | 466 | $this->url->meta_refresh(3, $back_link); |
| 471 | 467 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
| 472 | 468 | } |
| 473 | - } |
|
| 474 | - else |
|
| 469 | + } else |
|
| 475 | 470 | { |
| 476 | 471 | if ($this->notifications_helper->get_watched_album($album_id) == 1) |
| 477 | 472 | { |
| 478 | 473 | $lang = $this->language->lang('UNWATCH_ALBUM'); |
| 479 | - } |
|
| 480 | - else |
|
| 474 | + } else |
|
| 481 | 475 | { |
| 482 | 476 | $lang = $this->language->lang('WATCH_ALBUM'); |
| 483 | 477 | } |
@@ -509,8 +503,7 @@ discard block |
||
| 509 | 503 | if (!$this->user->data['is_registered']) |
| 510 | 504 | { |
| 511 | 505 | login_box(); |
| 512 | - } |
|
| 513 | - else |
|
| 506 | + } else |
|
| 514 | 507 | { |
| 515 | 508 | //return $this->error('NOT_AUTHORISED', 403); |
| 516 | 509 | trigger_error($this->language->lang('NOT_AUTHORISED')); |
@@ -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( |