@@ -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']); |
@@ -235,11 +235,11 @@ |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | /** |
| 238 | - * Remove albums from watch-list |
|
| 239 | - * |
|
| 240 | - * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
| 241 | - * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 242 | - */ |
|
| 238 | + * Remove albums from watch-list |
|
| 239 | + * |
|
| 240 | + * @param mixed $album_ids Array or integer with album_id where we delete from the watch-list. |
|
| 241 | + * @param mixed $user_ids If not set, it uses the currents user_id |
|
| 242 | + */ |
|
| 243 | 243 | public function remove_albums($album_ids, $user_ids = false) |
| 244 | 244 | { |
| 245 | 245 | $album_ids = $this->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 | } |