| @@ -128,9 +128,9 @@ | ||
| 128 | 128 | 'remind_at' => 'sanitize_text_field', |
| 129 | 129 | 'scope' => 'sanitize_text_field', |
| 130 | 130 | 'source' => 'sanitize_text_field', |
| 131 | 131 | 'source_id' => 'sanitize_text_field', |
| 132 | - 'description' => 'wp_kses_post', | |
| 132 | + 'description' => 'fluent_boards_sanitize_description', | |
| 133 | 133 | 'due_date' => 'sanitize_text_field', |
| 134 | 134 | 'start_at' => 'sanitize_text_field', |
| 135 | 135 | 'log_minutes' => 'sanitize_text_field', |
| 136 | 136 | 'last_completed' => 'sanitize_text_field', |
| @@ -154,9 +154,9 @@ | ||
| 154 | 154 | 'board_id' => 'intval', |
| 155 | 155 | 'title' => 'sanitize_text_field', |
| 156 | 156 | 'parent_id' => 'intval', |
| 157 | 157 | 'type' => 'sanitize_text_field', |
| 158 | - 'description' => 'wp_kses_post', | |
| 158 | + 'description' => 'fluent_boards_sanitize_description', | |
| 159 | 159 | 'currency' => 'sanitize_text_field', |
| 160 | 160 | 'image_url' => 'sanitize_url', |
| 161 | 161 | 'is_auth_require' => 'intval', |
| 162 | 162 | 'crm_contact_id' => 'intval', |
| @@ -198,8 +198,9 @@ | ||
| 198 | 198 | { |
| 199 | 199 | $fieldMaps = [ |
| 200 | 200 | 'bg_color' => 'sanitize_text_field', |
| 201 | 201 | 'color' => 'sanitize_text_field', |
| 202 | + 'color_preset' => 'sanitize_key', | |
| 202 | 203 | 'label' => 'sanitize_text_field', |
| 203 | 204 | 'boardId' => 'intval', |
| 204 | 205 | 'task_id' => 'intval', |
| 205 | 206 | 'meta_value' => 'intval', |
| @@ -215,9 +216,9 @@ | ||
| 215 | 216 | 'stage' => 'sanitize_text_field', |
| 216 | 217 | 'newPosition' => 'intval', |
| 217 | 218 | 'priority' => 'sanitize_text_field', |
| 218 | 219 | 'type' => 'sanitize_text_field', |
| 219 | - 'description' => 'wp_kses_post', | |
| 220 | + 'description' => 'fluent_boards_sanitize_description', | |
| 220 | 221 | 'group_id' => 'intval', |
| 221 | 222 | 'board_id' => 'intval', |
| 222 | 223 | 'created_by' => 'intval', |
| 223 | 224 | 'due_date' => 'sanitize_text_field', |
| @@ -434,9 +435,10 @@ | ||
| 434 | 435 | |
| 435 | 436 | return $users; |
| 436 | 437 | } |
| 437 | 438 | |
| 438 | - public static function sanitizeUsersArray($users, $boardId = null) | |
| 439 | + // Callers formatting multiple lists may supply a resolved board-manager result. | |
| 440 | + public static function sanitizeUsersArray($users, $boardId = null, $isBoardManager = null) | |
| 439 | 441 | { |
| 440 | 442 | if (current_user_can('list_users')) { |
| 441 | 443 | return $users; |
| 442 | 444 | } |
| @@ -442,9 +444,9 @@ | ||
| 442 | 444 | } |
| 443 | 445 | |
| 444 | 446 | $sanitizedUsers = []; |
| 445 | 447 | |
| 446 | - if(!PermissionManager::isBoardManager($boardId)) //Todo: may create permission security issue, will be modified later | |
| 448 | + if (!($isBoardManager ?? PermissionManager::isBoardManager($boardId))) | |
| 447 | 449 | { |
| 448 | 450 | $currentUser = wp_get_current_user(); |
| 449 | 451 | if($currentUser && isset($currentUser->user_email)){ |
| 450 | 452 | $currentUserEmail = $currentUser->user_email; |
| @@ -596,8 +598,9 @@ | ||
| 596 | 598 | 'repeat_in' => 'intval', |
| 597 | 599 | 'repeat_type' => 'sanitize_text_field', |
| 598 | 600 | 'repeat_when_complete' => 'intval', |
| 599 | 601 | 'selected_month' => 'sanitize_text_field', |
| 602 | + 'selected_stage' => 'intval', | |
| 600 | 603 | 'board_id' => 'intval', |
| 601 | 604 | 'time' => 'sanitize_text_field', |
| 602 | 605 | 'time_zone' => 'sanitize_text_field', |
| 603 | 606 | 'next_repeat_date' => 'sanitize_text_field', |
| @@ -641,9 +644,9 @@ | ||
| 641 | 644 | 'remind_at' => 'sanitize_text_field', |
| 642 | 645 | 'scope' => 'sanitize_text_field', |
| 643 | 646 | 'source' => 'sanitize_text_field', |
| 644 | 647 | 'source_id' => 'sanitize_text_field', |
| 645 | - 'description' => 'wp_kses_post', | |
| 648 | + 'description' => 'fluent_boards_sanitize_description', | |
| 646 | 649 | 'due_date' => 'sanitize_text_field', |
| 647 | 650 | 'start_at' => 'sanitize_text_field', |
| 648 | 651 | 'log_minutes' => 'sanitize_text_field', |
| 649 | 652 | 'last_completed' => 'sanitize_text_field', |
| @@ -703,8 +706,9 @@ | ||
| 703 | 706 | 'deleted' => __('deleted', 'fluent-boards'), |
| 704 | 707 | 'archived' => __('archived', 'fluent-boards'), |
| 705 | 708 | 'restored' => __('restored', 'fluent-boards'), |
| 706 | 709 | 'set' => __('set', 'fluent-boards'), |
| 710 | + 'moved' => __('moved', 'fluent-boards'), | |
| 707 | 711 | ]; |
| 708 | 712 | |
| 709 | 713 | $columnTranslations = [ |
| 710 | 714 | 'task' => __('task', 'fluent-boards'), |
| @@ -724,8 +728,9 @@ | ||
| 724 | 728 | 'the associate email' => __('the associate email', 'fluent-boards'), |
| 725 | 729 | 'attachment' => __('attachment', 'fluent-boards'), |
| 726 | 730 | 'repeat task' => __('repeat task', 'fluent-boards'), |
| 727 | 731 | 'Repeat Task' => __('Repeat Task', 'fluent-boards'), |
| 732 | + 'tasks' => __('tasks', 'fluent-boards'), | |
| 728 | 733 | ]; |
| 729 | 734 | |
| 730 | 735 | foreach ($activities as $activity) { |
| 731 | 736 | $activity->action_key = $activity->action; |