@@ -105,8 +105,7 @@ discard block |
||
| 105 | 105 | if ($this->status == self::DBSAVED) |
| 106 | 106 | { |
| 107 | 107 | $this->data = unserialize($data); |
| 108 | - } |
|
| 109 | - else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN)) |
|
| 108 | + } else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN)) |
|
| 110 | 109 | { |
| 111 | 110 | $this->read(); |
| 112 | 111 | } |
@@ -132,8 +131,7 @@ discard block |
||
| 132 | 131 | if (!in_array($key, self::$allowed_groups)) |
| 133 | 132 | { |
| 134 | 133 | unset($this->data[$key]); |
| 135 | - } |
|
| 136 | - else |
|
| 134 | + } else |
|
| 137 | 135 | { |
| 138 | 136 | foreach ($this->data[$key] as $subkey => $array) |
| 139 | 137 | { |
@@ -147,8 +145,7 @@ discard block |
||
| 147 | 145 | |
| 148 | 146 | $this->serialized = serialize($this->data); |
| 149 | 147 | $this->status = self::DBSAVED; |
| 150 | - } |
|
| 151 | - else |
|
| 148 | + } else |
|
| 152 | 149 | { |
| 153 | 150 | $this->status = self::UNAVAILABLE; |
| 154 | 151 | } |
@@ -198,8 +195,7 @@ discard block |
||
| 198 | 195 | if (($num > $den) && $den) |
| 199 | 196 | { |
| 200 | 197 | $exif_exposure = $num / $den; |
| 201 | - } |
|
| 202 | - else if ($num) |
|
| 198 | + } else if ($num) |
|
| 203 | 199 | { |
| 204 | 200 | $exif_exposure = ' 1/' . $den / $num ; |
| 205 | 201 | } |
@@ -250,8 +246,7 @@ discard block |
||
| 250 | 246 | if (($num / $den) == 0) |
| 251 | 247 | { |
| 252 | 248 | $exif_exposure_bias = 0; |
| 253 | - } |
|
| 254 | - else |
|
| 249 | + } else |
|
| 255 | 250 | { |
| 256 | 251 | $exif_exposure_bias = $this->data["EXIF"]["ExposureBiasValue"]; |
| 257 | 252 | } |
@@ -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 | } |
@@ -363,8 +363,7 @@ discard block |
||
| 363 | 363 | { |
| 364 | 364 | $url = $this->url->append_sid('image_page', "album_id=$album_id&image_id=$next_image{$additional_parameters}"); |
| 365 | 365 | $tpl = '<a href="{IMAGE_URL}" title="{IMAGE_NAME}">{CONTENT}</a>'; |
| 366 | - } |
|
| 367 | - else |
|
| 366 | + } else |
|
| 368 | 367 | { |
| 369 | 368 | $tpl = '{CONTENT}'; |
| 370 | 369 | } |
@@ -440,8 +439,7 @@ discard block |
||
| 440 | 439 | { |
| 441 | 440 | $this->gallery_config->inc('num_images', $num_images); |
| 442 | 441 | $this->gallery_config->inc('num_comments', $num_comments); |
| 443 | - } |
|
| 444 | - else |
|
| 442 | + } else |
|
| 445 | 443 | { |
| 446 | 444 | $this->gallery_config->dec('num_images', $num_images); |
| 447 | 445 | $this->gallery_config->dec('num_comments', $num_comments); |
@@ -234,8 +234,7 @@ discard block |
||
| 234 | 234 | $this->data['image_filemissing'] = 0; |
| 235 | 235 | $this->data['image_filemissing'] = 0; |
| 236 | 236 | $this->data['album_watermark'] = 0; |
| 237 | - } |
|
| 238 | - else |
|
| 237 | + } else |
|
| 239 | 238 | { |
| 240 | 239 | $sql = 'SELECT * |
| 241 | 240 | FROM ' . $this->table_images . ' i |
@@ -398,8 +397,7 @@ discard block |
||
| 398 | 397 | { |
| 399 | 398 | $response->headers->set('expires', '-1'); |
| 400 | 399 | } |
| 401 | - } |
|
| 402 | - else |
|
| 400 | + } else |
|
| 403 | 401 | { |
| 404 | 402 | $response->headers->set('Content-Disposition', 'inline; ' . $this->tool->header_filename(htmlspecialchars_decode($this->tool->image_name)) . '.' . ($this->tool->image_type == 'jpeg' ? 'jpg' : $this->tool->image_type)); |
| 405 | 403 | if ($this->tool->is_ie_greater7($this->user->browser)) |
@@ -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 | } |