@@ -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 | } |
@@ -130,9 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | $this->unserialize_auth_data($cached_permissions); |
132 | 132 | return; |
133 | - } |
|
134 | - |
|
135 | - else if ($user_id != $this->user->user_id) |
|
133 | + } else if ($user_id != $this->user->user_id) |
|
136 | 134 | { |
137 | 135 | $this->user->set_user_id($user_id); |
138 | 136 | $cached_permissions = $this->user->get_data('user_permissions'); |
@@ -252,8 +250,7 @@ discard block |
||
252 | 250 | if (!isset($acl_array[$key])) |
253 | 251 | { |
254 | 252 | $acl_array[$key] = $key . '::' . $a_id; |
255 | - } |
|
256 | - else |
|
253 | + } else |
|
257 | 254 | { |
258 | 255 | $acl_array[$key] .= ':' . $a_id; |
259 | 256 | } |
@@ -302,8 +299,7 @@ discard block |
||
302 | 299 | if ($data[$permission] == self::ACL_NEVER) |
303 | 300 | { |
304 | 301 | $this->_auth_data_never[$album_id]->set_bit(self::$_permissions_flipped[$permission], true); |
305 | - } |
|
306 | - else if ($data[$permission] == self::ACL_YES) |
|
302 | + } else if ($data[$permission] == self::ACL_YES) |
|
307 | 303 | { |
308 | 304 | $this->_auth_data[$album_id]->set_bit(self::$_permissions_flipped[$permission], true); |
309 | 305 | if (substr($permission, 0, 2) == 'm_') |
@@ -311,8 +307,7 @@ discard block |
||
311 | 307 | $this->_auth_data[$album_id]->set_bit(self::$_permissions_flipped['m_'], true); |
312 | 308 | } |
313 | 309 | } |
314 | - } |
|
315 | - else |
|
310 | + } else |
|
316 | 311 | { |
317 | 312 | $this->_auth_data[$album_id]->set_count($permission, $data[$permission]); |
318 | 313 | } |
@@ -358,17 +353,17 @@ discard block |
||
358 | 353 | $albums = array();//@todo $this->cache->obtain_album_list(); |
359 | 354 | foreach ($albums as $album) |
360 | 355 | { |
361 | - if (!$album['album_auth_access'] || ($album['album_user_id'] == self::PUBLIC_ALBUM))# || ($album['album_user_id'] == $user_id)) |
|
356 | + if (!$album['album_auth_access'] || ($album['album_user_id'] == self::PUBLIC_ALBUM)) { |
|
357 | + # || ($album['album_user_id'] == $user_id)) |
|
362 | 358 | { |
363 | 359 | continue; |
364 | 360 | } |
365 | - else if ($user_id == ANONYMOUS) |
|
361 | + } else if ($user_id == ANONYMOUS) |
|
366 | 362 | { |
367 | 363 | // Level 1: No guests |
368 | 364 | $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
369 | 365 | continue; |
370 | - } |
|
371 | - else if ($album['album_auth_access'] == self::ACCESS_NOT_FOES) |
|
366 | + } else if ($album['album_auth_access'] == self::ACCESS_NOT_FOES) |
|
372 | 367 | { |
373 | 368 | if ($zebra == null) |
374 | 369 | { |
@@ -380,8 +375,7 @@ discard block |
||
380 | 375 | $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
381 | 376 | continue; |
382 | 377 | } |
383 | - } |
|
384 | - else if ($album['album_auth_access'] == self::ACCESS_SPECIAL_FRIENDS) |
|
378 | + } else if ($album['album_auth_access'] == self::ACCESS_SPECIAL_FRIENDS) |
|
385 | 379 | { |
386 | 380 | if ($zebra == null) |
387 | 381 | { |
@@ -393,8 +387,7 @@ discard block |
||
393 | 387 | $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
394 | 388 | continue; |
395 | 389 | } |
396 | - } |
|
397 | - else if ($album['album_auth_access'] == self::ACCESS_FRIENDS) |
|
390 | + } else if ($album['album_auth_access'] == self::ACCESS_FRIENDS) |
|
398 | 391 | { |
399 | 392 | if ($zebra == null) |
400 | 393 | { |
@@ -428,21 +421,18 @@ discard block |
||
428 | 421 | if ($row['foe']) |
429 | 422 | { |
430 | 423 | $zebra['foe'][] = (int) $row['user_id']; |
431 | - } |
|
432 | - else |
|
424 | + } else |
|
433 | 425 | { |
434 | 426 | if (isset($row['bff'])) |
435 | 427 | { |
436 | 428 | if ($row['bff']) |
437 | 429 | { |
438 | 430 | $zebra['bff'][] = (int) $row['user_id']; |
439 | - } |
|
440 | - else |
|
431 | + } else |
|
441 | 432 | { |
442 | 433 | $zebra['friend'][] = (int) $row['user_id']; |
443 | 434 | } |
444 | - } |
|
445 | - else |
|
435 | + } else |
|
446 | 436 | { |
447 | 437 | $zebra['friend'][] = (int) $row['user_id']; |
448 | 438 | } |
@@ -487,16 +477,13 @@ discard block |
||
487 | 477 | if (in_array($album_author, $zebra_array['foe'])) |
488 | 478 | { |
489 | 479 | $state = 1; |
490 | - } |
|
491 | - else if (in_array($album_author, $zebra_array['friend'])) |
|
480 | + } else if (in_array($album_author, $zebra_array['friend'])) |
|
492 | 481 | { |
493 | 482 | $state = 3; |
494 | - } |
|
495 | - else if (in_array($album_author, $zebra_array['bff'])) |
|
483 | + } else if (in_array($album_author, $zebra_array['bff'])) |
|
496 | 484 | { |
497 | 485 | $state = 4; |
498 | - } |
|
499 | - else |
|
486 | + } else |
|
500 | 487 | { |
501 | 488 | $state = 2; |
502 | 489 | } |
@@ -543,12 +530,10 @@ discard block |
||
543 | 530 | if (is_array($user_ids)) |
544 | 531 | { |
545 | 532 | $sql_where = 'WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids)); |
546 | - } |
|
547 | - else if ($user_ids == 'all') |
|
533 | + } else if ($user_ids == 'all') |
|
548 | 534 | { |
549 | 535 | $sql_where = ''; |
550 | - } |
|
551 | - else |
|
536 | + } else |
|
552 | 537 | { |
553 | 538 | $sql_where = 'WHERE user_id = ' . (int) $user_ids; |
554 | 539 | } |
@@ -617,8 +602,7 @@ discard block |
||
617 | 602 | if ($this->user->is_user($u_id)) |
618 | 603 | { |
619 | 604 | $p_id = self::OWN_ALBUM; |
620 | - } |
|
621 | - else |
|
605 | + } else |
|
622 | 606 | { |
623 | 607 | if (!isset($this->_auth_data[$a_id])) |
624 | 608 | { |
@@ -700,12 +684,10 @@ discard block |
||
700 | 684 | if ($this->user->is_user($album['album_user_id'])) |
701 | 685 | { |
702 | 686 | $a_id = self::OWN_ALBUM; |
703 | - } |
|
704 | - else if ($album['album_user_id'] > self::PUBLIC_ALBUM) |
|
687 | + } else if ($album['album_user_id'] > self::PUBLIC_ALBUM) |
|
705 | 688 | { |
706 | 689 | $a_id = self::PERSONAL_ALBUM; |
707 | - } |
|
708 | - else |
|
690 | + } else |
|
709 | 691 | { |
710 | 692 | $a_id = $album['album_id']; |
711 | 693 | } |
@@ -755,8 +737,7 @@ discard block |
||
755 | 737 | if ($album_data['album_user_id'] != 0) |
756 | 738 | { |
757 | 739 | $sql = 'SELECT * FROM ' . $this->table_permissions . ' WHERE ' . $this->db->sql_in_set('perm_system', array(-2, -3)); |
758 | - } |
|
759 | - else |
|
740 | + } else |
|
760 | 741 | { |
761 | 742 | $sql = 'SELECT * FROM ' . $this->table_permissions . ' WHERE perm_album_id = ' . (int) $album_id; |
762 | 743 | } |
@@ -321,8 +321,7 @@ discard block |
||
321 | 321 | if (!$update) |
322 | 322 | { |
323 | 323 | $album_data = $row; |
324 | - } |
|
325 | - else |
|
324 | + } else |
|
326 | 325 | { |
327 | 326 | $album_data['left_id'] = $row['left_id']; |
328 | 327 | $album_data['right_id'] = $row['right_id']; |
@@ -330,8 +329,7 @@ discard block |
||
330 | 329 | if ($row['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST) |
331 | 330 | { |
332 | 331 | $contest_data = $phpbb_gallery_contest->get_contest($album_id, 'album'); |
333 | - } |
|
334 | - else |
|
332 | + } else |
|
335 | 333 | { |
336 | 334 | // Default values, 3 days later rate and 7 for the end of the contest |
337 | 335 | $contest_data = array( |
@@ -353,8 +351,7 @@ discard block |
||
353 | 351 | /* |
354 | 352 | $album_data['album_password_confirm'] = $album_data['album_password']; |
355 | 353 | */ |
356 | - } |
|
357 | - else |
|
354 | + } else |
|
358 | 355 | { |
359 | 356 | $this->page_title = 'CREATE_ALBUM'; |
360 | 357 | |
@@ -491,8 +488,7 @@ discard block |
||
491 | 488 | 'S_HAS_SUBALBUMS' => ($album_data['right_id'] - $album_data['left_id'] > 1) ? true : false, |
492 | 489 | 'S_ALBUMS_LIST' => $albums_list, |
493 | 490 | )); |
494 | - } |
|
495 | - else if ($uploadable_album_exists) |
|
491 | + } else if ($uploadable_album_exists) |
|
496 | 492 | { |
497 | 493 | $template->assign_vars(array( |
498 | 494 | 'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $album_id, 0, \phpbbgallery\core\block::TYPE_UPLOAD), |
@@ -632,8 +628,7 @@ discard block |
||
632 | 628 | if (!$this->parent_id) |
633 | 629 | { |
634 | 630 | $navigation = $user->lang['GALLERY_INDEX']; |
635 | - } |
|
636 | - else |
|
631 | + } else |
|
637 | 632 | { |
638 | 633 | $navigation = '<a href="' . $this->u_action . '">' . $user->lang['GALLERY_INDEX'] . '</a>'; |
639 | 634 | |
@@ -643,8 +638,7 @@ discard block |
||
643 | 638 | if ($row['album_id'] == $this->parent_id) |
644 | 639 | { |
645 | 640 | $navigation .= ' -> ' . $row['album_name']; |
646 | - } |
|
647 | - else |
|
641 | + } else |
|
648 | 642 | { |
649 | 643 | $navigation .= ' -> <a href="' . $this->u_action . '&parent_id=' . $row['album_id'] . '">' . $row['album_name'] . '</a>'; |
650 | 644 | } |
@@ -675,8 +669,7 @@ discard block |
||
675 | 669 | if ($row['album_status'] == \phpbbgallery\core\block::ALBUM_LOCKED) |
676 | 670 | { |
677 | 671 | $folder_image = '<img src="images/icon_folder_lock.gif" alt="' . $user->lang['LOCKED'] . '" />'; |
678 | - } |
|
679 | - else |
|
672 | + } else |
|
680 | 673 | { |
681 | 674 | $folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $user->lang['SUBALBUM'] . '" />' : '<img src="images/icon_folder.gif" alt="' . $user->lang['FOLDER'] . '" />'; |
682 | 675 | } |
@@ -702,8 +695,7 @@ discard block |
||
702 | 695 | ); |
703 | 696 | } |
704 | 697 | while ($row = $db->sql_fetchrow($result)); |
705 | - } |
|
706 | - else if ($this->parent_id) |
|
698 | + } else if ($this->parent_id) |
|
707 | 699 | { |
708 | 700 | $row = $phpbb_ext_gallery_core_album->get_info($this->parent_id); |
709 | 701 |
@@ -226,8 +226,7 @@ discard block |
||
226 | 226 | if (is_array($langs_var)) |
227 | 227 | { |
228 | 228 | $vars['append'] = ' ' . substr($this->language->lang($vars['append'], 0), 1); |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | $vars['append'] = ' ' . $this->language->lang($vars['append']); |
233 | 232 | } |
@@ -577,8 +576,7 @@ discard block |
||
577 | 576 | if ($key != 'link_imagepage') |
578 | 577 | { |
579 | 578 | $sort_order_options .= '<option' . (($value == 'image_page') ? ' selected="selected"' : '') . " value='image_page'>" . $this->language->lang('UC_LINK_IMAGE_PAGE') . '</option>'; |
580 | - } |
|
581 | - else |
|
579 | + } else |
|
582 | 580 | { |
583 | 581 | $sort_order_options .= '<option' . (($value == 'next') ? ' selected="selected"' : '') . " value='next'>" . $this->language->lang('UC_LINK_NEXT') . '</option>'; |
584 | 582 | } |
@@ -658,12 +656,10 @@ discard block |
||
658 | 656 | if ($value == 'image_page') |
659 | 657 | { |
660 | 658 | $bbcode_tpl = '<a href="' . $gallery_url . 'image/{NUMBER}"><img src="' . $gallery_url . 'image/{NUMBER}/mini" alt="{NUMBER}" /></a>'; |
661 | - } |
|
662 | - else if ($value == 'image') |
|
659 | + } else if ($value == 'image') |
|
663 | 660 | { |
664 | 661 | $bbcode_tpl = '<a href="' . $gallery_url . 'image/{NUMBER}/source"><img src="' . $gallery_url . 'image/{NUMBER}/mini" alt="{NUMBER}" /></a>'; |
665 | - } |
|
666 | - else |
|
662 | + } else |
|
667 | 663 | { |
668 | 664 | $bbcode_tpl = '<img src="' . $gallery_url . 'image/{NUMBER}/mini" alt="{NUMBER}" />'; |
669 | 665 | } |
@@ -95,8 +95,7 @@ discard block |
||
95 | 95 | 'U_SOURCE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
96 | 96 | 'U_SOURCE_DIR_STATE_ERROR' => 1, |
97 | 97 | )); |
98 | - } |
|
99 | - else |
|
98 | + } else |
|
100 | 99 | { |
101 | 100 | $template->assign_vars(array( |
102 | 101 | 'U_FILE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
@@ -109,15 +108,13 @@ discard block |
||
109 | 108 | 'U_CORE_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
110 | 109 | 'U_CORE_DIR_STATE_ERROR' => 0, |
111 | 110 | )); |
112 | - } |
|
113 | - else if (is_writable($phpbbgallery_core_file)) |
|
111 | + } else if (is_writable($phpbbgallery_core_file)) |
|
114 | 112 | { |
115 | 113 | $template->assign_vars(array( |
116 | 114 | 'U_CORE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
117 | 115 | 'U_CORE_DIR_STATE_ERROR' => 0, |
118 | 116 | )); |
119 | - } |
|
120 | - else |
|
117 | + } else |
|
121 | 118 | { |
122 | 119 | $template->assign_vars(array( |
123 | 120 | 'U_CORE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -131,15 +128,13 @@ discard block |
||
131 | 128 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
132 | 129 | 'U_MEDIUM_DIR_STATE_ERROR' => 0, |
133 | 130 | )); |
134 | - } |
|
135 | - else if (is_writable($phpbbgallery_core_file_medium)) |
|
131 | + } else if (is_writable($phpbbgallery_core_file_medium)) |
|
136 | 132 | { |
137 | 133 | $template->assign_vars(array( |
138 | 134 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
139 | 135 | 'U_MEDIUM_DIR_STATE_ERROR' => 0, |
140 | 136 | )); |
141 | - } |
|
142 | - else |
|
137 | + } else |
|
143 | 138 | { |
144 | 139 | $template->assign_vars(array( |
145 | 140 | 'U_MEDIUM_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -153,15 +148,13 @@ discard block |
||
153 | 148 | 'U_MINI_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
154 | 149 | 'U_MINI_DIR_STATE_ERROR' => 0, |
155 | 150 | )); |
156 | - } |
|
157 | - else if (is_writable($phpbbgallery_core_file_mini)) |
|
151 | + } else if (is_writable($phpbbgallery_core_file_mini)) |
|
158 | 152 | { |
159 | 153 | $template->assign_vars(array( |
160 | 154 | 'U_MINI_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
161 | 155 | 'U_MINI_DIR_STATE_ERROR' => 0, |
162 | 156 | )); |
163 | - } |
|
164 | - else |
|
157 | + } else |
|
165 | 158 | { |
166 | 159 | $template->assign_vars(array( |
167 | 160 | 'U_MINI_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -175,15 +168,13 @@ discard block |
||
175 | 168 | 'U_SOURCE_DIR_STATE' => $this->language->lang('DIR_CREATED'), |
176 | 169 | 'U_SOURCE_DIR_STATE_ERROR' => 0, |
177 | 170 | )); |
178 | - } |
|
179 | - else if (is_writable($phpbbgallery_core_file_source)) |
|
171 | + } else if (is_writable($phpbbgallery_core_file_source)) |
|
180 | 172 | { |
181 | 173 | $template->assign_vars(array( |
182 | 174 | 'U_SOURCE_DIR_STATE' => $this->language->lang('WRITE_ACCESS'), |
183 | 175 | 'U_SOURCE_DIR_STATE_ERROR' => 0, |
184 | 176 | )); |
185 | - } |
|
186 | - else |
|
177 | + } else |
|
187 | 178 | { |
188 | 179 | $template->assign_vars(array( |
189 | 180 | 'U_SOURCE_DIR_STATE' => $this->language->lang('NO_WRITE_ACCESS'), |
@@ -282,8 +273,7 @@ discard block |
||
282 | 273 | 'reset_album_id' => $album_id, |
283 | 274 | ))); |
284 | 275 | } |
285 | - } |
|
286 | - else |
|
276 | + } else |
|
287 | 277 | { |
288 | 278 | switch ($action) |
289 | 279 | { |
@@ -96,8 +96,7 @@ discard block |
||
96 | 96 | if (!$submit) |
97 | 97 | { |
98 | 98 | $this->permissions_v_mask(); |
99 | - } |
|
100 | - else |
|
99 | + } else |
|
101 | 100 | { |
102 | 101 | $this->permissions_p_mask(); |
103 | 102 | } |
@@ -440,13 +439,11 @@ discard block |
||
440 | 439 | if (!sizeof($group_id) && !sizeof($user_id)) |
441 | 440 | { |
442 | 441 | trigger_error('NO_VICTIM_SELECTED', E_USER_WARNING); |
443 | - } |
|
444 | - else if (sizeof($group_id)) |
|
442 | + } else if (sizeof($group_id)) |
|
445 | 443 | { |
446 | 444 | $victim_mode = 'group'; |
447 | 445 | $victim_id = $group_id; |
448 | - } |
|
449 | - else |
|
446 | + } else |
|
450 | 447 | { |
451 | 448 | $victim_mode = 'user'; |
452 | 449 | $victim_id = $user_id; |
@@ -478,8 +475,7 @@ discard block |
||
478 | 475 | $victim_list[$row['group_id']] = $victim_row; |
479 | 476 | } |
480 | 477 | $db->sql_freeresult($result); |
481 | - } |
|
482 | - else |
|
478 | + } else |
|
483 | 479 | { |
484 | 480 | // Get the user information |
485 | 481 | $sql = 'SELECT username, user_id, user_colour |
@@ -562,12 +558,10 @@ discard block |
||
562 | 558 | if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_YES)) |
563 | 559 | { |
564 | 560 | $acl_s_yes++; |
565 | - } |
|
566 | - else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NEVER)) |
|
561 | + } else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NEVER)) |
|
567 | 562 | { |
568 | 563 | $acl_s_never++; |
569 | - } |
|
570 | - else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) |
|
564 | + } else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) |
|
571 | 565 | { |
572 | 566 | $acl_s_no++; |
573 | 567 | } |
@@ -596,8 +590,7 @@ discard block |
||
596 | 590 | } |
597 | 591 | } |
598 | 592 | } |
599 | - } |
|
600 | - else |
|
593 | + } else |
|
601 | 594 | { |
602 | 595 | $template->assign_block_vars('c_mask', array( |
603 | 596 | 'C_MASK_ID' => $p_system, |
@@ -673,13 +666,11 @@ discard block |
||
673 | 666 | if (!sizeof($group_id) && !sizeof($user_id)) |
674 | 667 | { |
675 | 668 | trigger_error('NO_VICTIM_SELECTED', E_USER_WARNING); |
676 | - } |
|
677 | - else if (sizeof($group_id)) |
|
669 | + } else if (sizeof($group_id)) |
|
678 | 670 | { |
679 | 671 | $victim_mode = 'group'; |
680 | 672 | $victim_id = $group_id; |
681 | - } |
|
682 | - else |
|
673 | + } else |
|
683 | 674 | { |
684 | 675 | $victim_mode = 'user'; |
685 | 676 | $victim_id = $user_id; |
@@ -728,8 +719,7 @@ discard block |
||
728 | 719 | if (substr($p_mask, -6, 6) == '_count') |
729 | 720 | { |
730 | 721 | $auth_settings[$c_mask][$v_mask][$p_mask] = $value; |
731 | - } |
|
732 | - else |
|
722 | + } else |
|
733 | 723 | { |
734 | 724 | $auth_settings[$c_mask][$v_mask][$p_mask] = ($value == ACL_YES) ? $phpbb_ext_gallery_core_auth::ACL_YES : (($value == ACL_NEVER) ? $phpbb_ext_gallery_core_auth::ACL_NEVER : $phpbb_ext_gallery_core_auth::ACL_NO); |
735 | 725 | // Do we have moderators? |
@@ -779,15 +769,13 @@ discard block |
||
779 | 769 | } |
780 | 770 | // We take all permissions of another c_mask, so: |
781 | 771 | break; |
782 | - } |
|
783 | - else |
|
772 | + } else |
|
784 | 773 | { |
785 | 774 | // The choosen option was disabled: Hacking attempt?! |
786 | 775 | trigger_error('HACKING_ATTEMPT', E_USER_WARNING); |
787 | 776 | } |
788 | 777 | } |
789 | - } |
|
790 | - else if ($i_mask) |
|
778 | + } else if ($i_mask) |
|
791 | 779 | { |
792 | 780 | // Inherit permissions of one [c_mask][v_mask] |
793 | 781 | $v_mask = (int) $v_mask; |
@@ -808,8 +796,7 @@ discard block |
||
808 | 796 | } |
809 | 797 | $auth_settings[$c_mask][$v_mask] = $auth_settings[$ci_mask][$vi_mask]; |
810 | 798 | $p_mask_storage[$auth_settings[$c_mask][$v_mask]]['usage'][] = array('c_mask' => $c_mask, 'v_mask' => $v_mask); |
811 | - } |
|
812 | - else |
|
799 | + } else |
|
813 | 800 | { |
814 | 801 | // The choosen option was disabled: Hacking attempt?! |
815 | 802 | trigger_error('HACKING_ATTEMPT', E_USER_WARNING); |
@@ -882,8 +869,7 @@ discard block |
||
882 | 869 | $victim_names[$row['group_id']] = $row['group_name']; |
883 | 870 | } |
884 | 871 | $db->sql_freeresult($result); |
885 | - } |
|
886 | - else |
|
872 | + } else |
|
887 | 873 | { |
888 | 874 | // Get username's for the GALLERY_MODSCACHE_TABLE |
889 | 875 | $sql = 'SELECT user_id, username |
@@ -949,8 +935,7 @@ discard block |
||
949 | 935 | 'group_id' => $usage['v_mask'], |
950 | 936 | 'group_name' => $victim_names[$usage['v_mask']], |
951 | 937 | ); |
952 | - } |
|
953 | - else |
|
938 | + } else |
|
954 | 939 | { |
955 | 940 | $sql_moderators[] = array( |
956 | 941 | 'album_id' => $usage['c_mask'], |
@@ -959,8 +944,7 @@ discard block |
||
959 | 944 | ); |
960 | 945 | } |
961 | 946 | } |
962 | - } |
|
963 | - else |
|
947 | + } else |
|
964 | 948 | { |
965 | 949 | $sql_permissions[] = array( |
966 | 950 | 'perm_role_id' => $role_id, |
@@ -1084,8 +1068,7 @@ discard block |
||
1084 | 1068 | $phpbb_ext_gallery_core_auth->set_user_permissions('all', ''); |
1085 | 1069 | |
1086 | 1070 | trigger_error($this->language->lang('COPY_PERMISSIONS_SUCCESSFUL') . adm_back_link($this->u_action)); |
1087 | - } |
|
1088 | - else |
|
1071 | + } else |
|
1089 | 1072 | { |
1090 | 1073 | $s_hidden_fields = array( |
1091 | 1074 | 'submit' => $submit, |
@@ -42,8 +42,7 @@ |
||
42 | 42 | if (confirm_box(true)) |
43 | 43 | { |
44 | 44 | $log->delete_logs($marked); |
45 | - } |
|
46 | - else |
|
45 | + } else |
|
47 | 46 | { |
48 | 47 | confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields(array( |
49 | 48 | 'page' => $page, |
@@ -72,14 +72,12 @@ discard block |
||
72 | 72 | if ($login_explain && isset($this->user->lang[$login_explain])) |
73 | 73 | { |
74 | 74 | $login_explain = $this->user->lang($login_explain); |
75 | - } |
|
76 | - else |
|
75 | + } else |
|
77 | 76 | { |
78 | 77 | $login_explain = ''; |
79 | 78 | } |
80 | 79 | login_box($loginlink, $login_explain); |
81 | - } |
|
82 | - else |
|
80 | + } else |
|
83 | 81 | { |
84 | 82 | $this->url->meta_refresh(3, $backlink); |
85 | 83 | trigger_error('NOT_AUTHORISED'); |
@@ -121,8 +119,7 @@ discard block |
||
121 | 119 | } |
122 | 120 | |
123 | 121 | return; |
124 | - } |
|
125 | - else if ($mode == 'albums') |
|
122 | + } else if ($mode == 'albums') |
|
126 | 123 | { |
127 | 124 | // Mark album read |
128 | 125 | if (!is_array($album_id)) |
@@ -168,8 +165,7 @@ discard block |
||
168 | 165 | } |
169 | 166 | |
170 | 167 | return; |
171 | - } |
|
172 | - else if ($mode == 'album') |
|
168 | + } else if ($mode == 'album') |
|
173 | 169 | { |
174 | 170 | if ($album_id === false) |
175 | 171 | { |
@@ -180,8 +180,7 @@ |
||
180 | 180 | if ($subtarget) |
181 | 181 | { |
182 | 182 | $this->phpbb_cache->destroy($target, $subtarget); |
183 | - } |
|
184 | - else |
|
183 | + } else |
|
185 | 184 | { |
186 | 185 | $this->phpbb_cache->destroy($target); |
187 | 186 | } |