@@ -122,13 +122,13 @@ |
||
| 122 | 122 | } |
| 123 | 123 | if ($recent) |
| 124 | 124 | { |
| 125 | - $block_name = $this->language->lang('RECENT_IMAGES'); |
|
| 125 | + $block_name = $this->language->lang('RECENT_IMAGES'); |
|
| 126 | 126 | $u_block = ' '; |
| 127 | 127 | $this->gallery_search->recent($this->gallery_config->get('rrc_profile_items'), -1, $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block); |
| 128 | 128 | } |
| 129 | 129 | if ($random) |
| 130 | 130 | { |
| 131 | - $block_name = $this->language->lang('RANDOM_IMAGES'); |
|
| 131 | + $block_name = $this->language->lang('RANDOM_IMAGES'); |
|
| 132 | 132 | $u_block = ' '; |
| 133 | 133 | $this->gallery_search->random($this->gallery_config->get('rrc_profile_items'), $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block); |
| 134 | 134 | } |
@@ -146,8 +146,7 @@ |
||
| 146 | 146 | 'U_GALLERY_IMAGES_ALLOW' => true, |
| 147 | 147 | 'U_GALLERY_IMAGES' => $user_info['user_images'], |
| 148 | 148 | )); |
| 149 | - } |
|
| 150 | - else |
|
| 149 | + } else |
|
| 151 | 150 | { |
| 152 | 151 | $this->template->assign_vars(array( |
| 153 | 152 | 'U_GALLERY_IMAGES_ALLOW' => true, |
@@ -183,10 +183,10 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /** |
| 186 | - * Delete comments |
|
| 187 | - * |
|
| 188 | - * @param mixed $comment_ids Array or integer with comment_id we delete. |
|
| 189 | - */ |
|
| 186 | + * Delete comments |
|
| 187 | + * |
|
| 188 | + * @param mixed $comment_ids Array or integer with comment_id we delete. |
|
| 189 | + */ |
|
| 190 | 190 | public function delete_comments($comment_ids) |
| 191 | 191 | { |
| 192 | 192 | $comment_ids = $this->cast_mixed_int2array($comment_ids); |
@@ -216,11 +216,11 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | - * Delete comments for given image_ids |
|
| 220 | - * |
|
| 221 | - * @param mixed $image_ids Array or integer with image_id where we delete the comments. |
|
| 222 | - * @param bool $reset_stats Shall we also reset the statistics? We can save that query, when the images are deleted anyway. |
|
| 223 | - */ |
|
| 219 | + * Delete comments for given image_ids |
|
| 220 | + * |
|
| 221 | + * @param mixed $image_ids Array or integer with image_id where we delete the comments. |
|
| 222 | + * @param bool $reset_stats Shall we also reset the statistics? We can save that query, when the images are deleted anyway. |
|
| 223 | + */ |
|
| 224 | 224 | public function delete_images($image_ids, $reset_stats = false) |
| 225 | 225 | { |
| 226 | 226 | $image_ids = $this->cast_mixed_int2array($image_ids); |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | 'comment_time' => time(), |
| 95 | 95 | ); |
| 96 | 96 | |
| 97 | - $this->db->sql_query('INSERT INTO ' .$this->comments_table .' ' . $this->db->sql_build_array('INSERT', $data)); |
|
| 97 | + $this->db->sql_query('INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data)); |
|
| 98 | 98 | $newest_comment_id = (int) $this->db->sql_nextid(); |
| 99 | 99 | $this->config->inc('num_comments', 1); |
| 100 | 100 | |
@@ -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 | } |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * Remove images from watch-list |
|
| 99 | - * |
|
| 100 | - * @param mixed $image_ids Array or integer with image_id where we delete from the watch-list. |
|
| 101 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 102 | - */ |
|
| 98 | + * Remove images from watch-list |
|
| 99 | + * |
|
| 100 | + * @param mixed $image_ids Array or integer with image_id where we delete from the watch-list. |
|
| 101 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 102 | + */ |
|
| 103 | 103 | public function remove($image_ids, $user_ids = false) |
| 104 | 104 | { |
| 105 | 105 | $image_ids = self::cast_mixed_int2array($image_ids); |
@@ -112,11 +112,11 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | - * Remove albums from watch-list |
|
| 116 | - * |
|
| 117 | - * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
| 118 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 119 | - */ |
|
| 115 | + * Remove albums from watch-list |
|
| 116 | + * |
|
| 117 | + * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
| 118 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 119 | + */ |
|
| 120 | 120 | public function remove_albums($album_ids, $user_ids = false) |
| 121 | 121 | { |
| 122 | 122 | $album_ids = self::cast_mixed_int2array($album_ids); |
@@ -129,10 +129,10 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * Delete given image_ids from watch-list |
|
| 133 | - * |
|
| 134 | - * @param mixed $image_ids Array or integer with image_id where we delete from watch-list. |
|
| 135 | - */ |
|
| 132 | + * Delete given image_ids from watch-list |
|
| 133 | + * |
|
| 134 | + * @param mixed $image_ids Array or integer with image_id where we delete from watch-list. |
|
| 135 | + */ |
|
| 136 | 136 | public function delete_images($image_ids) |
| 137 | 137 | { |
| 138 | 138 | $image_ids = self::cast_mixed_int2array($image_ids); |
@@ -144,10 +144,10 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | - * Delete given album_ids from watch-list |
|
| 148 | - * |
|
| 149 | - * @param mixed $album_ids Array or integer with album_id where we delete from watch-list. |
|
| 150 | - */ |
|
| 147 | + * Delete given album_ids from watch-list |
|
| 148 | + * |
|
| 149 | + * @param mixed $album_ids Array or integer with album_id where we delete from watch-list. |
|
| 150 | + */ |
|
| 151 | 151 | public function delete_albums($album_ids) |
| 152 | 152 | { |
| 153 | 153 | $album_ids = self::cast_mixed_int2array($album_ids); |
@@ -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 | } |
@@ -14,27 +14,27 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | - * Gallery Auth Object |
|
| 18 | - * @var \phpbbgallery\core\auth\auth |
|
| 19 | - */ |
|
| 17 | + * Gallery Auth Object |
|
| 18 | + * @var \phpbbgallery\core\auth\auth |
|
| 19 | + */ |
|
| 20 | 20 | protected $auth; |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * Config Object |
|
| 24 | - * @var \phpbb\config\config |
|
| 25 | - */ |
|
| 23 | + * Config Object |
|
| 24 | + * @var \phpbb\config\config |
|
| 25 | + */ |
|
| 26 | 26 | protected $config; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * Template Object |
|
| 30 | - * @var \phpbb\template\template |
|
| 31 | - */ |
|
| 29 | + * Template Object |
|
| 30 | + * @var \phpbb\template\template |
|
| 31 | + */ |
|
| 32 | 32 | protected $template; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * User Object |
|
| 36 | - * @var \phpbb\user |
|
| 37 | - */ |
|
| 35 | + * User Object |
|
| 36 | + * @var \phpbb\user |
|
| 37 | + */ |
|
| 38 | 38 | protected $user; |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -62,17 +62,17 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | - * User authorisation levels output |
|
| 66 | - * |
|
| 67 | - * @param int $album_id The current album the user is in. |
|
| 68 | - * @param int $album_status The albums status bit. |
|
| 69 | - * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
| 70 | - * @return null |
|
| 71 | - * |
|
| 72 | - * borrowed from phpBB3 |
|
| 73 | - * @author: phpBB Group |
|
| 74 | - * @function: gen_forum_auth_level |
|
| 75 | - */ |
|
| 65 | + * User authorisation levels output |
|
| 66 | + * |
|
| 67 | + * @param int $album_id The current album the user is in. |
|
| 68 | + * @param int $album_status The albums status bit. |
|
| 69 | + * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
| 70 | + * @return null |
|
| 71 | + * |
|
| 72 | + * borrowed from phpBB3 |
|
| 73 | + * @author: phpBB Group |
|
| 74 | + * @function: gen_forum_auth_level |
|
| 75 | + */ |
|
| 76 | 76 | public function display($album_id, $album_status, $album_user_id = -1) |
| 77 | 77 | { |
| 78 | 78 | $locked = ($album_status == ITEM_LOCKED && !$this->auth->acl_check('m_', $album_id, $album_user_id)) ? true : false; |
@@ -12,21 +12,21 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | class auth |
| 14 | 14 | { |
| 15 | - const SETTING_PERMISSIONS = -39839; |
|
| 16 | - const PERSONAL_ALBUM = -3; |
|
| 15 | + const SETTING_PERMISSIONS = -39839; |
|
| 16 | + const PERSONAL_ALBUM = -3; |
|
| 17 | 17 | const OWN_ALBUM = -2; |
| 18 | - const PUBLIC_ALBUM = 0; |
|
| 18 | + const PUBLIC_ALBUM = 0; |
|
| 19 | 19 | |
| 20 | 20 | const ACCESS_ALL = 0; |
| 21 | - const ACCESS_REGISTERED = 1; |
|
| 22 | - const ACCESS_NOT_FOES = 2; |
|
| 23 | - const ACCESS_FRIENDS = 3; |
|
| 24 | - const ACCESS_SPECIAL_FRIENDS = 4; |
|
| 21 | + const ACCESS_REGISTERED = 1; |
|
| 22 | + const ACCESS_NOT_FOES = 2; |
|
| 23 | + const ACCESS_FRIENDS = 3; |
|
| 24 | + const ACCESS_SPECIAL_FRIENDS = 4; |
|
| 25 | 25 | |
| 26 | 26 | // ACL - slightly different |
| 27 | - const ACL_NO = 0; |
|
| 28 | - const ACL_YES = 1; |
|
| 29 | - const ACL_NEVER = 2; |
|
| 27 | + const ACL_NO = 0; |
|
| 28 | + const ACL_YES = 1; |
|
| 29 | + const ACL_NEVER = 2; |
|
| 30 | 30 | |
| 31 | 31 | static protected $_permission_i = array('i_view', 'i_watermark', 'i_upload', 'i_approve', 'i_edit', 'i_delete', 'i_report', 'i_rate'); |
| 32 | 32 | static protected $_permission_c = array('c_read', 'c_post', 'c_edit', 'c_delete'); |
@@ -167,17 +167,17 @@ discard block |
||
| 167 | 167 | $sql_select .= " MAX($permission) as $permission,"; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - $this->_auth_data[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
| 170 | + $this->_auth_data[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
| 171 | 171 | $this->_auth_data_never[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set(); |
| 172 | 172 | $this->_auth_data[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
| 173 | - $this->_auth_data_never[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
| 173 | + $this->_auth_data_never[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set(); |
|
| 174 | 174 | |
| 175 | 175 | foreach ($albums as $album) |
| 176 | 176 | { |
| 177 | 177 | if ($album['album_user_id'] == self::PUBLIC_ALBUM) |
| 178 | 178 | { |
| 179 | - $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
| 180 | - $this->_auth_data_never[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
| 179 | + $this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
| 180 | + $this->_auth_data_never[$album['album_id']] = new \phpbbgallery\core\auth\set(); |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | $zebra = null; |
| 357 | 357 | |
| 358 | - $albums = array();//@todo $this->cache->obtain_album_list(); |
|
| 358 | + $albums = array(); //@todo $this->cache->obtain_album_list(); |
|
| 359 | 359 | foreach ($albums as $album) |
| 360 | 360 | { |
| 361 | 361 | if (!$album['album_auth_access'] || ($album['album_user_id'] == self::PUBLIC_ALBUM))# || ($album['album_user_id'] == $user_id)) |
@@ -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 | } |
@@ -41,57 +41,57 @@ discard block |
||
| 41 | 41 | protected $acl_cache = array(); |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * Cache object |
|
| 45 | - * @var \phpbbgallery\core\cache |
|
| 46 | - */ |
|
| 44 | + * Cache object |
|
| 45 | + * @var \phpbbgallery\core\cache |
|
| 46 | + */ |
|
| 47 | 47 | protected $cache; |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * Database object |
|
| 51 | - * @var \phpbb\db\driver\driver |
|
| 52 | - */ |
|
| 50 | + * Database object |
|
| 51 | + * @var \phpbb\db\driver\driver |
|
| 52 | + */ |
|
| 53 | 53 | protected $db; |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * Gallery user object |
|
| 57 | - * @var \phpbbgallery\core\user |
|
| 58 | - */ |
|
| 56 | + * Gallery user object |
|
| 57 | + * @var \phpbbgallery\core\user |
|
| 58 | + */ |
|
| 59 | 59 | protected $user; |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * phpBB user object |
|
| 63 | - * @var \phpbb\user |
|
| 64 | - */ |
|
| 62 | + * phpBB user object |
|
| 63 | + * @var \phpbb\user |
|
| 64 | + */ |
|
| 65 | 65 | protected $phpbb_user; |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * phpBB auth object |
|
| 69 | - * @var \phpbb\auth\auth |
|
| 70 | - */ |
|
| 68 | + * phpBB auth object |
|
| 69 | + * @var \phpbb\auth\auth |
|
| 70 | + */ |
|
| 71 | 71 | protected $auth; |
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | - * Gallery permissions table |
|
| 75 | - * @var string |
|
| 76 | - */ |
|
| 74 | + * Gallery permissions table |
|
| 75 | + * @var string |
|
| 76 | + */ |
|
| 77 | 77 | protected $table_permissions; |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | - * Gallery permission roles table |
|
| 81 | - * @var string |
|
| 82 | - */ |
|
| 80 | + * Gallery permission roles table |
|
| 81 | + * @var string |
|
| 82 | + */ |
|
| 83 | 83 | protected $table_roles; |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * Gallery users table |
|
| 87 | - * @var string |
|
| 88 | - */ |
|
| 86 | + * Gallery users table |
|
| 87 | + * @var string |
|
| 88 | + */ |
|
| 89 | 89 | protected $table_users; |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * Gallery albums table |
|
| 93 | - * @var string |
|
| 94 | - */ |
|
| 92 | + * Gallery albums table |
|
| 93 | + * @var string |
|
| 94 | + */ |
|
| 95 | 95 | protected $table_albums; |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | /** |
| 342 | - * Merge the NEVER-options into the YES-options by removing the YES, if it is set. |
|
| 343 | - */ |
|
| 342 | + * Merge the NEVER-options into the YES-options by removing the YES, if it is set. |
|
| 343 | + */ |
|
| 344 | 344 | protected function merge_acl_row() |
| 345 | 345 | { |
| 346 | 346 | foreach ($this->_auth_data as $album_id => $obj) |
@@ -585,14 +585,14 @@ discard block |
||
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | /** |
| 588 | - * Get permission |
|
| 589 | - * |
|
| 590 | - * @param string $acl One of the permissions, Exp: i_view |
|
| 591 | - * @param int $a_id The album_id, from which we want to have the permissions |
|
| 592 | - * @param int $u_id The user_id from the album-owner. If not specified we need to get it from the cache. |
|
| 593 | - * |
|
| 594 | - * @return bool Is the user allowed to do the $acl? |
|
| 595 | - */ |
|
| 588 | + * Get permission |
|
| 589 | + * |
|
| 590 | + * @param string $acl One of the permissions, Exp: i_view |
|
| 591 | + * @param int $a_id The album_id, from which we want to have the permissions |
|
| 592 | + * @param int $u_id The user_id from the album-owner. If not specified we need to get it from the cache. |
|
| 593 | + * |
|
| 594 | + * @return bool Is the user allowed to do the $acl? |
|
| 595 | + */ |
|
| 596 | 596 | public function acl_check($acl, $a_id, $u_id = -1) |
| 597 | 597 | { |
| 598 | 598 | $bit = self::$_permissions_flipped[$acl]; |
@@ -655,12 +655,12 @@ discard block |
||
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | /** |
| 658 | - * Does the user have the permission for any album? |
|
| 659 | - * |
|
| 660 | - * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
| 661 | - * |
|
| 662 | - * @return bool Is the user allowed to do the $acl? |
|
| 663 | - */ |
|
| 658 | + * Does the user have the permission for any album? |
|
| 659 | + * |
|
| 660 | + * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
| 661 | + * |
|
| 662 | + * @return bool Is the user allowed to do the $acl? |
|
| 663 | + */ |
|
| 664 | 664 | public function acl_check_global($acl) |
| 665 | 665 | { |
| 666 | 666 | $bit = self::$_permissions_flipped[$acl]; |
@@ -692,16 +692,16 @@ discard block |
||
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | /** |
| 695 | - * Get albums by permission |
|
| 696 | - * |
|
| 697 | - * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
| 698 | - * @param string $return Type of the return value. array returns an array, else it's a string. |
|
| 699 | - * bool means it only checks whether the user has the permission anywhere. |
|
| 700 | - * @param bool $display_in_rrc Only return albums, that have the display_in_rrc-flag set. |
|
| 701 | - * @param bool $display_pegas Include personal galleries in the list. |
|
| 702 | - * |
|
| 703 | - * @return mixed $album_ids, either as list or array. |
|
| 704 | - */ |
|
| 695 | + * Get albums by permission |
|
| 696 | + * |
|
| 697 | + * @param string $acl One of the permissions, Exp: i_view; *_count permissions are not allowed! |
|
| 698 | + * @param string $return Type of the return value. array returns an array, else it's a string. |
|
| 699 | + * bool means it only checks whether the user has the permission anywhere. |
|
| 700 | + * @param bool $display_in_rrc Only return albums, that have the display_in_rrc-flag set. |
|
| 701 | + * @param bool $display_pegas Include personal galleries in the list. |
|
| 702 | + * |
|
| 703 | + * @return mixed $album_ids, either as list or array. |
|
| 704 | + */ |
|
| 705 | 705 | public function acl_album_ids($acl, $return = 'array', $display_in_rrc = false, $display_pegas = true) |
| 706 | 706 | { |
| 707 | 707 | $bit = self::$_permissions_flipped[$acl]; |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $action = $request->variable('action', ''); |
| 67 | 67 | $update = (isset($_POST['update'])) ? true : false; |
| 68 | - $album_id = $request->variable('a', 0); |
|
| 68 | + $album_id = $request->variable('a', 0); |
|
| 69 | 69 | |
| 70 | - $this->parent_id = $request->variable('parent_id', 0); |
|
| 70 | + $this->parent_id = $request->variable('parent_id', 0); |
|
| 71 | 71 | $album_data = $errors = array(); |
| 72 | 72 | if ($update && !check_form_key($form_key)) |
| 73 | 73 | { |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | switch ($action) |
| 82 | 82 | { |
| 83 | 83 | case 'delete': |
| 84 | - $action_subalbums = $request->variable('action_subalbums', ''); |
|
| 85 | - $subalbums_to_id = $request->variable('subalbums_to_id', 0); |
|
| 86 | - $action_images = $request->variable('action_images', ''); |
|
| 87 | - $images_to_id = $request->variable('images_to_id', 0); |
|
| 84 | + $action_subalbums = $request->variable('action_subalbums', ''); |
|
| 85 | + $subalbums_to_id = $request->variable('subalbums_to_id', 0); |
|
| 86 | + $action_images = $request->variable('action_images', ''); |
|
| 87 | + $images_to_id = $request->variable('images_to_id', 0); |
|
| 88 | 88 | |
| 89 | 89 | $errors = $manage_albums->delete_album($album_id, $action_images, $action_subalbums, $images_to_id, $subalbums_to_id); |
| 90 | 90 | |
@@ -232,12 +232,12 @@ discard block |
||
| 232 | 232 | $acl_url = '&mode=manage&action=v_mask&album_id[]=' . $album_data['album_id']; |
| 233 | 233 | |
| 234 | 234 | $message = ($action == 'add') ? $this->language->lang('ALBUM_CREATED') : $this->language->lang('ALBUM_UPDATED'); |
| 235 | - $message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>'); |
|
| 235 | + $message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>'); |
|
| 236 | 236 | |
| 237 | 237 | // Redirect directly to permission settings screen |
| 238 | 238 | if ($action == 'add' && !$album_perm_from) |
| 239 | 239 | { |
| 240 | - meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url)); |
|
| 240 | + meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url)); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | trigger_error($message . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id)); |
@@ -324,8 +324,7 @@ discard block |
||
| 324 | 324 | if (!$update) |
| 325 | 325 | { |
| 326 | 326 | $album_data = $row; |
| 327 | - } |
|
| 328 | - else |
|
| 327 | + } else |
|
| 329 | 328 | { |
| 330 | 329 | $album_data['left_id'] = $row['left_id']; |
| 331 | 330 | $album_data['right_id'] = $row['right_id']; |
@@ -333,8 +332,7 @@ discard block |
||
| 333 | 332 | if ($row['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) |
| 334 | 333 | { |
| 335 | 334 | $contest_data = $phpbb_gallery_contest->get_contest($album_id, 'album'); |
| 336 | - } |
|
| 337 | - else |
|
| 335 | + } else |
|
| 338 | 336 | { |
| 339 | 337 | // Default values, 3 days later rate and 7 for the end of the contest |
| 340 | 338 | $contest_data = array( |
@@ -356,8 +354,7 @@ discard block |
||
| 356 | 354 | /* |
| 357 | 355 | $album_data['album_password_confirm'] = $album_data['album_password']; |
| 358 | 356 | */ |
| 359 | - } |
|
| 360 | - else |
|
| 357 | + } else |
|
| 361 | 358 | { |
| 362 | 359 | $this->page_title = 'CREATE_ALBUM'; |
| 363 | 360 | |
@@ -494,8 +491,7 @@ discard block |
||
| 494 | 491 | 'S_HAS_SUBALBUMS' => ($album_data['right_id'] - $album_data['left_id'] > 1) ? true : false, |
| 495 | 492 | 'S_ALBUMS_LIST' => $albums_list, |
| 496 | 493 | )); |
| 497 | - } |
|
| 498 | - else if ($uploadable_album_exists) |
|
| 494 | + } else if ($uploadable_album_exists) |
|
| 499 | 495 | { |
| 500 | 496 | $template->assign_vars(array( |
| 501 | 497 | 'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $album_id, 0, (int) \phpbbgallery\core\block::TYPE_UPLOAD), |
@@ -635,8 +631,7 @@ discard block |
||
| 635 | 631 | if (!$this->parent_id) |
| 636 | 632 | { |
| 637 | 633 | $navigation = $user->lang['GALLERY_INDEX']; |
| 638 | - } |
|
| 639 | - else |
|
| 634 | + } else |
|
| 640 | 635 | { |
| 641 | 636 | $navigation = '<a href="' . $this->u_action . '">' . $user->lang['GALLERY_INDEX'] . '</a>'; |
| 642 | 637 | |
@@ -646,8 +641,7 @@ discard block |
||
| 646 | 641 | if ($row['album_id'] == $this->parent_id) |
| 647 | 642 | { |
| 648 | 643 | $navigation .= ' -> ' . $row['album_name']; |
| 649 | - } |
|
| 650 | - else |
|
| 644 | + } else |
|
| 651 | 645 | { |
| 652 | 646 | $navigation .= ' -> <a href="' . $this->u_action . '&parent_id=' . $row['album_id'] . '">' . $row['album_name'] . '</a>'; |
| 653 | 647 | } |
@@ -678,8 +672,7 @@ discard block |
||
| 678 | 672 | if ($row['album_status'] == (int) \phpbbgallery\core\block::ALBUM_LOCKED) |
| 679 | 673 | { |
| 680 | 674 | $folder_image = '<img src="images/icon_folder_lock.gif" alt="' . $user->lang['LOCKED'] . '" />'; |
| 681 | - } |
|
| 682 | - else |
|
| 675 | + } else |
|
| 683 | 676 | { |
| 684 | 677 | $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'] . '" />'; |
| 685 | 678 | } |
@@ -705,8 +698,7 @@ discard block |
||
| 705 | 698 | ); |
| 706 | 699 | } |
| 707 | 700 | while ($row = $db->sql_fetchrow($result)); |
| 708 | - } |
|
| 709 | - else if ($this->parent_id) |
|
| 701 | + } else if ($this->parent_id) |
|
| 710 | 702 | { |
| 711 | 703 | $row = $phpbb_ext_gallery_core_album->get_info($this->parent_id); |
| 712 | 704 | |
@@ -138,13 +138,13 @@ discard block |
||
| 138 | 138 | ); |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | - * Event to send requested data |
|
| 142 | - * @event phpbbgallery.core.acp.albums.request_data |
|
| 143 | - * @var string action Action we are taking |
|
| 144 | - * @var int album_id Album we are doing it to |
|
| 145 | - * @var array album_data Album data for the album |
|
| 146 | - * @since 1.2.0 |
|
| 147 | - */ |
|
| 141 | + * Event to send requested data |
|
| 142 | + * @event phpbbgallery.core.acp.albums.request_data |
|
| 143 | + * @var string action Action we are taking |
|
| 144 | + * @var int album_id Album we are doing it to |
|
| 145 | + * @var array album_data Album data for the album |
|
| 146 | + * @since 1.2.0 |
|
| 147 | + */ |
|
| 148 | 148 | $vars = array('action', 'album_id', 'album_data'); |
| 149 | 149 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.acp.albums.request_data', compact($vars))); |
| 150 | 150 | |
@@ -387,13 +387,13 @@ discard block |
||
| 387 | 387 | ); |
| 388 | 388 | |
| 389 | 389 | /** |
| 390 | - * Event to send default data |
|
| 391 | - * |
|
| 392 | - * @event phpbbgallery.core.acp.albums.default_data |
|
| 393 | - * @var action action Action taken |
|
| 394 | - * @var array album_data Album data array |
|
| 395 | - * @since 1.2.0 |
|
| 396 | - */ |
|
| 390 | + * Event to send default data |
|
| 391 | + * |
|
| 392 | + * @event phpbbgallery.core.acp.albums.default_data |
|
| 393 | + * @var action action Action taken |
|
| 394 | + * @var array album_data Album data array |
|
| 395 | + * @since 1.2.0 |
|
| 396 | + */ |
|
| 397 | 397 | $vars = array('action', 'album_data'); |
| 398 | 398 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.acp.albums.default_data', compact($vars))); |
| 399 | 399 | |
@@ -564,13 +564,13 @@ discard block |
||
| 564 | 564 | )); |
| 565 | 565 | |
| 566 | 566 | /** |
| 567 | - * Event after assigning data to template |
|
| 568 | - * |
|
| 569 | - * @event phpbbgallery.core.acp.albums.send_to_template |
|
| 570 | - * @var action action Action taken |
|
| 571 | - * @var array album_data Album data array |
|
| 572 | - * @since 1.2.0 |
|
| 573 | - */ |
|
| 567 | + * Event after assigning data to template |
|
| 568 | + * |
|
| 569 | + * @event phpbbgallery.core.acp.albums.send_to_template |
|
| 570 | + * @var action action Action taken |
|
| 571 | + * @var array album_data Album data array |
|
| 572 | + * @since 1.2.0 |
|
| 573 | + */ |
|
| 574 | 574 | $vars = array('action', 'album_data'); |
| 575 | 575 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.acp.albums.send_to_template', compact($vars))); |
| 576 | 576 | |
@@ -12,13 +12,13 @@ discard block |
||
| 12 | 12 | class config_module |
| 13 | 13 | { |
| 14 | 14 | /** |
| 15 | - * This function is called, when the main() function is called. |
|
| 16 | - * You can use this function to add your language files, check for a valid mode, unset config options and more. |
|
| 17 | - * |
|
| 18 | - * @param int $id The ID of the module |
|
| 19 | - * @param string $mode The name of the mode we want to display |
|
| 20 | - * @return void |
|
| 21 | - */ |
|
| 15 | + * This function is called, when the main() function is called. |
|
| 16 | + * You can use this function to add your language files, check for a valid mode, unset config options and more. |
|
| 17 | + * |
|
| 18 | + * @param int $id The ID of the module |
|
| 19 | + * @param string $mode The name of the mode we want to display |
|
| 20 | + * @return void |
|
| 21 | + */ |
|
| 22 | 22 | public function main($id, $mode) |
| 23 | 23 | { |
| 24 | 24 | // Check whether the mode is allowed. |
@@ -263,33 +263,33 @@ discard block |
||
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | /** |
| 266 | - * Returns an array with the display_var array for the given mode |
|
| 267 | - * The returned display must have the two keys title and vars |
|
| 268 | - * @key string title The page title or lang key for the page title |
|
| 269 | - * @key array vars An array of tupels, one foreach config option we display: |
|
| 270 | - * @key The name of the config in the get_config_array() array. |
|
| 271 | - * If the key starts with 'legend' a new box is opened with the value being the title of this box. |
|
| 272 | - * @value An array with several options: |
|
| 273 | - * @key lang Description for the config value (can be a language key) |
|
| 274 | - * @key explain Boolean whether the config has an explanation of not. |
|
| 275 | - * If true, <lang>_EXP (and <lang>_EXPLAIN) is displayed as explanation |
|
| 276 | - * @key validate The config value can be validated as bool, int or string. |
|
| 277 | - * Additional a min and max value can be specified for integers |
|
| 278 | - * On strings the min and max value are the length of the string |
|
| 279 | - * If your config value shall not be casted, remove the validate-key. |
|
| 280 | - * @key type The type of the config option: |
|
| 281 | - * - Radio buttons: Either with "Yes and No" (radio:yes_no) or "Enabled and Disabled" (radio:enabled_disabled) as description |
|
| 282 | - * - Text/password field: "text:<field-size>:<text-max-length>" and "password:<field-size>:<text-max-length>" |
|
| 283 | - * - Select: "select" requires the key "function" or "method" to be set which provides the html code for the options |
|
| 284 | - * - Custom template: "custom" requires the key "function" or "method" to be set which provides the html code |
|
| 285 | - * @key function/method Required when using type select and custom |
|
| 286 | - * @key append A language string that is appended after the config type (e.g. You can append 'px' to a pixel size field) |
|
| 287 | - * This last parameter is optional |
|
| 288 | - * @key string tpl Name of the template file we use to display the configs |
|
| 289 | - * |
|
| 290 | - * @param string $mode The name of the mode we want to display |
|
| 291 | - * @return array See description above |
|
| 292 | - */ |
|
| 266 | + * Returns an array with the display_var array for the given mode |
|
| 267 | + * The returned display must have the two keys title and vars |
|
| 268 | + * @key string title The page title or lang key for the page title |
|
| 269 | + * @key array vars An array of tupels, one foreach config option we display: |
|
| 270 | + * @key The name of the config in the get_config_array() array. |
|
| 271 | + * If the key starts with 'legend' a new box is opened with the value being the title of this box. |
|
| 272 | + * @value An array with several options: |
|
| 273 | + * @key lang Description for the config value (can be a language key) |
|
| 274 | + * @key explain Boolean whether the config has an explanation of not. |
|
| 275 | + * If true, <lang>_EXP (and <lang>_EXPLAIN) is displayed as explanation |
|
| 276 | + * @key validate The config value can be validated as bool, int or string. |
|
| 277 | + * Additional a min and max value can be specified for integers |
|
| 278 | + * On strings the min and max value are the length of the string |
|
| 279 | + * If your config value shall not be casted, remove the validate-key. |
|
| 280 | + * @key type The type of the config option: |
|
| 281 | + * - Radio buttons: Either with "Yes and No" (radio:yes_no) or "Enabled and Disabled" (radio:enabled_disabled) as description |
|
| 282 | + * - Text/password field: "text:<field-size>:<text-max-length>" and "password:<field-size>:<text-max-length>" |
|
| 283 | + * - Select: "select" requires the key "function" or "method" to be set which provides the html code for the options |
|
| 284 | + * - Custom template: "custom" requires the key "function" or "method" to be set which provides the html code |
|
| 285 | + * @key function/method Required when using type select and custom |
|
| 286 | + * @key append A language string that is appended after the config type (e.g. You can append 'px' to a pixel size field) |
|
| 287 | + * This last parameter is optional |
|
| 288 | + * @key string tpl Name of the template file we use to display the configs |
|
| 289 | + * |
|
| 290 | + * @param string $mode The name of the mode we want to display |
|
| 291 | + * @return array See description above |
|
| 292 | + */ |
|
| 293 | 293 | public function get_display_vars($mode) |
| 294 | 294 | { |
| 295 | 295 | global $phpbb_dispatcher; |
@@ -297,12 +297,12 @@ discard block |
||
| 297 | 297 | $return_ary = $this->display_vars[$mode]; |
| 298 | 298 | |
| 299 | 299 | /** |
| 300 | - * Event to send the display vars |
|
| 301 | - * @event phpbbgallery.core.acp.config.get_display_vars |
|
| 302 | - * @var string mode Mode we are requesting for |
|
| 303 | - * @var array return_ary Array we are sending back |
|
| 304 | - * @since 1.2.0 |
|
| 305 | - */ |
|
| 300 | + * Event to send the display vars |
|
| 301 | + * @event phpbbgallery.core.acp.config.get_display_vars |
|
| 302 | + * @var string mode Mode we are requesting for |
|
| 303 | + * @var array return_ary Array we are sending back |
|
| 304 | + * @since 1.2.0 |
|
| 305 | + */ |
|
| 306 | 306 | $vars = array('mode', 'return_ary'); |
| 307 | 307 | extract($phpbb_dispatcher->trigger_event('phpbbgallery.core.acp.config.get_display_vars', compact($vars))); |
| 308 | 308 | |
@@ -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 | } |
@@ -331,90 +331,90 @@ discard block |
||
| 331 | 331 | 'vars' => array( |
| 332 | 332 | '' => array(), |
| 333 | 333 | 'GALLERY_CONFIG' => array( |
| 334 | - 'items_per_page' => array('lang' => 'ITEMS_PER_PAGE', 'validate' => 'int', 'type' => 'text:7:3', 'explain' => true), |
|
| 335 | - 'allow_comments' => array('lang' => 'COMMENT_SYSTEM', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 336 | - 'comment_user_control' => array('lang' => 'COMMENT_USER_CONTROL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 337 | - 'comment_length' => array('lang' => 'COMMENT_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'), |
|
| 338 | - 'allow_rates' => array('lang' => 'RATE_SYSTEM', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 339 | - 'max_rating' => array('lang' => 'RATE_SCALE', 'validate' => 'int', 'type' => 'text:7:2'), |
|
| 340 | - 'allow_hotlinking' => array('lang' => 'HOTLINK_PREVENT', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 341 | - 'hotlinking_domains' => array('lang' => 'HOTLINK_ALLOWED', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), |
|
| 334 | + 'items_per_page' => array('lang' => 'ITEMS_PER_PAGE', 'validate' => 'int', 'type' => 'text:7:3', 'explain' => true), |
|
| 335 | + 'allow_comments' => array('lang' => 'COMMENT_SYSTEM', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 336 | + 'comment_user_control' => array('lang' => 'COMMENT_USER_CONTROL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 337 | + 'comment_length' => array('lang' => 'COMMENT_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'), |
|
| 338 | + 'allow_rates' => array('lang' => 'RATE_SYSTEM', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 339 | + 'max_rating' => array('lang' => 'RATE_SCALE', 'validate' => 'int', 'type' => 'text:7:2'), |
|
| 340 | + 'allow_hotlinking' => array('lang' => 'HOTLINK_PREVENT', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 341 | + 'hotlinking_domains' => array('lang' => 'HOTLINK_ALLOWED', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), |
|
| 342 | 342 | ), |
| 343 | 343 | |
| 344 | 344 | 'ALBUM_SETTINGS' => array( |
| 345 | - 'album_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 346 | - 'default_sort_key' => array('lang' => 'DEFAULT_SORT_METHOD', 'validate' => 'string', 'type' => 'custom', 'method' => 'sort_method_select'), |
|
| 347 | - 'default_sort_dir' => array('lang' => 'DEFAULT_SORT_ORDER', 'validate' => 'string', 'type' => 'custom', 'method' => 'sort_order_select'), |
|
| 348 | - 'album_images' => array('lang' => 'MAX_IMAGES_PER_ALBUM', 'validate' => 'int', 'type' => 'text:7:7', 'explain' => true), |
|
| 349 | - 'mini_thumbnail_disp' => array('lang' => 'DISP_FAKE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 350 | - 'mini_thumbnail_size' => array('lang' => 'FAKE_THUMB_SIZE', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 345 | + 'album_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 346 | + 'default_sort_key' => array('lang' => 'DEFAULT_SORT_METHOD', 'validate' => 'string', 'type' => 'custom', 'method' => 'sort_method_select'), |
|
| 347 | + 'default_sort_dir' => array('lang' => 'DEFAULT_SORT_ORDER', 'validate' => 'string', 'type' => 'custom', 'method' => 'sort_order_select'), |
|
| 348 | + 'album_images' => array('lang' => 'MAX_IMAGES_PER_ALBUM', 'validate' => 'int', 'type' => 'text:7:7', 'explain' => true), |
|
| 349 | + 'mini_thumbnail_disp' => array('lang' => 'DISP_FAKE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 350 | + 'mini_thumbnail_size' => array('lang' => 'FAKE_THUMB_SIZE', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 351 | 351 | ), |
| 352 | 352 | |
| 353 | 353 | 'SEARCH_SETTINGS' => array( |
| 354 | - 'search_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 354 | + 'search_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 355 | 355 | ), |
| 356 | 356 | |
| 357 | 357 | 'IMAGE_SETTINGS' => array( |
| 358 | - 'num_uploads' => array('lang' => 'UPLOAD_IMAGES', 'validate' => 'int', 'type' => 'text:7:2'), |
|
| 359 | - 'max_filesize' => array('lang' => 'MAX_FILE_SIZE', 'validate' => 'int', 'type' => 'text:12:9', 'append' => 'BYTES'), |
|
| 360 | - 'max_width' => array('lang' => 'MAX_WIDTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'PIXELS'), |
|
| 361 | - 'max_height' => array('lang' => 'MAX_HEIGHT', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'PIXELS'), |
|
| 362 | - 'allow_resize' => array('lang' => 'RESIZE_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 363 | - 'allow_rotate' => array('lang' => 'ROTATE_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 364 | - 'jpg_quality' => array('lang' => 'JPG_QUALITY', 'validate' => 'int', 'type' => 'text:7:5', 'explain' => true), |
|
| 358 | + 'num_uploads' => array('lang' => 'UPLOAD_IMAGES', 'validate' => 'int', 'type' => 'text:7:2'), |
|
| 359 | + 'max_filesize' => array('lang' => 'MAX_FILE_SIZE', 'validate' => 'int', 'type' => 'text:12:9', 'append' => 'BYTES'), |
|
| 360 | + 'max_width' => array('lang' => 'MAX_WIDTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'PIXELS'), |
|
| 361 | + 'max_height' => array('lang' => 'MAX_HEIGHT', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'PIXELS'), |
|
| 362 | + 'allow_resize' => array('lang' => 'RESIZE_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 363 | + 'allow_rotate' => array('lang' => 'ROTATE_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 364 | + 'jpg_quality' => array('lang' => 'JPG_QUALITY', 'validate' => 'int', 'type' => 'text:7:5', 'explain' => true), |
|
| 365 | 365 | //'medium_cache' => array('lang' => 'MEDIUM_CACHE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
| 366 | - 'medium_width' => array('lang' => 'RSZ_WIDTH', 'validate' => 'int', 'type' => 'text:7:4', 'append' => 'PIXELS'), |
|
| 367 | - 'medium_height' => array('lang' => 'RSZ_HEIGHT', 'validate' => 'int', 'type' => 'text:7:4', 'append' => 'PIXELS'), |
|
| 368 | - 'allow_gif' => array('lang' => 'GIF_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 369 | - 'allow_jpg' => array('lang' => 'JPG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 370 | - 'allow_png' => array('lang' => 'PNG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 371 | - 'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 372 | - 'allow_zip' => array('lang' => 'ZIP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 373 | - 'description_length' => array('lang' => 'IMAGE_DESC_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'), |
|
| 374 | - 'disp_nextprev_thumbnail' => array('lang' => 'DISP_NEXTPREV_THUMB','validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 375 | - 'disp_image_url' => array('lang' => 'VIEW_IMAGE_URL', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 366 | + 'medium_width' => array('lang' => 'RSZ_WIDTH', 'validate' => 'int', 'type' => 'text:7:4', 'append' => 'PIXELS'), |
|
| 367 | + 'medium_height' => array('lang' => 'RSZ_HEIGHT', 'validate' => 'int', 'type' => 'text:7:4', 'append' => 'PIXELS'), |
|
| 368 | + 'allow_gif' => array('lang' => 'GIF_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 369 | + 'allow_jpg' => array('lang' => 'JPG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 370 | + 'allow_png' => array('lang' => 'PNG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 371 | + 'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 372 | + 'allow_zip' => array('lang' => 'ZIP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 373 | + 'description_length' => array('lang' => 'IMAGE_DESC_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'), |
|
| 374 | + 'disp_nextprev_thumbnail' => array('lang' => 'DISP_NEXTPREV_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 375 | + 'disp_image_url' => array('lang' => 'VIEW_IMAGE_URL', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 376 | 376 | ), |
| 377 | 377 | |
| 378 | 378 | 'THUMBNAIL_SETTINGS' => array( |
| 379 | 379 | //'thumbnail_cache' => array('lang' => 'THUMBNAIL_CACHE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
| 380 | - 'gdlib_version' => array('lang' => 'GD_VERSION', 'validate' => 'int', 'type' => 'custom', 'method' => 'gd_radio'), |
|
| 381 | - 'thumbnail_width' => array('lang' => 'THUMBNAIL_WIDTH', 'validate' => 'int', 'type' => 'text:7:3', 'append' => 'PIXELS'), |
|
| 382 | - 'thumbnail_height' => array('lang' => 'THUMBNAIL_HEIGHT', 'validate' => 'int', 'type' => 'text:7:3', 'append' => 'PIXELS'), |
|
| 383 | - 'thumbnail_quality' => array('lang' => 'THUMBNAIL_QUALITY', 'validate' => 'int', 'type' => 'text:7:3', 'explain' => true, 'append' => 'PERCENT'), |
|
| 380 | + 'gdlib_version' => array('lang' => 'GD_VERSION', 'validate' => 'int', 'type' => 'custom', 'method' => 'gd_radio'), |
|
| 381 | + 'thumbnail_width' => array('lang' => 'THUMBNAIL_WIDTH', 'validate' => 'int', 'type' => 'text:7:3', 'append' => 'PIXELS'), |
|
| 382 | + 'thumbnail_height' => array('lang' => 'THUMBNAIL_HEIGHT', 'validate' => 'int', 'type' => 'text:7:3', 'append' => 'PIXELS'), |
|
| 383 | + 'thumbnail_quality' => array('lang' => 'THUMBNAIL_QUALITY', 'validate' => 'int', 'type' => 'text:7:3', 'explain' => true, 'append' => 'PERCENT'), |
|
| 384 | 384 | //'thumbnail_infoline' => array('lang' => 'INFO_LINE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
| 385 | 385 | ), |
| 386 | 386 | |
| 387 | 387 | 'WATERMARK_OPTIONS' => array( |
| 388 | - 'watermark_enabled' => array('lang' => 'WATERMARK_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 389 | - 'watermark_source' => array('lang' => 'WATERMARK_SOURCE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'watermark_source'), |
|
| 390 | - 'watermark_height' => array('lang' => 'WATERMARK_HEIGHT', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 391 | - 'watermark_width' => array('lang' => 'WATERMARK_WIDTH', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 392 | - 'watermark_position' => array('lang' => 'WATERMARK_POSITION', 'validate' => '', 'type' => 'custom', 'method' => 'watermark_position'), |
|
| 388 | + 'watermark_enabled' => array('lang' => 'WATERMARK_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 389 | + 'watermark_source' => array('lang' => 'WATERMARK_SOURCE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'watermark_source'), |
|
| 390 | + 'watermark_height' => array('lang' => 'WATERMARK_HEIGHT', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 391 | + 'watermark_width' => array('lang' => 'WATERMARK_WIDTH', 'validate' => 'int', 'type' => 'text:7:4', 'explain' => true, 'append' => 'PIXELS'), |
|
| 392 | + 'watermark_position' => array('lang' => 'WATERMARK_POSITION', 'validate' => '', 'type' => 'custom', 'method' => 'watermark_position'), |
|
| 393 | 393 | ), |
| 394 | 394 | |
| 395 | 395 | 'UC_LINK_CONFIG' => array( |
| 396 | - 'link_thumbnail' => array('lang' => 'UC_THUMBNAIL', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'uc_select'), |
|
| 397 | - 'link_imagepage' => array('lang' => 'UC_IMAGEPAGE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'uc_select'), |
|
| 398 | - 'link_image_name' => array('lang' => 'UC_IMAGE_NAME', 'validate' => 'string', 'type' => 'custom', 'method' => 'uc_select'), |
|
| 399 | - 'link_image_icon' => array('lang' => 'UC_IMAGE_ICON', 'validate' => 'string', 'type' => 'custom', 'method' => 'uc_select'), |
|
| 396 | + 'link_thumbnail' => array('lang' => 'UC_THUMBNAIL', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'uc_select'), |
|
| 397 | + 'link_imagepage' => array('lang' => 'UC_IMAGEPAGE', 'validate' => 'string', 'type' => 'custom', 'explain' => true, 'method' => 'uc_select'), |
|
| 398 | + 'link_image_name' => array('lang' => 'UC_IMAGE_NAME', 'validate' => 'string', 'type' => 'custom', 'method' => 'uc_select'), |
|
| 399 | + 'link_image_icon' => array('lang' => 'UC_IMAGE_ICON', 'validate' => 'string', 'type' => 'custom', 'method' => 'uc_select'), |
|
| 400 | 400 | ), |
| 401 | 401 | |
| 402 | 402 | 'RRC_GINDEX' => array( |
| 403 | - 'rrc_gindex_mode' => array('lang' => 'RRC_GINDEX_MODE', 'validate' => 'int', 'type' => 'custom', 'explain' => true, 'method' => 'rrc_modes'), |
|
| 404 | - 'rrc_gindex_comments' => array('lang' => 'RRC_GINDEX_COMMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 403 | + 'rrc_gindex_mode' => array('lang' => 'RRC_GINDEX_MODE', 'validate' => 'int', 'type' => 'custom', 'explain' => true, 'method' => 'rrc_modes'), |
|
| 404 | + 'rrc_gindex_comments' => array('lang' => 'RRC_GINDEX_COMMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 405 | 405 | //'rrc_gindex_contests' => array('lang' => 'RRC_GINDEX_CONTESTS', 'validate' => 'int', 'type' => 'text:7:3'), |
| 406 | - 'rrc_gindex_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => '', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 407 | - 'rrc_gindex_pegas' => array('lang' => 'RRC_GINDEX_PGALLERIES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 406 | + 'rrc_gindex_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => '', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 407 | + 'rrc_gindex_pegas' => array('lang' => 'RRC_GINDEX_PGALLERIES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 408 | 408 | ), |
| 409 | 409 | |
| 410 | 410 | 'PHPBB_INTEGRATION' => array( |
| 411 | - 'disp_gallery_icon' => array('lang' => 'DISP_GALLERY_ICON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 412 | - 'disp_total_images' => array('lang' => 'DISP_TOTAL_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 413 | - 'profile_user_images' => array('lang' => 'DISP_USER_IMAGES_PROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 414 | - 'profile_pega' => array('lang' => 'DISP_PERSONAL_ALBUM_PROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 415 | - 'rrc_profile_mode' => array('lang' => 'RRC_PROFILE_MODE', 'validate' => 'int', 'type' => 'custom', 'explain' => true, 'method' => 'rrc_modes'), |
|
| 416 | - 'rrc_profile_items' => array('lang' => 'RRC_PROFILE_ITEMS', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 417 | - 'rrc_profile_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 411 | + 'disp_gallery_icon' => array('lang' => 'DISP_GALLERY_ICON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 412 | + 'disp_total_images' => array('lang' => 'DISP_TOTAL_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 413 | + 'profile_user_images' => array('lang' => 'DISP_USER_IMAGES_PROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 414 | + 'profile_pega' => array('lang' => 'DISP_PERSONAL_ALBUM_PROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 415 | + 'rrc_profile_mode' => array('lang' => 'RRC_PROFILE_MODE', 'validate' => 'int', 'type' => 'custom', 'explain' => true, 'method' => 'rrc_modes'), |
|
| 416 | + 'rrc_profile_items' => array('lang' => 'RRC_PROFILE_ITEMS', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 417 | + 'rrc_profile_display' => array('lang' => 'RRC_DISPLAY_OPTIONS', 'validate' => 'int', 'type' => 'custom', 'method' => 'rrc_display'), |
|
| 418 | 418 | //'rrc_profile_pegas' => array('lang' => 'RRC_GINDEX_PGALLERIES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
| 419 | 419 | //'viewtopic_icon' => array('lang' => 'DISP_VIEWTOPIC_ICON', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
| 420 | 420 | //'viewtopic_images' => array('lang' => 'DISP_VIEWTOPIC_IMAGES', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
@@ -422,15 +422,15 @@ discard block |
||
| 422 | 422 | ), |
| 423 | 423 | |
| 424 | 424 | 'INDEX_SETTINGS' => array( |
| 425 | - 'pegas_index_album' => array('lang' => 'PERSONAL_ALBUM_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 425 | + 'pegas_index_album' => array('lang' => 'PERSONAL_ALBUM_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 426 | 426 | //'pegas_index_random' => array('lang' => 'RANDOM_ON_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
| 427 | - 'pegas_index_rnd_count' => array('lang' => 'RANDOM_ON_INDEX_COUNT', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 427 | + 'pegas_index_rnd_count' => array('lang' => 'RANDOM_ON_INDEX_COUNT', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 428 | 428 | //'pegas_index_recent' => array('lang' => 'RECENT_ON_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
| 429 | - 'pegas_index_rct_count' => array('lang' => 'RECENT_ON_INDEX_COUNT', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 430 | - 'disp_login' => array('lang' => 'DISP_LOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 431 | - 'disp_whoisonline' => array('lang' => 'DISP_WHOISONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 432 | - 'disp_birthdays' => array('lang' => 'DISP_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 433 | - 'disp_statistic' => array('lang' => 'DISP_STATISTIC', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 429 | + 'pegas_index_rct_count' => array('lang' => 'RECENT_ON_INDEX_COUNT', 'validate' => 'int', 'type' => 'text:7:3'), |
|
| 430 | + 'disp_login' => array('lang' => 'DISP_LOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
| 431 | + 'disp_whoisonline' => array('lang' => 'DISP_WHOISONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 432 | + 'disp_birthdays' => array('lang' => 'DISP_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 433 | + 'disp_statistic' => array('lang' => 'DISP_STATISTIC', 'validate' => 'bool', 'type' => 'radio:yes_no'), |
|
| 434 | 434 | ), |
| 435 | 435 | ), |
| 436 | 436 | ), |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | global $phpbb_container; |
| 574 | 574 | $this->language = $phpbb_container->get('language'); |
| 575 | 575 | |
| 576 | - $sort_order_options = '';//phpbb_gallery_plugins::uc_select($value, $key); |
|
| 576 | + $sort_order_options = ''; //phpbb_gallery_plugins::uc_select($value, $key); |
|
| 577 | 577 | |
| 578 | 578 | if ($key != 'link_imagepage') |
| 579 | 579 | { |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | $sort_order_options .= '<option' . (($value == 'none') ? ' selected="selected"' : '') . " value='none'>" . $this->language->lang('UC_LINK_NONE') . '</option>'; |
| 588 | 588 | |
| 589 | 589 | return "<select name='config[$key]' id='$key'>$sort_order_options</select>" |
| 590 | - . (($key == 'link_thumbnail') ? '<br /><input class="checkbox" type="checkbox" name="update_bbcode" id="update_bbcode" value="update_bbcode" /><label for="update_bbcode">' . $this->language->lang('UPDATE_BBCODE') . '</label>' : ''); |
|
| 590 | + . (($key == 'link_thumbnail') ? '<br /><input class="checkbox" type="checkbox" name="update_bbcode" id="update_bbcode" value="update_bbcode" /><label for="update_bbcode">' . $this->language->lang('UPDATE_BBCODE') . '</label>' : ''); |
|
| 591 | 591 | } |
| 592 | 592 | |
| 593 | 593 | /** |
@@ -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 | { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'misc' => array('a_list', 'i_count', 'i_unlimited', 'a_count', 'a_unlimited', 'a_restrict'), |
| 71 | 71 | ); |
| 72 | 72 | $permissions->p_masks[$gallery_auth::OWN_ALBUM] = array_merge($permissions->cats[$gallery_auth::OWN_ALBUM]['i'], $permissions->cats[$gallery_auth::OWN_ALBUM]['c'], $permissions->cats[$gallery_auth::OWN_ALBUM]['m'], $permissions->cats[$gallery_auth::OWN_ALBUM]['misc']); |
| 73 | - $permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array();// Note: we set i_view to 1 as default, so it's not needed on anti array('i_view'); |
|
| 73 | + $permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array(); // Note: we set i_view to 1 as default, so it's not needed on anti array('i_view'); |
|
| 74 | 74 | |
| 75 | 75 | // Permissions for personal albums of other users |
| 76 | 76 | // Note: Do !NOT! hide the i_upload. It's used for the moving-permissions |
@@ -1244,7 +1244,7 @@ discard block |
||
| 1244 | 1244 | { |
| 1245 | 1245 | global $user, $phpbb_container; |
| 1246 | 1246 | |
| 1247 | - $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
|
| 1247 | + $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
|
| 1248 | 1248 | |
| 1249 | 1249 | $disabled = false; |
| 1250 | 1250 | // We submit a "wrong" array on the check (to make it more easy) so we convert it here |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | $action = $request->variable('action', ''); |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | - * All our beautiful permissions |
|
| 55 | - */ |
|
| 54 | + * All our beautiful permissions |
|
| 55 | + */ |
|
| 56 | 56 | if (!isset($permissions)) |
| 57 | 57 | { |
| 58 | 58 | $permissions = new \stdClass(); |
@@ -703,12 +703,12 @@ discard block |
||
| 703 | 703 | $coal = $gallery_cache->get('albums'); |
| 704 | 704 | |
| 705 | 705 | /** |
| 706 | - * Grab the permissions |
|
| 707 | - * |
|
| 708 | - * includes/acp/acp_permissions.php says: |
|
| 709 | - * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
| 710 | - * // currently does not support the amount of dimensions required. ;) |
|
| 711 | - */ |
|
| 706 | + * Grab the permissions |
|
| 707 | + * |
|
| 708 | + * includes/acp/acp_permissions.php says: |
|
| 709 | + * // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() |
|
| 710 | + * // currently does not support the amount of dimensions required. ;) |
|
| 711 | + */ |
|
| 712 | 712 | // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0)))); |
| 713 | 713 | $requests = $request->variable('setting', array(0 => array(0 => array('' => 0)))); |
| 714 | 714 | $p_mask_count = 0; |
@@ -762,8 +762,8 @@ discard block |
||
| 762 | 762 | } |
| 763 | 763 | } |
| 764 | 764 | /** |
| 765 | - * Inherit the permissions |
|
| 766 | - */ |
|
| 765 | + * Inherit the permissions |
|
| 766 | + */ |
|
| 767 | 767 | $inherit = $request->variable('setting', array(0 => array('' => 0))); |
| 768 | 768 | foreach ($inherit as $c_mask => $v_sets) |
| 769 | 769 | { |
@@ -993,8 +993,8 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | |
| 995 | 995 | /** |
| 996 | - * Handles copying permissions from one album to others |
|
| 997 | - */ |
|
| 996 | + * Handles copying permissions from one album to others |
|
| 997 | + */ |
|
| 998 | 998 | private function copy_album_permissions() |
| 999 | 999 | { |
| 1000 | 1000 | global $cache, $db, $template, $user, $table_prefix, $phpbb_dispatcher, $table_name, $users_table, $phpbb_container; |
@@ -110,8 +110,7 @@ discard block |
||
| 110 | 110 | if (!$submit) |
| 111 | 111 | { |
| 112 | 112 | $this->permissions_v_mask(); |
| 113 | - } |
|
| 114 | - else |
|
| 113 | + } else |
|
| 115 | 114 | { |
| 116 | 115 | $this->permissions_p_mask(); |
| 117 | 116 | } |
@@ -449,13 +448,11 @@ discard block |
||
| 449 | 448 | if (!sizeof($group_id) && !sizeof($user_id)) |
| 450 | 449 | { |
| 451 | 450 | trigger_error('NO_VICTIM_SELECTED', E_USER_WARNING); |
| 452 | - } |
|
| 453 | - else if (sizeof($group_id)) |
|
| 451 | + } else if (sizeof($group_id)) |
|
| 454 | 452 | { |
| 455 | 453 | $victim_mode = 'group'; |
| 456 | 454 | $victim_id = $group_id; |
| 457 | - } |
|
| 458 | - else |
|
| 455 | + } else |
|
| 459 | 456 | { |
| 460 | 457 | $victim_mode = 'user'; |
| 461 | 458 | $victim_id = $user_id; |
@@ -487,8 +484,7 @@ discard block |
||
| 487 | 484 | $victim_list[$row['group_id']] = $victim_row; |
| 488 | 485 | } |
| 489 | 486 | $db->sql_freeresult($result); |
| 490 | - } |
|
| 491 | - else |
|
| 487 | + } else |
|
| 492 | 488 | { |
| 493 | 489 | // Get the user information |
| 494 | 490 | $sql = 'SELECT username, user_id, user_colour |
@@ -571,12 +567,10 @@ discard block |
||
| 571 | 567 | if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_YES)) |
| 572 | 568 | { |
| 573 | 569 | $acl_s_yes++; |
| 574 | - } |
|
| 575 | - else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NEVER)) |
|
| 570 | + } else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NEVER)) |
|
| 576 | 571 | { |
| 577 | 572 | $acl_s_never++; |
| 578 | - } |
|
| 579 | - else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) |
|
| 573 | + } else if (isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) |
|
| 580 | 574 | { |
| 581 | 575 | $acl_s_no++; |
| 582 | 576 | } |
@@ -607,8 +601,7 @@ discard block |
||
| 607 | 601 | } |
| 608 | 602 | } |
| 609 | 603 | } |
| 610 | - } |
|
| 611 | - else |
|
| 604 | + } else |
|
| 612 | 605 | { |
| 613 | 606 | $template->assign_block_vars('c_mask', array( |
| 614 | 607 | 'C_MASK_ID' => $p_system, |
@@ -686,13 +679,11 @@ discard block |
||
| 686 | 679 | if (!sizeof($group_id) && !sizeof($user_id)) |
| 687 | 680 | { |
| 688 | 681 | trigger_error('NO_VICTIM_SELECTED', E_USER_WARNING); |
| 689 | - } |
|
| 690 | - else if (sizeof($group_id)) |
|
| 682 | + } else if (sizeof($group_id)) |
|
| 691 | 683 | { |
| 692 | 684 | $victim_mode = 'group'; |
| 693 | 685 | $victim_id = $group_id; |
| 694 | - } |
|
| 695 | - else |
|
| 686 | + } else |
|
| 696 | 687 | { |
| 697 | 688 | $victim_mode = 'user'; |
| 698 | 689 | $victim_id = $user_id; |
@@ -741,8 +732,7 @@ discard block |
||
| 741 | 732 | if (substr($p_mask, -6, 6) == '_count') |
| 742 | 733 | { |
| 743 | 734 | $auth_settings[$c_mask][$v_mask][$p_mask] = $value; |
| 744 | - } |
|
| 745 | - else |
|
| 735 | + } else |
|
| 746 | 736 | { |
| 747 | 737 | $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); |
| 748 | 738 | // Do we have moderators? |
@@ -792,15 +782,13 @@ discard block |
||
| 792 | 782 | } |
| 793 | 783 | // We take all permissions of another c_mask, so: |
| 794 | 784 | break; |
| 795 | - } |
|
| 796 | - else |
|
| 785 | + } else |
|
| 797 | 786 | { |
| 798 | 787 | // The chosen option was disabled: Hacking attempt?! |
| 799 | 788 | trigger_error('HACKING_ATTEMPT', E_USER_WARNING); |
| 800 | 789 | } |
| 801 | 790 | } |
| 802 | - } |
|
| 803 | - else if ($i_mask) |
|
| 791 | + } else if ($i_mask) |
|
| 804 | 792 | { |
| 805 | 793 | // Inherit permissions of one [c_mask][v_mask] |
| 806 | 794 | $v_mask = (int) $v_mask; |
@@ -821,8 +809,7 @@ discard block |
||
| 821 | 809 | } |
| 822 | 810 | $auth_settings[$c_mask][$v_mask] = $auth_settings[$ci_mask][$vi_mask]; |
| 823 | 811 | $p_mask_storage[$auth_settings[$c_mask][$v_mask]]['usage'][] = array('c_mask' => $c_mask, 'v_mask' => $v_mask); |
| 824 | - } |
|
| 825 | - else |
|
| 812 | + } else |
|
| 826 | 813 | { |
| 827 | 814 | // The chosen option was disabled: Hacking attempt?! |
| 828 | 815 | trigger_error('HACKING_ATTEMPT', E_USER_WARNING); |
@@ -895,8 +882,7 @@ discard block |
||
| 895 | 882 | $victim_names[$row['group_id']] = $row['group_name']; |
| 896 | 883 | } |
| 897 | 884 | $db->sql_freeresult($result); |
| 898 | - } |
|
| 899 | - else |
|
| 885 | + } else |
|
| 900 | 886 | { |
| 901 | 887 | // Get username's for the GALLERY_MODSCACHE_TABLE |
| 902 | 888 | $sql = 'SELECT user_id, username |
@@ -962,8 +948,7 @@ discard block |
||
| 962 | 948 | 'group_id' => $usage['v_mask'], |
| 963 | 949 | 'group_name' => $victim_names[$usage['v_mask']], |
| 964 | 950 | ); |
| 965 | - } |
|
| 966 | - else |
|
| 951 | + } else |
|
| 967 | 952 | { |
| 968 | 953 | $sql_moderators[] = array( |
| 969 | 954 | 'album_id' => $usage['c_mask'], |
@@ -972,8 +957,7 @@ discard block |
||
| 972 | 957 | ); |
| 973 | 958 | } |
| 974 | 959 | } |
| 975 | - } |
|
| 976 | - else |
|
| 960 | + } else |
|
| 977 | 961 | { |
| 978 | 962 | $sql_permissions[] = array( |
| 979 | 963 | 'perm_role_id' => $role_id, |
@@ -1097,8 +1081,7 @@ discard block |
||
| 1097 | 1081 | $phpbb_ext_gallery_core_auth->set_user_permissions('all', ''); |
| 1098 | 1082 | |
| 1099 | 1083 | trigger_error($this->language->lang('COPY_PERMISSIONS_SUCCESSFUL') . adm_back_link($this->u_action)); |
| 1100 | - } |
|
| 1101 | - else |
|
| 1084 | + } else |
|
| 1102 | 1085 | { |
| 1103 | 1086 | $s_hidden_fields = array( |
| 1104 | 1087 | 'submit' => $submit, |