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