Changeset 3103196
- Timestamp:
- 06/16/2024 08:57:46 AM (19 months ago)
- Location:
- mxp-dev-tools
- Files:
-
- 1 deleted
- 7 edited
- 18 copied
-
tags/3.1.15 (deleted)
-
tags/3.1.16 (copied) (copied from mxp-dev-tools/trunk)
-
tags/3.1.16/includes/assets/js/dashboard/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/dashboard/app.js)
-
tags/3.1.16/includes/assets/js/db-optimize/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/db-optimize/app.js)
-
tags/3.1.16/includes/assets/js/plugins-list/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/plugins-list/app.js)
-
tags/3.1.16/includes/assets/js/search-plugins/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/search-plugins/app.js)
-
tags/3.1.16/includes/assets/js/site-manager (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager)
-
tags/3.1.16/includes/assets/js/site-manager/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager/app.js)
-
tags/3.1.16/includes/class_plugins_list_table.php (copied) (copied from mxp-dev-tools/trunk/includes/class_plugins_list_table.php)
-
tags/3.1.16/includes/db-optimize.php (copied) (copied from mxp-dev-tools/trunk/includes/db-optimize.php) (23 diffs)
-
tags/3.1.16/includes/hooks-usage.php (copied) (copied from mxp-dev-tools/trunk/includes/hooks-usage.php)
-
tags/3.1.16/includes/plugins-list.php (copied) (copied from mxp-dev-tools/trunk/includes/plugins-list.php) (2 diffs)
-
tags/3.1.16/includes/utility.php (copied) (copied from mxp-dev-tools/trunk/includes/utility.php)
-
tags/3.1.16/index.php (copied) (copied from mxp-dev-tools/trunk/index.php) (2 diffs)
-
tags/3.1.16/mxp-login-path.php (copied) (copied from mxp-dev-tools/trunk/mxp-login-path.php) (1 diff)
-
tags/3.1.16/mxp-site-manager.php (copied) (copied from mxp-dev-tools/trunk/mxp-site-manager.php) (2 diffs)
-
tags/3.1.16/mxp-snippets.php (copied) (copied from mxp-dev-tools/trunk/mxp-snippets.php) (1 diff)
-
tags/3.1.16/readme.txt (copied) (copied from mxp-dev-tools/trunk/readme.txt) (2 diffs)
-
tags/3.1.16/uninstall.php (copied) (copied from mxp-dev-tools/trunk/uninstall.php)
-
trunk/includes/db-optimize.php (modified) (23 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.16/includes/db-optimize.php
r3103118 r3103196 27 27 global $wpdb; 28 28 $sql_name = $export_database . '-' . $export_table . '-' . date('Y-m-d-H-i-s') . '.sql'; 29 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();29 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 30 30 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 31 31 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 32 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 33 mkdir($tmp_dir, 0777, true); 34 } 32 35 } 33 36 $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name; … … 173 176 $zip = new \ZipArchive(); 174 177 $zip_file_name = $sql_name . '.zip'; 175 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();178 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 176 179 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 177 180 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 181 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 182 mkdir($tmp_dir, 0777, true); 183 } 178 184 } 179 185 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 242 248 $database = sanitize_text_field($_REQUEST['database']); 243 249 $dump_file_name = $database . '-' . date('Y-m-d-H-i-s') . '.sql'; 244 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();250 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 245 251 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 246 252 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 253 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 254 mkdir($tmp_dir, 0777, true); 255 } 247 256 } 248 257 $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name; … … 319 328 case 'METHOD_A': 320 329 ob_end_clean(); 330 header("HTTP/1.1 200 OK\r\n"); 321 331 header("Connection: close\r\n"); 322 332 ob_start(); … … 325 335 header("Content-Length: $size\r\n"); 326 336 header("Content-Encoding: application/json\r\n"); 327 header("HTTP/1.1 200 OK\r\n");328 337 ob_end_flush(); 329 338 ob_get_length() && ob_flush(); … … 337 346 default: 338 347 ob_end_clean(); 348 header("HTTP/1.1 200 OK\r\n"); 339 349 header("Connection: close\r\n"); 340 350 ob_start(); … … 343 353 header("Content-Length: $size\r\n"); 344 354 header("Content-Encoding: application/json\r\n"); 345 header("HTTP/1.1 200 OK\r\n");346 355 ob_end_flush(); 347 356 ob_get_length() && ob_flush(); … … 352 361 if (function_exists('apache_response_headers')) { 353 362 $headers = apache_response_headers(); 354 // header('Connection: close\r\n');363 header("Connection: close\r\n"); 355 364 if (isset($headers['Content-Length'])) { 356 365 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 590 599 case 'METHOD_A': 591 600 ob_end_clean(); 601 header("HTTP/1.1 200 OK\r\n"); 592 602 header("Connection: close\r\n"); 593 603 ob_start(); … … 596 606 header("Content-Length: $size\r\n"); 597 607 header("Content-Encoding: application/json\r\n"); 598 header("HTTP/1.1 200 OK\r\n");599 608 ob_end_flush(); 600 609 ob_get_length() && ob_flush(); … … 608 617 default: 609 618 ob_end_clean(); 619 header("HTTP/1.1 200 OK\r\n"); 610 620 header("Connection: close\r\n"); 611 621 ob_start(); … … 614 624 header("Content-Length: $size\r\n"); 615 625 header("Content-Encoding: application/json\r\n"); 616 header("HTTP/1.1 200 OK\r\n");617 626 ob_end_flush(); 618 627 ob_get_length() && ob_flush(); … … 623 632 if (function_exists('apache_response_headers')) { 624 633 $headers = apache_response_headers(); 625 // header('Connection: close\r\n');634 header("Connection: close\r\n"); 626 635 if (isset($headers['Content-Length'])) { 627 636 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 650 659 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 651 660 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 652 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();661 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 653 662 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 654 663 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 664 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 665 mkdir($tmp_dir, 0777, true); 666 } 655 667 } 656 668 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 709 721 'mxp_dev_default_exclude_dirs', 710 722 array( 723 'MXPDEV', 711 724 'wp-content/uploads/MXPDEV', 712 725 'wp-content/uploads/backwpup', … … 985 998 case 'METHOD_A': 986 999 ob_end_clean(); 1000 header("HTTP/1.1 200 OK\r\n"); 987 1001 header("Connection: close\r\n"); 988 1002 ob_start(); … … 991 1005 header("Content-Length: $size\r\n"); 992 1006 header("Content-Encoding: application/json\r\n"); 993 header("HTTP/1.1 200 OK\r\n");994 1007 ob_end_flush(); 995 1008 ob_get_length() && ob_flush(); … … 1003 1016 default: 1004 1017 ob_end_clean(); 1018 header("HTTP/1.1 200 OK\r\n"); 1005 1019 header("Connection: close\r\n"); 1006 1020 ob_start(); … … 1009 1023 header("Content-Length: $size\r\n"); 1010 1024 header("Content-Encoding: application/json\r\n"); 1011 header("HTTP/1.1 200 OK\r\n");1012 1025 ob_end_flush(); 1013 1026 ob_get_length() && ob_flush(); … … 1018 1031 if (function_exists('apache_response_headers')) { 1019 1032 $headers = apache_response_headers(); 1020 // header('Connection: close\r\n');1033 header("Connection: close\r\n"); 1021 1034 if (isset($headers['Content-Length'])) { 1022 1035 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 1045 1058 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 1046 1059 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 1047 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();1060 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 1048 1061 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 1049 1062 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 1063 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 1064 mkdir($tmp_dir, 0777, true); 1065 } 1050 1066 } 1051 1067 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 1103 1119 'mxp_dev_default_exclude_dirs', 1104 1120 array( 1121 'MXPDEV', 1105 1122 'wp-content/uploads/MXPDEV', 1106 1123 'wp-content/uploads/backwpup', … … 1537 1554 closedir($folder); 1538 1555 } 1539 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();1556 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 1540 1557 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 1541 1558 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 1559 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 1560 mkdir($tmp_dir, 0777, true); 1561 } 1542 1562 } 1543 1563 $directory = $tmp_dir . DIRECTORY_SEPARATOR; -
mxp-dev-tools/tags/3.1.16/includes/plugins-list.php
r3103118 r3103196 273 273 } 274 274 $zip_file_name = basename($path) . '.zip'; 275 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();275 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 276 276 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 277 277 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 278 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 279 mkdir($tmp_dir, 0777, true); 280 } 278 281 } 279 282 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 290 293 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 291 294 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 292 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();295 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 293 296 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 294 297 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 298 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 299 mkdir($tmp_dir, 0777, true); 300 } 295 301 } 296 302 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; -
mxp-dev-tools/tags/3.1.16/index.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 use SearchReplace; 40 40 use Utility; 41 static $VERSION = '3.1.1 5';41 static $VERSION = '3.1.16'; 42 42 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 43 43 protected static $instance = null; -
mxp-dev-tools/tags/3.1.16/mxp-login-path.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.1.16/mxp-site-manager.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 class MDTSiteManager { 40 40 public $plugin_slug = 'mdt-site-manager'; 41 public static $VERSION = '3.1.1 5';41 public static $VERSION = '3.1.16'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/tags/3.1.16/mxp-snippets.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.1.16/readme.txt
r3103118 r3103196 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1.1 58 Stable tag: 3.1.16 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 == Changelog == 79 79 80 = 3.1.1 5=80 = 3.1.16 = 81 81 82 82 * 增加判斷匯出打包目錄是否可寫入,不可寫入則改為輸出至下載目錄處理 83 * 修正暫存下載目錄建立問題 83 84 84 85 = 3.1.14 = -
mxp-dev-tools/trunk/includes/db-optimize.php
r3103118 r3103196 27 27 global $wpdb; 28 28 $sql_name = $export_database . '-' . $export_table . '-' . date('Y-m-d-H-i-s') . '.sql'; 29 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();29 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 30 30 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 31 31 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 32 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 33 mkdir($tmp_dir, 0777, true); 34 } 32 35 } 33 36 $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name; … … 173 176 $zip = new \ZipArchive(); 174 177 $zip_file_name = $sql_name . '.zip'; 175 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();178 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 176 179 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 177 180 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 181 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 182 mkdir($tmp_dir, 0777, true); 183 } 178 184 } 179 185 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 242 248 $database = sanitize_text_field($_REQUEST['database']); 243 249 $dump_file_name = $database . '-' . date('Y-m-d-H-i-s') . '.sql'; 244 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();250 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 245 251 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 246 252 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 253 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 254 mkdir($tmp_dir, 0777, true); 255 } 247 256 } 248 257 $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name; … … 319 328 case 'METHOD_A': 320 329 ob_end_clean(); 330 header("HTTP/1.1 200 OK\r\n"); 321 331 header("Connection: close\r\n"); 322 332 ob_start(); … … 325 335 header("Content-Length: $size\r\n"); 326 336 header("Content-Encoding: application/json\r\n"); 327 header("HTTP/1.1 200 OK\r\n");328 337 ob_end_flush(); 329 338 ob_get_length() && ob_flush(); … … 337 346 default: 338 347 ob_end_clean(); 348 header("HTTP/1.1 200 OK\r\n"); 339 349 header("Connection: close\r\n"); 340 350 ob_start(); … … 343 353 header("Content-Length: $size\r\n"); 344 354 header("Content-Encoding: application/json\r\n"); 345 header("HTTP/1.1 200 OK\r\n");346 355 ob_end_flush(); 347 356 ob_get_length() && ob_flush(); … … 352 361 if (function_exists('apache_response_headers')) { 353 362 $headers = apache_response_headers(); 354 // header('Connection: close\r\n');363 header("Connection: close\r\n"); 355 364 if (isset($headers['Content-Length'])) { 356 365 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 590 599 case 'METHOD_A': 591 600 ob_end_clean(); 601 header("HTTP/1.1 200 OK\r\n"); 592 602 header("Connection: close\r\n"); 593 603 ob_start(); … … 596 606 header("Content-Length: $size\r\n"); 597 607 header("Content-Encoding: application/json\r\n"); 598 header("HTTP/1.1 200 OK\r\n");599 608 ob_end_flush(); 600 609 ob_get_length() && ob_flush(); … … 608 617 default: 609 618 ob_end_clean(); 619 header("HTTP/1.1 200 OK\r\n"); 610 620 header("Connection: close\r\n"); 611 621 ob_start(); … … 614 624 header("Content-Length: $size\r\n"); 615 625 header("Content-Encoding: application/json\r\n"); 616 header("HTTP/1.1 200 OK\r\n");617 626 ob_end_flush(); 618 627 ob_get_length() && ob_flush(); … … 623 632 if (function_exists('apache_response_headers')) { 624 633 $headers = apache_response_headers(); 625 // header('Connection: close\r\n');634 header("Connection: close\r\n"); 626 635 if (isset($headers['Content-Length'])) { 627 636 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 650 659 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 651 660 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 652 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();661 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 653 662 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 654 663 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 664 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 665 mkdir($tmp_dir, 0777, true); 666 } 655 667 } 656 668 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 709 721 'mxp_dev_default_exclude_dirs', 710 722 array( 723 'MXPDEV', 711 724 'wp-content/uploads/MXPDEV', 712 725 'wp-content/uploads/backwpup', … … 985 998 case 'METHOD_A': 986 999 ob_end_clean(); 1000 header("HTTP/1.1 200 OK\r\n"); 987 1001 header("Connection: close\r\n"); 988 1002 ob_start(); … … 991 1005 header("Content-Length: $size\r\n"); 992 1006 header("Content-Encoding: application/json\r\n"); 993 header("HTTP/1.1 200 OK\r\n");994 1007 ob_end_flush(); 995 1008 ob_get_length() && ob_flush(); … … 1003 1016 default: 1004 1017 ob_end_clean(); 1018 header("HTTP/1.1 200 OK\r\n"); 1005 1019 header("Connection: close\r\n"); 1006 1020 ob_start(); … … 1009 1023 header("Content-Length: $size\r\n"); 1010 1024 header("Content-Encoding: application/json\r\n"); 1011 header("HTTP/1.1 200 OK\r\n");1012 1025 ob_end_flush(); 1013 1026 ob_get_length() && ob_flush(); … … 1018 1031 if (function_exists('apache_response_headers')) { 1019 1032 $headers = apache_response_headers(); 1020 // header('Connection: close\r\n');1033 header("Connection: close\r\n"); 1021 1034 if (isset($headers['Content-Length'])) { 1022 1035 // header('Content-Length: ' . $headers['Content-Length'] . "\r\n"); … … 1045 1058 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 1046 1059 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 1047 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();1060 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 1048 1061 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 1049 1062 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 1063 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 1064 mkdir($tmp_dir, 0777, true); 1065 } 1050 1066 } 1051 1067 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 1103 1119 'mxp_dev_default_exclude_dirs', 1104 1120 array( 1121 'MXPDEV', 1105 1122 'wp-content/uploads/MXPDEV', 1106 1123 'wp-content/uploads/backwpup', … … 1537 1554 closedir($folder); 1538 1555 } 1539 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();1556 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 1540 1557 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 1541 1558 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 1559 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 1560 mkdir($tmp_dir, 0777, true); 1561 } 1542 1562 } 1543 1563 $directory = $tmp_dir . DIRECTORY_SEPARATOR; -
mxp-dev-tools/trunk/includes/plugins-list.php
r3103118 r3103196 273 273 } 274 274 $zip_file_name = basename($path) . '.zip'; 275 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();275 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 276 276 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 277 277 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 278 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 279 mkdir($tmp_dir, 0777, true); 280 } 278 281 } 279 282 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; … … 290 293 $zip_file_name = $split_path[count($split_path) - 2] . '.zip'; 291 294 $relative_path = realpath(dirname($path) . '/..'); //for support php5.3 up | dirname($path, 2) php7.0 up; 292 $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();295 $tmp_dir = rtrim(get_temp_dir(), DIRECTORY_SEPARATOR); 293 296 if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) { 294 297 $tmp_dir = ABSPATH . DIRECTORY_SEPARATOR . "wp-content" . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "MXPDEV"; 298 if (!file_exists($tmp_dir) && !is_dir($tmp_dir)) { 299 mkdir($tmp_dir, 0777, true); 300 } 295 301 } 296 302 $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name; -
mxp-dev-tools/trunk/index.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 use SearchReplace; 40 40 use Utility; 41 static $VERSION = '3.1.1 5';41 static $VERSION = '3.1.16'; 42 42 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 43 43 protected static $instance = null; -
mxp-dev-tools/trunk/mxp-login-path.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/mxp-site-manager.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 class MDTSiteManager { 40 40 public $plugin_slug = 'mdt-site-manager'; 41 public static $VERSION = '3.1.1 5';41 public static $VERSION = '3.1.16'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/trunk/mxp-snippets.php
r3103118 r3103196 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1.1 510 * Version: 3.1.1 59 * Stable tag: 3.1.16 10 * Version: 3.1.16 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/readme.txt
r3103118 r3103196 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1.1 58 Stable tag: 3.1.16 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 == Changelog == 79 79 80 = 3.1.1 5=80 = 3.1.16 = 81 81 82 82 * 增加判斷匯出打包目錄是否可寫入,不可寫入則改為輸出至下載目錄處理 83 * 修正暫存下載目錄建立問題 83 84 84 85 = 3.1.14 =
Note: See TracChangeset
for help on using the changeset viewer.