| @@ -1,19 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Taskbuilder |
| 4 | - * Plugin URI: https://taskbuilder.net/ | |
| 5 | - * Description: All-in-One Project & Task Management Tool for WordPress. | |
| 6 | - * Version: 6.0.2 | |
| 4 | + * Plugin URI: https://wordpress.org/plugins/taskbuilder/ | |
| 5 | + * Description: Wordpress Project & Task Management plugin. Easy to keep track of projects & tasks! | |
| 6 | + * Version: 3.0.8 | |
| 7 | 7 | * Author: Taskbuilder Team |
| 8 | 8 | * Author URI: https://taskbuilder.net/ |
| 9 | - * Requires at least: 5.6 | |
| 10 | - * Requires PHP: 7.4 | |
| 11 | - * Tested up to: 7.1 | |
| 9 | + * Requires at least: 4.4 | |
| 10 | + * Tested up to: 6.7.1 | |
| 12 | 11 | * Text Domain: taskbuilder |
| 13 | 12 | * Domain Path: /lang |
| 14 | - * License: GPLv3 or later | |
| 15 | - * License URI: https://www.gnu.org/licenses/gpl-3.0.html | |
| 16 | 13 | */ |
| 17 | 14 | |
| 18 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | 16 | exit; // Exit if accessed directly |
| @@ -21,9 +18,9 @@ | ||
| 21 | 18 | |
| 22 | 19 | if ( ! class_exists( 'WP_Taskbuilder' ) ) : |
| 23 | 20 | |
| 24 | 21 | final class WP_Taskbuilder { |
| 25 | - public $version = '6.0.2'; | |
| 22 | + public $version = '3.0.8'; | |
| 26 | 23 | public function __construct() { |
| 27 | 24 | // define global constants |
| 28 | 25 | $this->define_constants(); |
| 29 | 26 | // Include required files and classes |
| @@ -59,10 +56,13 @@ | ||
| 59 | 56 | } |
| 60 | 57 | if ($this->is_request('frontend')) { |
| 61 | 58 | include_once( WPPM_ABSPATH . 'includes/class-wppm-frontend.php' ); |
| 62 | 59 | } |
| 60 | + if( !class_exists( 'EDD_SL_Plugin_Updater' ) ) { | |
| 61 | + include_once( WPPM_ABSPATH . 'includes/EDD_SL_Plugin_Updater.php' ); | |
| 62 | + } | |
| 63 | 63 | |
| 64 | - } | |
| 64 | + } | |
| 65 | 65 | |
| 66 | 66 | public function define($name, $value) { |
| 67 | 67 | if (!defined($name)) { |
| 68 | 68 | define($name, $value); |
| @@ -80,21 +80,22 @@ | ||
| 80 | 80 | |
| 81 | 81 | public function wppm_check_download_file(){ |
| 82 | 82 | global $wpdb,$wppmfunction; |
| 83 | 83 | if( isset($_REQUEST['wppm_attachment']) && isset($_REQUEST['tid']) && isset($_REQUEST['tac'])){ |
| 84 | - $attach_id = intval(sanitize_text_field(wp_unslash($_REQUEST['wppm_attachment']))); | |
| 85 | - $auth_code = (sanitize_text_field(wp_unslash($_REQUEST['tac']))); | |
| 86 | - $task_id = intval(sanitize_text_field(wp_unslash($_REQUEST['tid']))); | |
| 84 | + $attach_id = intval(sanitize_text_field($_REQUEST['wppm_attachment'])); | |
| 85 | + $auth_code = (sanitize_text_field($_REQUEST['tac'])); | |
| 86 | + $task_id = intval(sanitize_text_field($_REQUEST['tid'])); | |
| 87 | 87 | $task_auth_code = $wppmfunction->get_task_fields($task_id,'task_auth_code'); |
| 88 | 88 | $task_auth_code = sanitize_text_field($task_auth_code); |
| 89 | 89 | if($task_auth_code == $auth_code){ |
| 90 | 90 | $this->wppm_file_download($attach_id); |
| 91 | 91 | } |
| 92 | - }elseif( isset($_REQUEST['wppm_attachment']) && isset($_REQUEST['pid']) && isset($_REQUEST['pac'])){ | |
| 93 | - $attach_id = intval(sanitize_text_field(wp_unslash($_REQUEST['wppm_attachment']))); | |
| 94 | - $auth_code = (sanitize_text_field(wp_unslash($_REQUEST['pac']))); | |
| 95 | - $proj_id = intval(sanitize_text_field(wp_unslash($_REQUEST['pid']))); | |
| 96 | - $proj_auth_code = $wppmfunction->get_project_fields($proj_id,'project_auth_code'); | |
| 92 | + } | |
| 93 | + if( isset($_REQUEST['wppm_attachment']) && isset($_REQUEST['pid']) && isset($_REQUEST['pac'])){ | |
| 94 | + $attach_id = intval(sanitize_text_field($_REQUEST['wppm_attachment'])); | |
| 95 | + $auth_code = (sanitize_text_field($_REQUEST['pac'])); | |
| 96 | + $proj_id = intval(sanitize_text_field($_REQUEST['pid'])); | |
| 97 | + $proj_auth_code = $wppmfunction->get_project_meta($proj_id,'project_auth_code',true); | |
| 97 | 98 | $proj_auth_code = sanitize_text_field($proj_auth_code); |
| 98 | 99 | if($proj_auth_code == $auth_code){ |
| 99 | 100 | $this->wppm_file_download($attach_id); |
| 100 | 101 | } |