@@ -146,8 +146,7 @@ |
||
| 146 | 146 | |
| 147 | 147 | $event['additional_sql_data'] = $additional_sql_data; |
| 148 | 148 | unset($exif); |
| 149 | - } |
|
| 150 | - else |
|
| 149 | + } else |
|
| 151 | 150 | { |
| 152 | 151 | $additional_sql_data = $event['additional_sql_data']; |
| 153 | 152 | $additional_sql_data['image_exif_data'] = ''; |
@@ -249,8 +249,7 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | $mod_array[] = 0; |
| 251 | 251 | } |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $mod_array = array($album); |
| 256 | 255 | } |
@@ -340,8 +339,7 @@ discard block |
||
| 340 | 339 | $this->template->assign_vars(array( |
| 341 | 340 | 'TOTAL_PAGES' => $this->language->lang('PAGE_TITLE_NUMBER', $page + 1), |
| 342 | 341 | )); |
| 343 | - } |
|
| 344 | - else |
|
| 342 | + } else |
|
| 345 | 343 | { |
| 346 | 344 | $this->pagination->generate_template_pagination(array( |
| 347 | 345 | 'routes' => array( |
@@ -396,8 +394,7 @@ discard block |
||
| 396 | 394 | if (is_array($ids)) |
| 397 | 395 | { |
| 398 | 396 | return array_map('intval', $ids); |
| 399 | - } |
|
| 400 | - else |
|
| 397 | + } else |
|
| 401 | 398 | { |
| 402 | 399 | return array((int) $ids); |
| 403 | 400 | } |
@@ -144,8 +144,7 @@ discard block |
||
| 144 | 144 | { |
| 145 | 145 | $this->zip_file = $this->file; |
| 146 | 146 | $this->upload_zip(); |
| 147 | - } |
|
| 148 | - else |
|
| 147 | + } else |
|
| 149 | 148 | { |
| 150 | 149 | $image_id = $this->prepare_file(); |
| 151 | 150 | if ($image_id) |
@@ -210,8 +209,7 @@ discard block |
||
| 210 | 209 | if (is_dir($current_dir . $file)) |
| 211 | 210 | { |
| 212 | 211 | $this->read_zip_folder($current_dir . $file . '/'); |
| 213 | - } |
|
| 214 | - else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true))) |
|
| 212 | + } else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true))) |
|
| 215 | 213 | { |
| 216 | 214 | if (!$this->file_limit || ($this->uploaded_files < $this->file_limit)) |
| 217 | 215 | { |
@@ -231,23 +229,20 @@ discard block |
||
| 231 | 229 | { |
| 232 | 230 | $this->uploaded_files++; |
| 233 | 231 | $this->images[] = (int) $image_id; |
| 234 | - } |
|
| 235 | - else |
|
| 232 | + } else |
|
| 236 | 233 | { |
| 237 | 234 | if ($this->file->error) |
| 238 | 235 | { |
| 239 | 236 | $this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), implode('<br />» ', $this->file->error))); |
| 240 | 237 | } |
| 241 | 238 | } |
| 242 | - } |
|
| 243 | - else |
|
| 239 | + } else |
|
| 244 | 240 | { |
| 245 | 241 | $this->quota_error(); |
| 246 | 242 | @unlink($current_dir . $file); |
| 247 | 243 | } |
| 248 | 244 | |
| 249 | - } |
|
| 250 | - else |
|
| 245 | + } else |
|
| 251 | 246 | { |
| 252 | 247 | @unlink($current_dir . $file); |
| 253 | 248 | } |
@@ -356,8 +351,7 @@ discard block |
||
| 356 | 351 | { |
| 357 | 352 | $this->file->clean_filename('unique_ext'); |
| 358 | 353 | $this->file->move_file(substr($this->gallery_url->path('upload'), 0, -1), false, false, CHMOD_ALL); |
| 359 | - } |
|
| 360 | - else |
|
| 354 | + } else |
|
| 361 | 355 | { |
| 362 | 356 | // Okay, this looks hacky, but what we do here is, we store the directory name in the filename. |
| 363 | 357 | // However phpBB strips directories form the filename, when moving, so we need to specify that again. |
@@ -411,8 +405,7 @@ discard block |
||
| 411 | 405 | //$this->file->height = $this->tools->image_size['height']; |
| 412 | 406 | //$this->file->width = $this->tools->image_size['width']; |
| 413 | 407 | } |
| 414 | - } |
|
| 415 | - else |
|
| 408 | + } else |
|
| 416 | 409 | { |
| 417 | 410 | $this->file->remove(); |
| 418 | 411 | $this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), $this->language->lang('UPLOAD_IMAGE_SIZE_TOO_BIG'))); |
@@ -165,8 +165,7 @@ |
||
| 165 | 165 | { |
| 166 | 166 | $this->resync($album_id); |
| 167 | 167 | } |
| 168 | - } |
|
| 169 | - else |
|
| 168 | + } else |
|
| 170 | 169 | { |
| 171 | 170 | $this->resync((int) $album_ids); |
| 172 | 171 | } |
@@ -216,8 +216,7 @@ discard block |
||
| 216 | 216 | return $this->language->lang('CONTEST_RATING_HIDDEN'); |
| 217 | 217 | } |
| 218 | 218 | return $this->language->lang('CONTEST_RESULT_HIDDEN', $this->user->format_date(($this->album_data('contest_start') + $this->album_data('contest_end')), false, true)); |
| 219 | - } |
|
| 220 | - else |
|
| 219 | + } else |
|
| 221 | 220 | { |
| 222 | 221 | if ($user_rating) |
| 223 | 222 | { |
@@ -364,8 +363,7 @@ discard block |
||
| 364 | 363 | if (is_array($image_ids)) |
| 365 | 364 | { |
| 366 | 365 | $image_ids = array_map('intval', $image_ids); |
| 367 | - } |
|
| 368 | - else |
|
| 366 | + } else |
|
| 369 | 367 | { |
| 370 | 368 | $image_ids = (int) $image_ids; |
| 371 | 369 | } |
@@ -399,8 +397,7 @@ discard block |
||
| 399 | 397 | if (is_array($image_ids)) |
| 400 | 398 | { |
| 401 | 399 | $image_ids = array_map('intval', $image_ids); |
| 402 | - } |
|
| 403 | - else |
|
| 400 | + } else |
|
| 404 | 401 | { |
| 405 | 402 | $image_ids = (int) $image_ids; |
| 406 | 403 | } |
@@ -249,8 +249,7 @@ discard block |
||
| 249 | 249 | 'last_image' => end($process->images), |
| 250 | 250 | ); |
| 251 | 251 | $this->notification_helper->new_image($data); |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $target = array( |
| 256 | 255 | 'album_id' => $album_id, |
@@ -355,8 +354,7 @@ discard block |
||
| 355 | 354 | { |
| 356 | 355 | $this->language->add_lang('ucp'); |
| 357 | 356 | $error_array[] = $this->language->lang($result . '_USERNAME'); |
| 358 | - } |
|
| 359 | - else |
|
| 357 | + } else |
|
| 360 | 358 | { |
| 361 | 359 | $process->set_username($username); |
| 362 | 360 | } |
@@ -375,8 +373,7 @@ discard block |
||
| 375 | 373 | if (!$process->uploaded_files) |
| 376 | 374 | { |
| 377 | 375 | $process->new_error($this->language->lang('UPLOAD_NO_FILE')); |
| 378 | - } |
|
| 379 | - else |
|
| 376 | + } else |
|
| 380 | 377 | { |
| 381 | 378 | $mode = 'upload_edit'; |
| 382 | 379 | // Remove submit, so we get the first screen of step 2. |
@@ -422,8 +419,7 @@ discard block |
||
| 422 | 419 | if ($VAR == 'zip') |
| 423 | 420 | { |
| 424 | 421 | continue; |
| 425 | - } |
|
| 426 | - else |
|
| 422 | + } else |
|
| 427 | 423 | { |
| 428 | 424 | $filetypes[] = $VAR; |
| 429 | 425 | } |
@@ -523,8 +519,7 @@ discard block |
||
| 523 | 519 | 'last_image' => end($process->images), |
| 524 | 520 | ); |
| 525 | 521 | $this->notification_helper->new_image($data); |
| 526 | - } |
|
| 527 | - else |
|
| 522 | + } else |
|
| 528 | 523 | { |
| 529 | 524 | $target = array( |
| 530 | 525 | 'album_id' => (int) $album_id, |
@@ -591,8 +586,7 @@ discard block |
||
| 591 | 586 | if (file_exists($phpbbgallery_core_file) && is_writable($phpbbgallery_core_file) && file_exists($phpbbgallery_core_file_source) && is_writable($phpbbgallery_core_file_source) && file_exists($phpbbgallery_core_file_medium) && is_writable($phpbbgallery_core_file_medium) && file_exists($phpbbgallery_core_file_mini) && is_writable($phpbbgallery_core_file_mini)) |
| 592 | 587 | { |
| 593 | 588 | return true; |
| 594 | - } |
|
| 595 | - else |
|
| 589 | + } else |
|
| 596 | 590 | { |
| 597 | 591 | return false; |
| 598 | 592 | } |
@@ -232,8 +232,7 @@ discard block |
||
| 232 | 232 | if ($search_terms == 'all') |
| 233 | 233 | { |
| 234 | 234 | $keywords .= ' ' . $add_keywords; |
| 235 | - } |
|
| 236 | - else |
|
| 235 | + } else |
|
| 237 | 236 | { |
| 238 | 237 | $search_terms = 'all'; |
| 239 | 238 | $keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords; |
@@ -271,8 +270,7 @@ discard block |
||
| 271 | 270 | if (empty($search_album)) |
| 272 | 271 | { |
| 273 | 272 | $sql_where[] = $this->db->sql_in_set('i.image_album_id', $this->gallery_auth->acl_album_ids('i_view')); |
| 274 | - } |
|
| 275 | - else |
|
| 273 | + } else |
|
| 276 | 274 | { |
| 277 | 275 | $sql_where[] = $this->db->sql_in_set('i.image_album_id', $search_album); |
| 278 | 276 | } |
@@ -131,8 +131,7 @@ discard block |
||
| 131 | 131 | if ($this->gallery_config->get('pegas_index_album')) |
| 132 | 132 | { |
| 133 | 133 | $this->display->display_albums('personal', $this->config['load_moderators']); |
| 134 | - } |
|
| 135 | - else |
|
| 134 | + } else |
|
| 136 | 135 | { |
| 137 | 136 | $last_image = $this->image->get_last_image(); |
| 138 | 137 | if (empty($last_image)) |
@@ -347,8 +346,7 @@ discard block |
||
| 347 | 346 | FROM ' . GROUPS_TABLE . ' |
| 348 | 347 | WHERE group_legend > 0 |
| 349 | 348 | ORDER BY ' . $order_legend . ' ASC'; |
| 350 | - } |
|
| 351 | - else |
|
| 349 | + } else |
|
| 352 | 350 | { |
| 353 | 351 | $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend |
| 354 | 352 | FROM ' . GROUPS_TABLE . ' g |
@@ -373,8 +371,7 @@ discard block |
||
| 373 | 371 | if ($row['group_name'] == 'BOTS' || ($this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile'))) |
| 374 | 372 | { |
| 375 | 373 | $legend[] = '<span' . $colour_text . '>' . $group_name . '</span>'; |
| 376 | - } |
|
| 377 | - else |
|
| 374 | + } else |
|
| 378 | 375 | { |
| 379 | 376 | $legend[] = '<a' . $colour_text . ' href="' . append_sid($this->root_path . 'memberlist.' . $this->php_ext, 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>'; |
| 380 | 377 | } |
@@ -213,8 +213,7 @@ discard block |
||
| 213 | 213 | if (isset($album_data['contest_start'])) |
| 214 | 214 | { |
| 215 | 215 | $s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false; |
| 216 | - } |
|
| 217 | - else |
|
| 216 | + } else |
|
| 218 | 217 | { |
| 219 | 218 | $s_hide_comment_input = false; |
| 220 | 219 | } |
@@ -338,14 +337,12 @@ discard block |
||
| 338 | 337 | $this->notification_helper->notify('new_comment', $data); |
| 339 | 338 | //$phpbb_gallery_notification->send_notification('image', $image_id, $image_data['image_name']); |
| 340 | 339 | $message .= $this->language->lang('COMMENT_STORED') . '<br />'; |
| 341 | - } |
|
| 342 | - else if ($this->misc->display_captcha('comment')) |
|
| 340 | + } else if ($this->misc->display_captcha('comment')) |
|
| 343 | 341 | { |
| 344 | 342 | $s_captcha_hidden_fields = ($captcha->is_solved()) ? build_hidden_fields($captcha->get_hidden_fields()) : ''; |
| 345 | 343 | } |
| 346 | 344 | $sig_checked = ($this->auth->acl_get('u_sig') && isset($_POST['attach_sig'])); |
| 347 | - } |
|
| 348 | - else |
|
| 345 | + } else |
|
| 349 | 346 | { |
| 350 | 347 | if ($comment_id != 0) |
| 351 | 348 | { |
@@ -439,8 +436,7 @@ discard block |
||
| 439 | 436 | $comment_data = $this->db->sql_fetchrow($result); |
| 440 | 437 | $this->db->sql_freeresult($result); |
| 441 | 438 | $image_id = (int) $comment_data['comment_image_id']; |
| 442 | - } |
|
| 443 | - else |
|
| 439 | + } else |
|
| 444 | 440 | { |
| 445 | 441 | $this->misc->not_authorised($image_backlink, $image_loginlink); |
| 446 | 442 | } |
@@ -451,8 +447,7 @@ discard block |
||
| 451 | 447 | { |
| 452 | 448 | $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); |
| 453 | 449 | } |
| 454 | - } |
|
| 455 | - else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) |
|
| 450 | + } else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) |
|
| 456 | 451 | { |
| 457 | 452 | $this->misc->not_authorised($image_backlink, $image_loginlink); |
| 458 | 453 | } |
@@ -485,8 +480,7 @@ discard block |
||
| 485 | 480 | if (isset($album_data['contest_start'])) |
| 486 | 481 | { |
| 487 | 482 | $s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false; |
| 488 | - } |
|
| 489 | - else |
|
| 483 | + } else |
|
| 490 | 484 | { |
| 491 | 485 | $s_hide_comment_input = false; |
| 492 | 486 | } |
@@ -578,8 +572,7 @@ discard block |
||
| 578 | 572 | $this->gallery_log->add_log('moderator', 'c_edit', $image_data['image_album_id'], $image_data['image_id'], array('LOG_GALLERY_COMMENT_EDITED', $image_data['image_name'])); |
| 579 | 573 | } |
| 580 | 574 | } |
| 581 | - } |
|
| 582 | - else |
|
| 575 | + } else |
|
| 583 | 576 | { |
| 584 | 577 | $sig_checked = (bool) $comment_data['comment_signature']; |
| 585 | 578 | |
@@ -653,8 +646,7 @@ discard block |
||
| 653 | 646 | $comment_data = $this->db->sql_fetchrow($result); |
| 654 | 647 | $this->db->sql_freeresult($result); |
| 655 | 648 | $image_id = (int) $comment_data['comment_image_id']; |
| 656 | - } |
|
| 657 | - else |
|
| 649 | + } else |
|
| 658 | 650 | { |
| 659 | 651 | $this->misc->not_authorised($image_backlink, $image_loginlink); |
| 660 | 652 | } |
@@ -665,8 +657,7 @@ discard block |
||
| 665 | 657 | { |
| 666 | 658 | $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); |
| 667 | 659 | } |
| 668 | - } |
|
| 669 | - else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) |
|
| 660 | + } else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) |
|
| 670 | 661 | { |
| 671 | 662 | $this->misc->not_authorised($image_backlink, $image_loginlink); |
| 672 | 663 | } |
@@ -731,15 +722,13 @@ discard block |
||
| 731 | 722 | |
| 732 | 723 | $message = $this->language->lang('DELETED_COMMENT') . '<br />'; |
| 733 | 724 | $submit = true; |
| 734 | - } |
|
| 735 | - else |
|
| 725 | + } else |
|
| 736 | 726 | { |
| 737 | 727 | if (isset($_POST['cancel'])) |
| 738 | 728 | { |
| 739 | 729 | $message = $this->language->lang('DELETED_COMMENT_NOT') . '<br />'; |
| 740 | 730 | $submit = true; |
| 741 | - } |
|
| 742 | - else |
|
| 731 | + } else |
|
| 743 | 732 | { |
| 744 | 733 | confirm_box(false, 'DELETE_COMMENT2', $s_hidden_fields); |
| 745 | 734 | } |