@@ -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, |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_new_report extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.new_report'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_REPORT', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * Get the HTML formatted title of this notification |
|
107 | - * |
|
108 | - * @return string |
|
109 | - */ |
|
106 | + * Get the HTML formatted title of this notification |
|
107 | + * |
|
108 | + * @return string |
|
109 | + */ |
|
110 | 110 | public function get_title() |
111 | 111 | { |
112 | 112 | $users = array($this->get_data('reporter')); |
@@ -116,19 +116,19 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * Get email template |
|
120 | - * |
|
121 | - * @return string|bool |
|
122 | - */ |
|
119 | + * Get email template |
|
120 | + * |
|
121 | + * @return string|bool |
|
122 | + */ |
|
123 | 123 | public function get_email_template() |
124 | 124 | { |
125 | 125 | return false; |
126 | 126 | } |
127 | 127 | /** |
128 | - * Get email template variables |
|
129 | - * |
|
130 | - * @return array |
|
131 | - */ |
|
128 | + * Get email template variables |
|
129 | + * |
|
130 | + * @return array |
|
131 | + */ |
|
132 | 132 | public function get_email_template_variables() |
133 | 133 | { |
134 | 134 | return array(); |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * Function for preparing the data for insertion in an SQL query |
|
159 | - * (The service handles insertion) |
|
160 | - * |
|
161 | - * @param array $data The data for the updated rules |
|
162 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
163 | - * |
|
164 | - * @return array Array of data ready to be inserted into the database |
|
165 | - */ |
|
158 | + * Function for preparing the data for insertion in an SQL query |
|
159 | + * (The service handles insertion) |
|
160 | + * |
|
161 | + * @param array $data The data for the updated rules |
|
162 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
163 | + * |
|
164 | + * @return array Array of data ready to be inserted into the database |
|
165 | + */ |
|
166 | 166 | public function create_insert_array($data, $pre_create_data = array()) |
167 | 167 | { |
168 | 168 | $this->set_data('item_id', $data['item_id']); |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_new_comment extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.new_comment'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_COMMENT', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -156,24 +156,24 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * Users needed to query before this notification can be displayed |
|
160 | - * |
|
161 | - * @return array Array of user_ids |
|
162 | - */ |
|
159 | + * Users needed to query before this notification can be displayed |
|
160 | + * |
|
161 | + * @return array Array of user_ids |
|
162 | + */ |
|
163 | 163 | public function users_to_query() |
164 | 164 | { |
165 | 165 | return array(); |
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * Function for preparing the data for insertion in an SQL query |
|
170 | - * (The service handles insertion) |
|
171 | - * |
|
172 | - * @param array $data The data for the updated rules |
|
173 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
174 | - * |
|
175 | - * @return array Array of data ready to be inserted into the database |
|
176 | - */ |
|
169 | + * Function for preparing the data for insertion in an SQL query |
|
170 | + * (The service handles insertion) |
|
171 | + * |
|
172 | + * @param array $data The data for the updated rules |
|
173 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
174 | + * |
|
175 | + * @return array Array of data ready to be inserted into the database |
|
176 | + */ |
|
177 | 177 | public function create_insert_array($data, $pre_create_data = array()) |
178 | 178 | { |
179 | 179 | $this->set_data('image_id', $data['image_id']); |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_new_image extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.new_image'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_IMAGE', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -93,17 +93,17 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * Get the user's avatar |
|
97 | - */ |
|
96 | + * Get the user's avatar |
|
97 | + */ |
|
98 | 98 | public function get_avatar() |
99 | 99 | { |
100 | 100 | return 0; |
101 | 101 | } |
102 | 102 | /** |
103 | - * Get the HTML formatted title of this notification |
|
104 | - * |
|
105 | - * @return string |
|
106 | - */ |
|
103 | + * Get the HTML formatted title of this notification |
|
104 | + * |
|
105 | + * @return string |
|
106 | + */ |
|
107 | 107 | public function get_title() |
108 | 108 | { |
109 | 109 | return $this->language->lang('NOTIFICATION_PHPBBGALLERY_NEW_IMAGE', $this->get_data('album_name')); |
@@ -121,19 +121,19 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
124 | - * Get email template |
|
125 | - * |
|
126 | - * @return string|bool |
|
127 | - */ |
|
124 | + * Get email template |
|
125 | + * |
|
126 | + * @return string|bool |
|
127 | + */ |
|
128 | 128 | public function get_email_template() |
129 | 129 | { |
130 | 130 | return false; |
131 | 131 | } |
132 | 132 | /** |
133 | - * Get email template variables |
|
134 | - * |
|
135 | - * @return array |
|
136 | - */ |
|
133 | + * Get email template variables |
|
134 | + * |
|
135 | + * @return array |
|
136 | + */ |
|
137 | 137 | public function get_email_template_variables() |
138 | 138 | { |
139 | 139 | return array(); |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * Function for preparing the data for insertion in an SQL query |
|
164 | - * (The service handles insertion) |
|
165 | - * |
|
166 | - * @param array $data The data for the updated rules |
|
167 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
168 | - * |
|
169 | - * @return array Array of data ready to be inserted into the database |
|
170 | - */ |
|
163 | + * Function for preparing the data for insertion in an SQL query |
|
164 | + * (The service handles insertion) |
|
165 | + * |
|
166 | + * @param array $data The data for the updated rules |
|
167 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
168 | + * |
|
169 | + * @return array Array of data ready to be inserted into the database |
|
170 | + */ |
|
171 | 171 | public function create_insert_array($data, $pre_create_data = array()) |
172 | 172 | { |
173 | 173 | $this->set_data('album_name', $data['album_name']); |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_image_for_approval extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.image_for_approval'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_FOR_APPROVE', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -127,19 +127,19 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
130 | - * Get email template |
|
131 | - * |
|
132 | - * @return string|bool |
|
133 | - */ |
|
130 | + * Get email template |
|
131 | + * |
|
132 | + * @return string|bool |
|
133 | + */ |
|
134 | 134 | public function get_email_template() |
135 | 135 | { |
136 | 136 | return false; |
137 | 137 | } |
138 | 138 | /** |
139 | - * Get email template variables |
|
140 | - * |
|
141 | - * @return array |
|
142 | - */ |
|
139 | + * Get email template variables |
|
140 | + * |
|
141 | + * @return array |
|
142 | + */ |
|
143 | 143 | public function get_email_template_variables() |
144 | 144 | { |
145 | 145 | return array(); |
@@ -166,14 +166,14 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * Function for preparing the data for insertion in an SQL query |
|
170 | - * (The service handles insertion) |
|
171 | - * |
|
172 | - * @param array $data The data for the updated rules |
|
173 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
174 | - * |
|
175 | - * @return array Array of data ready to be inserted into the database |
|
176 | - */ |
|
169 | + * Function for preparing the data for insertion in an SQL query |
|
170 | + * (The service handles insertion) |
|
171 | + * |
|
172 | + * @param array $data The data for the updated rules |
|
173 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
174 | + * |
|
175 | + * @return array Array of data ready to be inserted into the database |
|
176 | + */ |
|
177 | 177 | public function create_insert_array($data, $pre_create_data = array()) |
178 | 178 | { |
179 | 179 | $this->set_data('album_name', $data['album_name']); |
@@ -10,20 +10,20 @@ discard block |
||
10 | 10 | class phpbbgallery_image_not_approved extends \phpbb\notification\type\base |
11 | 11 | { |
12 | 12 | /** |
13 | - * Get notification type name |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
13 | + * Get notification type name |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | 17 | public function get_type() |
18 | 18 | { |
19 | 19 | return 'phpbbgallery.core.notification.image_not_approved'; |
20 | 20 | } |
21 | 21 | /** |
22 | - * Notification option data (for outputting to the user) |
|
23 | - * |
|
24 | - * @var bool|array False if the service should use it's default data |
|
25 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
26 | - */ |
|
22 | + * Notification option data (for outputting to the user) |
|
23 | + * |
|
24 | + * @var bool|array False if the service should use it's default data |
|
25 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
26 | + */ |
|
27 | 27 | public static $notification_option = array( |
28 | 28 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_NOT_APPROVED', |
29 | 29 | ); |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
49 | - * |
|
50 | - * @return bool True/False whether or not this is available to the user |
|
51 | - */ |
|
48 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
49 | + * |
|
50 | + * @return bool True/False whether or not this is available to the user |
|
51 | + */ |
|
52 | 52 | public function is_available() |
53 | 53 | { |
54 | 54 | return true; |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * Users needed to query before this notification can be displayed |
|
143 | - * |
|
144 | - * @return array Array of user_ids |
|
145 | - */ |
|
142 | + * Users needed to query before this notification can be displayed |
|
143 | + * |
|
144 | + * @return array Array of user_ids |
|
145 | + */ |
|
146 | 146 | public function users_to_query() |
147 | 147 | { |
148 | 148 | return array(); |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | |
151 | 151 | |
152 | 152 | /** |
153 | - * Function for preparing the data for insertion in an SQL query |
|
154 | - * (The service handles insertion) |
|
155 | - * |
|
156 | - * @param array $data The data for the updated rules |
|
157 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
158 | - * |
|
159 | - * @return array Array of data ready to be inserted into the database |
|
160 | - */ |
|
153 | + * Function for preparing the data for insertion in an SQL query |
|
154 | + * (The service handles insertion) |
|
155 | + * |
|
156 | + * @param array $data The data for the updated rules |
|
157 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
158 | + * |
|
159 | + * @return array Array of data ready to be inserted into the database |
|
160 | + */ |
|
161 | 161 | public function create_insert_array($data, $pre_create_data = array()) |
162 | 162 | { |
163 | 163 | $this->set_data('album_name', $data['album_name']); |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | class phpbbgallery_image_approved extends \phpbb\notification\type\base |
12 | 12 | { |
13 | 13 | /** |
14 | - * Get notification type name |
|
15 | - * |
|
16 | - * @return string |
|
17 | - */ |
|
14 | + * Get notification type name |
|
15 | + * |
|
16 | + * @return string |
|
17 | + */ |
|
18 | 18 | public function get_type() |
19 | 19 | { |
20 | 20 | return 'phpbbgallery.core.notification.image_approved'; |
21 | 21 | } |
22 | 22 | /** |
23 | - * Notification option data (for outputting to the user) |
|
24 | - * |
|
25 | - * @var bool|array False if the service should use it's default data |
|
26 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | - */ |
|
23 | + * Notification option data (for outputting to the user) |
|
24 | + * |
|
25 | + * @var bool|array False if the service should use it's default data |
|
26 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
27 | + */ |
|
28 | 28 | public static $notification_option = array( |
29 | 29 | 'lang' => 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_APPROVED', |
30 | 30 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | - * |
|
51 | - * @return bool True/False whether or not this is available to the user |
|
52 | - */ |
|
49 | + * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options) |
|
50 | + * |
|
51 | + * @return bool True/False whether or not this is available to the user |
|
52 | + */ |
|
53 | 53 | public function is_available() |
54 | 54 | { |
55 | 55 | return true; |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * Users needed to query before this notification can be displayed |
|
144 | - * |
|
145 | - * @return array Array of user_ids |
|
146 | - */ |
|
143 | + * Users needed to query before this notification can be displayed |
|
144 | + * |
|
145 | + * @return array Array of user_ids |
|
146 | + */ |
|
147 | 147 | public function users_to_query() |
148 | 148 | { |
149 | 149 | return array(); |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | |
152 | 152 | |
153 | 153 | /** |
154 | - * Function for preparing the data for insertion in an SQL query |
|
155 | - * (The service handles insertion) |
|
156 | - * |
|
157 | - * @param array $data The data for the updated rules |
|
158 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
159 | - * |
|
160 | - * @return array Array of data ready to be inserted into the database |
|
161 | - */ |
|
154 | + * Function for preparing the data for insertion in an SQL query |
|
155 | + * (The service handles insertion) |
|
156 | + * |
|
157 | + * @param array $data The data for the updated rules |
|
158 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
159 | + * |
|
160 | + * @return array Array of data ready to be inserted into the database |
|
161 | + */ |
|
162 | 162 | public function create_insert_array($data, $pre_create_data = array()) |
163 | 163 | { |
164 | 164 | $this->set_data('album_name', $data['album_name']); |