PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.7
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.7
6.0.7 6.0.6 6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 59 releases
← All changes | includes/admin/projects/open_project/wppm_edit_project_status.php +4 -4 5.0.0 → 6.0.7 View file →
@@ -2,9 +2,9 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 exit; // Exit if accessed directly
4 4 }
5 5 global $wpdb,$wppmfunction,$current_user;
6 -$project_id = isset($_POST['id']) ? sanitize_text_field($_POST['id']) : '' ;
6 +$project_id = isset($_POST['id']) ? intval(sanitize_text_field(wp_unslash($_POST['id']))) : '' ;
7 7 $project_data = $wppmfunction->get_project($project_id);
8 8 $wppm_current_user_capability = get_user_meta( $current_user->ID, 'wppm_capability', true );
9 9 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('change_project_status',$project_id) || ($project_data['created_by']==$current_user->ID && $wppm_current_user_capability=='wppm_manager') || $wppm_current_user_capability=='wppm_admin')) {exit;}
10 10 $statuses = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wppm_project_statuses");
@@ -27,9 +27,9 @@
27 27 </div>
28 28 <?php do_action('wppm_after_edit_change_project_status',$project_id);?>
29 29 <input type="hidden" name="action" value="wppm_set_change_project_status" />
30 30 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_change_project_status' ) ); ?>">
31 - <input type="hidden" id="wppm_project_id" name="project_id" value="<?php echo htmlentities(esc_attr($project_id)); ?>" />
31 + <input type="hidden" id="wppm_project_id" name="project_id" value="<?php echo (esc_attr($project_id)); ?>" />
32 32
33 33
34 34 </form>
35 35 <?php
@@ -37,9 +37,9 @@
37 37
38 38 ob_start();
39 39 ?>
40 40 <button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button>
41 -<button type="button" class="btn wppm_popup_action" onclick="wppm_set_change_project_status(<?php echo htmlentities(esc_attr($project_id))?>);"><?php echo esc_html_e('Save','taskbuilder');?></button>
41 +<button type="button" class="btn wppm_popup_action" onclick="wppm_set_change_project_status(<?php echo esc_js($project_id)?>);"><?php echo esc_html_e('Save','taskbuilder');?></button>
42 42 <?php
43 43 $footer = ob_get_clean();
44 44
45 45 $output = array(
@@ -46,5 +46,5 @@
46 46 'body' => $body,
47 47 'footer' => $footer
48 48 );
49 49
50 -echo json_encode($output);
50 +echo wp_json_encode($output);