Changeset 3076572
- Timestamp:
- 04/24/2024 03:18:07 PM (22 months ago)
- Location:
- mxp-dev-tools
- Files:
-
- 7 edited
- 18 copied
-
tags/3.1.2 (copied) (copied from mxp-dev-tools/trunk)
-
tags/3.1.2/includes/assets/js/dashboard/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/dashboard/app.js)
-
tags/3.1.2/includes/assets/js/db-optimize/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/db-optimize/app.js)
-
tags/3.1.2/includes/assets/js/plugins-list/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/plugins-list/app.js)
-
tags/3.1.2/includes/assets/js/search-plugins/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/search-plugins/app.js)
-
tags/3.1.2/includes/assets/js/site-manager (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager)
-
tags/3.1.2/includes/assets/js/site-manager/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager/app.js)
-
tags/3.1.2/includes/class_plugins_list_table.php (copied) (copied from mxp-dev-tools/trunk/includes/class_plugins_list_table.php)
-
tags/3.1.2/includes/db-optimize.php (copied) (copied from mxp-dev-tools/trunk/includes/db-optimize.php) (6 diffs)
-
tags/3.1.2/includes/hooks-usage.php (copied) (copied from mxp-dev-tools/trunk/includes/hooks-usage.php)
-
tags/3.1.2/includes/plugins-list.php (copied) (copied from mxp-dev-tools/trunk/includes/plugins-list.php) (2 diffs)
-
tags/3.1.2/includes/utility.php (copied) (copied from mxp-dev-tools/trunk/includes/utility.php)
-
tags/3.1.2/index.php (copied) (copied from mxp-dev-tools/trunk/index.php) (2 diffs)
-
tags/3.1.2/mxp-login-path.php (copied) (copied from mxp-dev-tools/trunk/mxp-login-path.php) (1 diff)
-
tags/3.1.2/mxp-site-manager.php (copied) (copied from mxp-dev-tools/trunk/mxp-site-manager.php) (2 diffs)
-
tags/3.1.2/mxp-snippets.php (copied) (copied from mxp-dev-tools/trunk/mxp-snippets.php) (1 diff)
-
tags/3.1.2/readme.txt (copied) (copied from mxp-dev-tools/trunk/readme.txt) (2 diffs)
-
tags/3.1.2/uninstall.php (copied) (copied from mxp-dev-tools/trunk/uninstall.php)
-
trunk/includes/db-optimize.php (modified) (6 diffs)
-
trunk/includes/plugins-list.php (modified) (2 diffs)
-
trunk/index.php (modified) (2 diffs)
-
trunk/mxp-login-path.php (modified) (1 diff)
-
trunk/mxp-site-manager.php (modified) (2 diffs)
-
trunk/mxp-snippets.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mxp-dev-tools/tags/3.1.2/includes/db-optimize.php
r3067061 r3076572 27 27 global $wpdb; 28 28 $sql_name = $export_database . '-' . $export_table . '-' . date('Y-m-d-H-i-s') . '.sql'; 29 $sql_full_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $sql_name; 29 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 30 $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name; 30 31 $zip_file_name = $sql_name . '.zip'; 31 $zip_file_path = sys_get_temp_dir(). DIRECTORY_SEPARATOR . $zip_file_name;32 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 32 33 // error_log($sql_full_path); 33 34 $fp = fopen($sql_full_path, 'w'); … … 169 170 $zip = new \ZipArchive(); 170 171 $zip_file_name = $sql_name . '.zip'; 171 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 172 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 173 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 172 174 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 173 175 if ($zip) { … … 234 236 $database = sanitize_text_field($_REQUEST['database']); 235 237 $dump_file_name = $database . '-' . date('Y-m-d-H-i-s') . '.sql'; 236 $dump_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $dump_file_name; 238 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 239 $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name; 237 240 $table = $wpdb->options; 238 241 $column = 'option_name'; … … 488 491 break; 489 492 case 'error': 490 wp_send_json(array('success' => false, 'data' => array('progress' => $check['progress'], 'dump_file_name' => $dump_file_name, 'dump_file_path' => $dump_file_path), 'msg' => '發生錯誤,匯出 作業中斷'));493 wp_send_json(array('success' => false, 'data' => array('progress' => $check['progress'], 'dump_file_name' => $dump_file_name, 'dump_file_path' => $dump_file_path), 'msg' => '發生錯誤,匯出發生錯誤作業中斷')); 491 494 exit; 492 495 break; … … 620 623 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 621 624 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 622 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 625 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 626 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 623 627 //清除當前打包檔案 624 628 if (file_exists($zip_file_path)) { … … 1017 1021 closedir($folder); 1018 1022 } 1019 $directory = sys_get_temp_dir() . DIRECTORY_SEPARATOR; 1023 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 1024 $directory = $tmp_dir . DIRECTORY_SEPARATOR; 1020 1025 $files = scandir($directory); 1021 1026 foreach ($files as $file) { -
mxp-dev-tools/tags/3.1.2/includes/plugins-list.php
r3035023 r3076572 270 270 } 271 271 $zip_file_name = basename($path) . '.zip'; 272 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 272 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 273 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 273 274 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 274 275 if (!$zip) { … … 283 284 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 284 285 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 285 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 286 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 287 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 286 288 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 287 289 if (!$zip) { -
mxp-dev-tools/tags/3.1.2/index.php
r3072940 r3076572 4 4 * Plugin URI: https://goo.gl/2gLq18 5 5 * Description: 一介資男の常用外掛整理與常用開發功能整合外掛。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ … … 26 26 use SearchReplace; 27 27 use Utility; 28 static $VERSION = '3.1. 1';28 static $VERSION = '3.1.2'; 29 29 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 30 30 protected static $instance = null; -
mxp-dev-tools/tags/3.1.2/mxp-login-path.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 隱藏後台登入位置工具。啟用即更改預設登入網址為 /admin-staff/ 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.1.2/mxp-site-manager.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 管理多個 WordPress 站點的工具。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ … … 35 35 class MDTSiteManager { 36 36 public $plugin_slug = 'mdt-site-manager'; 37 public static $VERSION = '3.1. 1';37 public static $VERSION = '3.1.2'; 38 38 39 39 public function __construct() { -
mxp-dev-tools/tags/3.1.2/mxp-snippets.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 整合 GitHub 中常用的程式碼片段。請注意,並非所有網站都適用全部的選項,有進階需求可以透過設定 wp-config.php 中此外掛預設常數,啟用或停用部分功能。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.1.2/readme.txt
r3072940 r3076572 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1. 18 Stable tag: 3.1.2 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 79 79 == Changelog == 80 81 = 3.1.2 = 82 83 * 修正打包暫存目錄使用的 sys_get_temp_dir() 方法 80 84 81 85 = 3.1.1 = -
mxp-dev-tools/trunk/includes/db-optimize.php
r3067061 r3076572 27 27 global $wpdb; 28 28 $sql_name = $export_database . '-' . $export_table . '-' . date('Y-m-d-H-i-s') . '.sql'; 29 $sql_full_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $sql_name; 29 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 30 $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name; 30 31 $zip_file_name = $sql_name . '.zip'; 31 $zip_file_path = sys_get_temp_dir(). DIRECTORY_SEPARATOR . $zip_file_name;32 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 32 33 // error_log($sql_full_path); 33 34 $fp = fopen($sql_full_path, 'w'); … … 169 170 $zip = new \ZipArchive(); 170 171 $zip_file_name = $sql_name . '.zip'; 171 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 172 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 173 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 172 174 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 173 175 if ($zip) { … … 234 236 $database = sanitize_text_field($_REQUEST['database']); 235 237 $dump_file_name = $database . '-' . date('Y-m-d-H-i-s') . '.sql'; 236 $dump_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $dump_file_name; 238 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 239 $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name; 237 240 $table = $wpdb->options; 238 241 $column = 'option_name'; … … 488 491 break; 489 492 case 'error': 490 wp_send_json(array('success' => false, 'data' => array('progress' => $check['progress'], 'dump_file_name' => $dump_file_name, 'dump_file_path' => $dump_file_path), 'msg' => '發生錯誤,匯出 作業中斷'));493 wp_send_json(array('success' => false, 'data' => array('progress' => $check['progress'], 'dump_file_name' => $dump_file_name, 'dump_file_path' => $dump_file_path), 'msg' => '發生錯誤,匯出發生錯誤作業中斷')); 491 494 exit; 492 495 break; … … 620 623 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 621 624 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 622 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 625 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 626 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 623 627 //清除當前打包檔案 624 628 if (file_exists($zip_file_path)) { … … 1017 1021 closedir($folder); 1018 1022 } 1019 $directory = sys_get_temp_dir() . DIRECTORY_SEPARATOR; 1023 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 1024 $directory = $tmp_dir . DIRECTORY_SEPARATOR; 1020 1025 $files = scandir($directory); 1021 1026 foreach ($files as $file) { -
mxp-dev-tools/trunk/includes/plugins-list.php
r3035023 r3076572 270 270 } 271 271 $zip_file_name = basename($path) . '.zip'; 272 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 272 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 273 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 273 274 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 274 275 if (!$zip) { … … 283 284 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 284 285 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 285 $zip_file_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $zip_file_name; 286 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); 287 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; 286 288 $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 287 289 if (!$zip) { -
mxp-dev-tools/trunk/index.php
r3072940 r3076572 4 4 * Plugin URI: https://goo.gl/2gLq18 5 5 * Description: 一介資男の常用外掛整理與常用開發功能整合外掛。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ … … 26 26 use SearchReplace; 27 27 use Utility; 28 static $VERSION = '3.1. 1';28 static $VERSION = '3.1.2'; 29 29 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 30 30 protected static $instance = null; -
mxp-dev-tools/trunk/mxp-login-path.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 隱藏後台登入位置工具。啟用即更改預設登入網址為 /admin-staff/ 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/mxp-site-manager.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 管理多個 WordPress 站點的工具。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ … … 35 35 class MDTSiteManager { 36 36 public $plugin_slug = 'mdt-site-manager'; 37 public static $VERSION = '3.1. 1';37 public static $VERSION = '3.1.2'; 38 38 39 39 public function __construct() { -
mxp-dev-tools/trunk/mxp-snippets.php
r3072940 r3076572 4 4 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/ 5 5 * Description: 整合 GitHub 中常用的程式碼片段。請注意,並非所有網站都適用全部的選項,有進階需求可以透過設定 wp-config.php 中此外掛預設常數,啟用或停用部分功能。 6 * Version: 3.1. 16 * Version: 3.1.2 7 7 * Author: Chun 8 8 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/readme.txt
r3072940 r3076572 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1. 18 Stable tag: 3.1.2 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 79 79 == Changelog == 80 81 = 3.1.2 = 82 83 * 修正打包暫存目錄使用的 sys_get_temp_dir() 方法 80 84 81 85 = 3.1.1 =
Note: See TracChangeset
for help on using the changeset viewer.