Changeset 3007057
- Timestamp:
- 12/07/2023 11:34:06 PM (17 months ago)
- Location:
- import-users-from-csv-with-meta
- Files:
-
- 4 edited
- 4 copied
-
tags/1.24.3 (copied) (copied from import-users-from-csv-with-meta/trunk)
-
tags/1.24.3/classes/cron.php (modified) (6 diffs)
-
tags/1.24.3/classes/import.php (copied) (copied from import-users-from-csv-with-meta/trunk/classes/import.php)
-
tags/1.24.3/import-users-from-csv-with-meta.php (copied) (copied from import-users-from-csv-with-meta/trunk/import-users-from-csv-with-meta.php) (2 diffs)
-
tags/1.24.3/readme.txt (copied) (copied from import-users-from-csv-with-meta/trunk/readme.txt) (2 diffs)
-
trunk/classes/cron.php (modified) (6 diffs)
-
trunk/import-users-from-csv-with-meta.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
import-users-from-csv-with-meta/tags/1.24.3/classes/cron.php
r3000382 r3007057 9 9 add_action( 'acui_cron_process_step', array( $this, 'process_step' ), 10, 2 ); 10 10 add_action( 'wp_ajax_acui_fire_cron', array( $this, 'ajax_fire_cron' ) ); 11 } 12 13 function clean_path_url_csv( $path_url ){ 14 if( filter_var( $path_url, FILTER_VALIDATE_URL) !== false ) 15 return $path_url; 16 17 if( strtolower( pathinfo( $path_url, PATHINFO_EXTENSION ) ) !== 'csv' ) 18 return ''; 19 20 return $path_url; 11 21 } 12 22 … … 39 49 update_option( "acui_cron_path_to_move_auto_rename", isset( $form_data["path_to_move_auto_rename"] ) && $form_data["path_to_move_auto_rename"] == "1" ); 40 50 update_option( "acui_cron_allow_multiple_accounts", ( isset( $form_data["allow_multiple_accounts"] ) && $form_data["allow_multiple_accounts"] == "1" ) ? "allowed" : "not_allowed" ); 41 update_option( "acui_cron_path_to_file", sanitize_text_field( $form_data["path_to_file"]) );42 update_option( "acui_cron_path_to_move", sanitize_text_field( $form_data["path_to_move"]) );51 update_option( "acui_cron_path_to_file", $this->clean_path_url_csv( sanitize_text_field( $form_data["path_to_file"] ) ) ); 52 update_option( "acui_cron_path_to_move", $this->clean_path_url_csv( sanitize_text_field( $form_data["path_to_move"] ) ) ); 43 53 update_option( "acui_cron_period", sanitize_text_field( $form_data["period"] ) ); 44 54 update_option( "acui_cron_role", sanitize_text_field( $form_data["role"] ) ); … … 59 69 60 70 $form_data = array(); 61 $form_data[ "path_to_file" ] = get_option( "acui_cron_path_to_file");71 $form_data[ "path_to_file" ] = $this->clean_path_url_csv( get_option( "acui_cron_path_to_file") ); 62 72 $form_data[ "role" ] = get_option( "acui_cron_role"); 63 73 $form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no'; … … 75 85 76 86 if( $move_file_cron ){ 77 $path_to_file = get_option( "acui_cron_path_to_file"); 78 $path_to_move = get_option( "acui_cron_path_to_move"); 79 80 rename( $path_to_file, $path_to_move ); 81 87 $path_to_move = $this->clean_path_url_csv( get_option( "acui_cron_path_to_move") ); 88 rename( $form_data[ "path_to_file" ], $path_to_move ); 82 89 $this->auto_rename(); 83 90 } … … 91 98 92 99 $form_data = array(); 93 $form_data[ "path_to_file" ] = get_option( "acui_cron_path_to_file");100 $form_data[ "path_to_file" ] = $this->clean_path_url_csv( get_option( "acui_cron_path_to_file") ); 94 101 $form_data[ "role" ] = get_option( "acui_cron_role"); 95 102 $form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no'; … … 127 134 } 128 135 129 publicstatic function admin_gui(){136 static function admin_gui(){ 130 137 $upload_dir = wp_upload_dir(); 131 138 $sample_path = $upload_dir["path"] . '/test.csv'; -
import-users-from-csv-with-meta/tags/1.24.3/import-users-from-csv-with-meta.php
r3005960 r3007057 4 4 Plugin URI: https://www.codection.com 5 5 Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins 6 Version: 1.24. 26 Version: 1.24.3 7 7 Author: codection 8 8 Author URI: https://codection.com … … 12 12 Domain Path: /languages 13 13 */ 14 14 15 if ( ! defined( 'ABSPATH' ) ) 15 16 exit; 16 17 17 define( 'ACUI_VERSION', '1.24. 2' );18 define( 'ACUI_VERSION', '1.24.3' ); 18 19 19 20 class ImportExportUsersCustomers{ -
import-users-from-csv-with-meta/tags/1.24.3/readme.txt
r3005960 r3007057 4 4 Tags: csv, import, export, importer, exporter, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert, automatically, cron 5 5 Requires at least: 3.4 6 Tested up to: 6.4. 17 Stable tag: 1.24. 26 Tested up to: 6.4.2 7 Stable tag: 1.24.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 109 109 == Changelog == 110 110 111 = 1.24.3 = 112 * In the cron settings, when it comes to URLs or paths, if it comes to paths and any with a different ending than ".csv" is included, we return a blank string to avoid problems 113 111 114 = 1.24.2 = 112 115 * Fixed a problem when choosing to delete users not present in the CSV that caused more users to be deleted than it should -
import-users-from-csv-with-meta/trunk/classes/cron.php
r3000382 r3007057 9 9 add_action( 'acui_cron_process_step', array( $this, 'process_step' ), 10, 2 ); 10 10 add_action( 'wp_ajax_acui_fire_cron', array( $this, 'ajax_fire_cron' ) ); 11 } 12 13 function clean_path_url_csv( $path_url ){ 14 if( filter_var( $path_url, FILTER_VALIDATE_URL) !== false ) 15 return $path_url; 16 17 if( strtolower( pathinfo( $path_url, PATHINFO_EXTENSION ) ) !== 'csv' ) 18 return ''; 19 20 return $path_url; 11 21 } 12 22 … … 39 49 update_option( "acui_cron_path_to_move_auto_rename", isset( $form_data["path_to_move_auto_rename"] ) && $form_data["path_to_move_auto_rename"] == "1" ); 40 50 update_option( "acui_cron_allow_multiple_accounts", ( isset( $form_data["allow_multiple_accounts"] ) && $form_data["allow_multiple_accounts"] == "1" ) ? "allowed" : "not_allowed" ); 41 update_option( "acui_cron_path_to_file", sanitize_text_field( $form_data["path_to_file"]) );42 update_option( "acui_cron_path_to_move", sanitize_text_field( $form_data["path_to_move"]) );51 update_option( "acui_cron_path_to_file", $this->clean_path_url_csv( sanitize_text_field( $form_data["path_to_file"] ) ) ); 52 update_option( "acui_cron_path_to_move", $this->clean_path_url_csv( sanitize_text_field( $form_data["path_to_move"] ) ) ); 43 53 update_option( "acui_cron_period", sanitize_text_field( $form_data["period"] ) ); 44 54 update_option( "acui_cron_role", sanitize_text_field( $form_data["role"] ) ); … … 59 69 60 70 $form_data = array(); 61 $form_data[ "path_to_file" ] = get_option( "acui_cron_path_to_file");71 $form_data[ "path_to_file" ] = $this->clean_path_url_csv( get_option( "acui_cron_path_to_file") ); 62 72 $form_data[ "role" ] = get_option( "acui_cron_role"); 63 73 $form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no'; … … 75 85 76 86 if( $move_file_cron ){ 77 $path_to_file = get_option( "acui_cron_path_to_file"); 78 $path_to_move = get_option( "acui_cron_path_to_move"); 79 80 rename( $path_to_file, $path_to_move ); 81 87 $path_to_move = $this->clean_path_url_csv( get_option( "acui_cron_path_to_move") ); 88 rename( $form_data[ "path_to_file" ], $path_to_move ); 82 89 $this->auto_rename(); 83 90 } … … 91 98 92 99 $form_data = array(); 93 $form_data[ "path_to_file" ] = get_option( "acui_cron_path_to_file");100 $form_data[ "path_to_file" ] = $this->clean_path_url_csv( get_option( "acui_cron_path_to_file") ); 94 101 $form_data[ "role" ] = get_option( "acui_cron_role"); 95 102 $form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no'; … … 127 134 } 128 135 129 publicstatic function admin_gui(){136 static function admin_gui(){ 130 137 $upload_dir = wp_upload_dir(); 131 138 $sample_path = $upload_dir["path"] . '/test.csv'; -
import-users-from-csv-with-meta/trunk/import-users-from-csv-with-meta.php
r3005960 r3007057 4 4 Plugin URI: https://www.codection.com 5 5 Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins 6 Version: 1.24. 26 Version: 1.24.3 7 7 Author: codection 8 8 Author URI: https://codection.com … … 12 12 Domain Path: /languages 13 13 */ 14 14 15 if ( ! defined( 'ABSPATH' ) ) 15 16 exit; 16 17 17 define( 'ACUI_VERSION', '1.24. 2' );18 define( 'ACUI_VERSION', '1.24.3' ); 18 19 19 20 class ImportExportUsersCustomers{ -
import-users-from-csv-with-meta/trunk/readme.txt
r3005960 r3007057 4 4 Tags: csv, import, export, importer, exporter, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert, automatically, cron 5 5 Requires at least: 3.4 6 Tested up to: 6.4. 17 Stable tag: 1.24. 26 Tested up to: 6.4.2 7 Stable tag: 1.24.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 109 109 == Changelog == 110 110 111 = 1.24.3 = 112 * In the cron settings, when it comes to URLs or paths, if it comes to paths and any with a different ending than ".csv" is included, we return a blank string to avoid problems 113 111 114 = 1.24.2 = 112 115 * Fixed a problem when choosing to delete users not present in the CSV that caused more users to be deleted than it should
Note: See TracChangeset
for help on using the changeset viewer.