From 606cadc64a706ffdb69f6d04e13aedbd41f98737 Mon Sep 17 00:00:00 2001 From: Scott DeLuzio Date: Mon, 30 Sep 2019 11:07:44 -0700 Subject: [PATCH] Export functionality was not working due to an incorrect reference to the import/export class. --- includes/import-export/export-campaigns.php | 6 +++--- includes/import-export/export-contacts.php | 2 +- includes/import-export/export-opportunities.php | 2 +- includes/import-export/export-organizations.php | 2 +- includes/import-export/export-projects.php | 4 ++-- includes/import-export/export-tasks.php | 6 +++--- readme.txt | 9 +++++---- wp-crm-system.php | 4 ++-- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/includes/import-export/export-campaigns.php b/includes/import-export/export-campaigns.php index ccd8655..db264aa 100644 --- a/includes/import-export/export-campaigns.php +++ b/includes/import-export/export-campaigns.php @@ -6,7 +6,7 @@ function wp_crm_system_export_campaigns_process(){ if ( isset( $_POST[ 'wpcrm_system_export_campaigns_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_campaigns_nonce' ], 'wpcrm-system-export-campaigns-nonce' ) ){ - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Campaigns(); @@ -81,8 +81,8 @@ public function get_data() { 'assigned' => get_post_meta( $id, '_wpcrm_campaign-assigned', true ), 'active' => get_post_meta( $id, '_wpcrm_campaign-active', true ), 'status' => get_post_meta( $id, '_wpcrm_campaign-status', true ), - 'start_date' => date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_campaign-startdate', true ) ), - 'end_date' => date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_campaign-enddate', true ) ), + 'start_date' => get_post_meta( $id, '_wpcrm_campaign-startdate', true ) ? date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_campaign-startdate', true ) ) : '', + 'end_date' => get_post_meta( $id, '_wpcrm_campaign-enddate', true ) ? date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_campaign-enddate', true ) ) : '', 'projected_reach' => get_post_meta( $id, '_wpcrm_campaign-projectedreach', true ), 'responses' => get_post_meta( $id, '_wpcrm_campaign-responses', true ), 'budget_cost' => get_post_meta( $id, '_wpcrm_campaign-budgetcost', true ), diff --git a/includes/import-export/export-contacts.php b/includes/import-export/export-contacts.php index 08d5f98..4255be6 100644 --- a/includes/import-export/export-contacts.php +++ b/includes/import-export/export-contacts.php @@ -6,7 +6,7 @@ function wp_crm_system_export_contacts_process(){ if ( isset( $_POST[ 'wpcrm_system_export_contacts_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_contacts_nonce' ], 'wpcrm-system-export-contacts-nonce' ) ) { - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Contacts(); diff --git a/includes/import-export/export-opportunities.php b/includes/import-export/export-opportunities.php index d248ae5..6ce14cf 100644 --- a/includes/import-export/export-opportunities.php +++ b/includes/import-export/export-opportunities.php @@ -6,7 +6,7 @@ function wp_crm_system_export_opportunities_process(){ if ( isset( $_POST[ 'wpcrm_system_export_opportunities_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_opportunities_nonce' ], 'wpcrm-system-export-opportunities-nonce' ) ) { - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Opportunities(); diff --git a/includes/import-export/export-organizations.php b/includes/import-export/export-organizations.php index 21cfe15..4f4eea8 100644 --- a/includes/import-export/export-organizations.php +++ b/includes/import-export/export-organizations.php @@ -6,7 +6,7 @@ function wp_crm_system_export_organizations_process(){ if ( isset( $_POST[ 'wpcrm_system_export_organizations_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_organizations_nonce' ], 'wpcrm-system-export-organizations-nonce' ) ) { - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Organizations(); diff --git a/includes/import-export/export-projects.php b/includes/import-export/export-projects.php index 720123e..bbd86f0 100644 --- a/includes/import-export/export-projects.php +++ b/includes/import-export/export-projects.php @@ -6,7 +6,7 @@ function wp_crm_system_export_projects_process(){ if ( isset( $_POST[ 'wpcrm_system_export_projects_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_projects_nonce' ], 'wpcrm-system-export-projects-nonce' ) ) { - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Projects(); @@ -79,7 +79,7 @@ public function get_data() { $data[$id] = array( 'project_name' => get_the_title( $id ), 'description' => esc_html( get_post_meta( $id, '_wpcrm_project-description', true ) ), - 'close_date' => date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_project-closedate', true ) ), + 'close_date' => get_post_meta( $id, '_wpcrm_project-closedate', true ) ? date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_project-closedate', true ) ) : '', 'progress' => get_post_meta( $id, '_wpcrm_project-progress', true ), 'status' => get_post_meta( $id, '_wpcrm_project-status', true ), 'value' => get_post_meta( $id, '_wpcrm_project-value', true ), diff --git a/includes/import-export/export-tasks.php b/includes/import-export/export-tasks.php index f5b02b4..6192620 100644 --- a/includes/import-export/export-tasks.php +++ b/includes/import-export/export-tasks.php @@ -6,7 +6,7 @@ function wp_crm_system_export_tasks_process(){ if ( isset( $_POST[ 'wpcrm_system_export_tasks_nonce' ] ) ) { if( wp_verify_nonce( $_POST[ 'wpcrm_system_export_tasks_nonce' ], 'wpcrm-system-export-tasks-nonce' ) ) { - require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . '/includes/class-export.php'; + require_once WP_CRM_SYSTEM_PLUGIN_DIR_PATH . 'includes/import-export/class-export.php'; $export = new WPCRM_System_Export_Tasks(); @@ -84,8 +84,8 @@ public function get_data() { 'organization_id' => get_post_meta( $id, '_wpcrm_task-attach-to-organization', true ), 'contact' => get_the_title( get_post_meta( $id, '_wpcrm_task-contact', true ) ), 'contact_id' => get_post_meta( $id, '_wpcrm_task-contact', true ), - 'due_date' => date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_task-due-date', true ) ), - 'start_date' => date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_task-start-date', true ) ), + 'due_date' => get_post_meta( $id, '_wpcrm_task-due-date', true ) ? date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_task-due-date', true ) ) : '', + 'start_date' => get_post_meta( $id, '_wpcrm_task-start-date', true ) ? date( get_option( 'wpcrm_system_php_date_format' ), get_post_meta( $id, '_wpcrm_task-start-date', true ) ) : '', 'progress' => get_post_meta( $id, '_wpcrm_task-progress', true ), 'priority' => get_post_meta( $id, '_wpcrm_task-priority', true ), 'status' => get_post_meta( $id, '_wpcrm_task-status', true ), diff --git a/readme.txt b/readme.txt index 6dc9d7f..4671735 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: scott.deluzio Tags: WordPress CRM, Free CRM for WordPress, CRM, Free WordPress CRM, CRM for WordPress, gdpr Requires at least: 3.3.0 Tested up to: 5.2.3 -Stable tag: 3.1.1 +Stable tag: 3.1.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -91,6 +91,8 @@ Absolutely. There are inexpensive extensions that allow you to import as little Your data is only accessible through the WordPress CRM dashboard. None of it will be accessible through the public facing portion of your website unless you are using our GDPR features (see above). This allows you to provide access to as few or as many people as you need to. == Changelog == += 3.1.2 = +* Fix: Export functionality was not working due to an incorrect reference to the import/export class. = 3.1.1 = * Fix: Buttons on recurring projects and tasks page were incorrectly redirecting to the Settings tab. * Fix: Recurring tab was receiving the "active" style when it was the active tab. @@ -360,6 +362,5 @@ Your data is only accessible through the WordPress CRM dashboard. None of it wil * Initial Release == Upgrade Notice == -= 3.1.1 = -* Fix: Buttons on recurring projects and tasks page were incorrectly redirecting to the Settings tab. -* Fix: Recurring tab was receiving the "active" style when it was the active tab. \ No newline at end of file += 3.1.2 = +* Fix: Export functionality was not working due to an incorrect reference to the import/export class. \ No newline at end of file diff --git a/wp-crm-system.php b/wp-crm-system.php index 3efb475..a3dce5e 100644 --- a/wp-crm-system.php +++ b/wp-crm-system.php @@ -3,7 +3,7 @@ Plugin Name: WP-CRM System Plugin URI: https://www.wp-crm.com Description: A complete CRM for WordPress -Version: 3.1.1 +Version: 3.1.2 Author: Scott DeLuzio Author URI: https://www.wp-crm.com Text Domain: wp-crm-system @@ -34,7 +34,7 @@ function wp_crm_plugin_init() { define( 'WP_CRM_SYSTEM', __FILE__ ); } if ( ! defined( 'WP_CRM_SYSTEM_VERSION' ) ) { - define( 'WP_CRM_SYSTEM_VERSION', '3.1.1' ); + define( 'WP_CRM_SYSTEM_VERSION', '3.1.2' ); } if( ! defined( 'WP_CRM_SYSTEM_URL' ) ) { define( 'WP_CRM_SYSTEM_URL', plugins_url( '', __FILE__ ) );