| @@ -2,13 +2,13 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Taskbuilder |
| 4 | 4 | * Plugin URI: https://wordpress.org/plugins/taskbuilder/ |
| 5 | 5 | * Description: Wordpress Project & Task Management plugin. Easy to keep track of projects & tasks! |
| 6 | - * Version: 1.0.2 | |
| 6 | + * Version: 3.0.0 | |
| 7 | 7 | * Author: Taskbuilder Team |
| 8 | 8 | * Author URI: https://taskbuilder.net/ |
| 9 | 9 | * Requires at least: 4.4 |
| 10 | - * Tested up to: 5.9.1 | |
| 10 | + * Tested up to: 6.5.2 | |
| 11 | 11 | * Text Domain: taskbuilder |
| 12 | 12 | * Domain Path: /lang |
| 13 | 13 | */ |
| 14 | 14 | |
| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | |
| 19 | 19 | if ( ! class_exists( 'WP_Taskbuilder' ) ) : |
| 20 | 20 | |
| 21 | 21 | final class WP_Taskbuilder { |
| 22 | - public $version = '1.0.2'; | |
| 22 | + public $version = '3.0.0'; | |
| 23 | 23 | public function __construct() { |
| 24 | 24 | // define global constants |
| 25 | 25 | $this->define_constants(); |
| 26 | 26 | // Include required files and classes |
| @@ -59,9 +59,9 @@ | ||
| 59 | 59 | if( !class_exists( 'EDD_SL_Plugin_Updater' ) ) { |
| 60 | 60 | include_once( WPPM_ABSPATH . 'includes/EDD_SL_Plugin_Updater.php' ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - } | |
| 63 | + } | |
| 64 | 64 | |
| 65 | 65 | public function define($name, $value) { |
| 66 | 66 | if (!defined($name)) { |
| 67 | 67 | define($name, $value); |
| @@ -85,8 +85,18 @@ | ||
| 85 | 85 | $task_id = intval(sanitize_text_field($_REQUEST['tid'])); |
| 86 | 86 | $task_auth_code = $wppmfunction->get_task_fields($task_id,'task_auth_code'); |
| 87 | 87 | $task_auth_code = sanitize_text_field($task_auth_code); |
| 88 | 88 | if($task_auth_code == $auth_code){ |
| 89 | + $this->wppm_file_download($attach_id); | |
| 90 | + } | |
| 91 | + } | |
| 92 | + if( isset($_REQUEST['wppm_attachment']) && isset($_REQUEST['pid']) && isset($_REQUEST['pac'])){ | |
| 93 | + $attach_id = intval(sanitize_text_field($_REQUEST['wppm_attachment'])); | |
| 94 | + $auth_code = (sanitize_text_field($_REQUEST['pac'])); | |
| 95 | + $proj_id = intval(sanitize_text_field($_REQUEST['pid'])); | |
| 96 | + $proj_auth_code = $wppmfunction->get_project_meta($proj_id,'project_auth_code',true); | |
| 97 | + $proj_auth_code = sanitize_text_field($proj_auth_code); | |
| 98 | + if($proj_auth_code == $auth_code){ | |
| 89 | 99 | $this->wppm_file_download($attach_id); |
| 90 | 100 | } |
| 91 | 101 | } |
| 92 | 102 | } |