🔞 ADULT: Changeset/ - Full Archive

Changeset 3103196


Ignore:
Timestamp:
06/16/2024 08:57:46 AM (19 months ago)
Author:
mxp
Message:

update 3.1.16

Location:
mxp-dev-tools
Files:
1 deleted
7 edited
18 copied

Legend:

Unmodified
Added
Removed
  • mxp-dev-tools/tags/3.1.16/includes/db-optimize.php

    r3103118 r3103196  
    2727        global $wpdb;
    2828        $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);
    3030        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    3131            $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            }
    3235        }
    3336        $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name;
     
    173176            $zip           = new \ZipArchive();
    174177            $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);
    176179            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    177180                $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                }
    178184            }
    179185            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    242248        $database       = sanitize_text_field($_REQUEST['database']);
    243249        $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);
    245251        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    246252            $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            }
    247256        }
    248257        $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name;
     
    319328            case 'METHOD_A':
    320329                ob_end_clean();
     330                header("HTTP/1.1 200 OK\r\n");
    321331                header("Connection: close\r\n");
    322332                ob_start();
     
    325335                header("Content-Length: $size\r\n");
    326336                header("Content-Encoding: application/json\r\n");
    327                 header("HTTP/1.1 200 OK\r\n");
    328337                ob_end_flush();
    329338                ob_get_length() && ob_flush();
     
    337346            default:
    338347                ob_end_clean();
     348                header("HTTP/1.1 200 OK\r\n");
    339349                header("Connection: close\r\n");
    340350                ob_start();
     
    343353                header("Content-Length: $size\r\n");
    344354                header("Content-Encoding: application/json\r\n");
    345                 header("HTTP/1.1 200 OK\r\n");
    346355                ob_end_flush();
    347356                ob_get_length() && ob_flush();
     
    352361                if (function_exists('apache_response_headers')) {
    353362                    $headers = apache_response_headers();
    354                     // header('Connection: close\r\n');
     363                    header("Connection: close\r\n");
    355364                    if (isset($headers['Content-Length'])) {
    356365                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    590599            case 'METHOD_A':
    591600                ob_end_clean();
     601                header("HTTP/1.1 200 OK\r\n");
    592602                header("Connection: close\r\n");
    593603                ob_start();
     
    596606                header("Content-Length: $size\r\n");
    597607                header("Content-Encoding: application/json\r\n");
    598                 header("HTTP/1.1 200 OK\r\n");
    599608                ob_end_flush();
    600609                ob_get_length() && ob_flush();
     
    608617            default:
    609618                ob_end_clean();
     619                header("HTTP/1.1 200 OK\r\n");
    610620                header("Connection: close\r\n");
    611621                ob_start();
     
    614624                header("Content-Length: $size\r\n");
    615625                header("Content-Encoding: application/json\r\n");
    616                 header("HTTP/1.1 200 OK\r\n");
    617626                ob_end_flush();
    618627                ob_get_length() && ob_flush();
     
    623632                if (function_exists('apache_response_headers')) {
    624633                    $headers = apache_response_headers();
    625                     // header('Connection: close\r\n');
     634                    header("Connection: close\r\n");
    626635                    if (isset($headers['Content-Length'])) {
    627636                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    650659            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    651660            $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);
    653662            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    654663                $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                }
    655667            }
    656668            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    709721                        'mxp_dev_default_exclude_dirs',
    710722                        array(
     723                            'MXPDEV',
    711724                            'wp-content/uploads/MXPDEV',
    712725                            'wp-content/uploads/backwpup',
     
    985998            case 'METHOD_A':
    986999                ob_end_clean();
     1000                header("HTTP/1.1 200 OK\r\n");
    9871001                header("Connection: close\r\n");
    9881002                ob_start();
     
    9911005                header("Content-Length: $size\r\n");
    9921006                header("Content-Encoding: application/json\r\n");
    993                 header("HTTP/1.1 200 OK\r\n");
    9941007                ob_end_flush();
    9951008                ob_get_length() && ob_flush();
     
    10031016            default:
    10041017                ob_end_clean();
     1018                header("HTTP/1.1 200 OK\r\n");
    10051019                header("Connection: close\r\n");
    10061020                ob_start();
     
    10091023                header("Content-Length: $size\r\n");
    10101024                header("Content-Encoding: application/json\r\n");
    1011                 header("HTTP/1.1 200 OK\r\n");
    10121025                ob_end_flush();
    10131026                ob_get_length() && ob_flush();
     
    10181031                if (function_exists('apache_response_headers')) {
    10191032                    $headers = apache_response_headers();
    1020                     // header('Connection: close\r\n');
     1033                    header("Connection: close\r\n");
    10211034                    if (isset($headers['Content-Length'])) {
    10221035                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    10451058            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    10461059            $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);
    10481061            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    10491062                $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                }
    10501066            }
    10511067            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    11031119                        'mxp_dev_default_exclude_dirs',
    11041120                        array(
     1121                            'MXPDEV',
    11051122                            'wp-content/uploads/MXPDEV',
    11061123                            'wp-content/uploads/backwpup',
     
    15371554            closedir($folder);
    15381555        }
    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);
    15401557        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    15411558            $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            }
    15421562        }
    15431563        $directory = $tmp_dir . DIRECTORY_SEPARATOR;
  • mxp-dev-tools/tags/3.1.16/includes/plugins-list.php

    r3103118 r3103196  
    273273            }
    274274            $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);
    276276            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    277277                $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                }
    278281            }
    279282            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    290293            $zip_file_name = $split_path[count($split_path) - 2] . '.zip';
    291294            $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);
    293296            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    294297                $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                }
    295301            }
    296302            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
  • mxp-dev-tools/tags/3.1.16/index.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939    use SearchReplace;
    4040    use Utility;
    41     static $VERSION                   = '3.1.15';
     41    static $VERSION                   = '3.1.16';
    4242    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    4343    protected static $instance        = null;
  • mxp-dev-tools/tags/3.1.16/mxp-login-path.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.1.16/mxp-site-manager.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939class MDTSiteManager {
    4040    public $plugin_slug    = 'mdt-site-manager';
    41     public static $VERSION = '3.1.15';
     41    public static $VERSION = '3.1.16';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/tags/3.1.16/mxp-snippets.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.1.16/readme.txt

    r3103118 r3103196  
    66Requires PHP: 5.6
    77Tested up to: 6.5
    8 Stable tag: 3.1.15
     8Stable tag: 3.1.16
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878== Changelog ==
    7979
    80 = 3.1.15 =
     80= 3.1.16 =
    8181
    8282* 增加判斷匯出打包目錄是否可寫入,不可寫入則改為輸出至下載目錄處理
     83* 修正暫存下載目錄建立問題
    8384
    8485= 3.1.14 =
  • mxp-dev-tools/trunk/includes/db-optimize.php

    r3103118 r3103196  
    2727        global $wpdb;
    2828        $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);
    3030        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    3131            $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            }
    3235        }
    3336        $sql_full_path = $tmp_dir . DIRECTORY_SEPARATOR . $sql_name;
     
    173176            $zip           = new \ZipArchive();
    174177            $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);
    176179            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    177180                $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                }
    178184            }
    179185            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    242248        $database       = sanitize_text_field($_REQUEST['database']);
    243249        $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);
    245251        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    246252            $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            }
    247256        }
    248257        $dump_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $dump_file_name;
     
    319328            case 'METHOD_A':
    320329                ob_end_clean();
     330                header("HTTP/1.1 200 OK\r\n");
    321331                header("Connection: close\r\n");
    322332                ob_start();
     
    325335                header("Content-Length: $size\r\n");
    326336                header("Content-Encoding: application/json\r\n");
    327                 header("HTTP/1.1 200 OK\r\n");
    328337                ob_end_flush();
    329338                ob_get_length() && ob_flush();
     
    337346            default:
    338347                ob_end_clean();
     348                header("HTTP/1.1 200 OK\r\n");
    339349                header("Connection: close\r\n");
    340350                ob_start();
     
    343353                header("Content-Length: $size\r\n");
    344354                header("Content-Encoding: application/json\r\n");
    345                 header("HTTP/1.1 200 OK\r\n");
    346355                ob_end_flush();
    347356                ob_get_length() && ob_flush();
     
    352361                if (function_exists('apache_response_headers')) {
    353362                    $headers = apache_response_headers();
    354                     // header('Connection: close\r\n');
     363                    header("Connection: close\r\n");
    355364                    if (isset($headers['Content-Length'])) {
    356365                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    590599            case 'METHOD_A':
    591600                ob_end_clean();
     601                header("HTTP/1.1 200 OK\r\n");
    592602                header("Connection: close\r\n");
    593603                ob_start();
     
    596606                header("Content-Length: $size\r\n");
    597607                header("Content-Encoding: application/json\r\n");
    598                 header("HTTP/1.1 200 OK\r\n");
    599608                ob_end_flush();
    600609                ob_get_length() && ob_flush();
     
    608617            default:
    609618                ob_end_clean();
     619                header("HTTP/1.1 200 OK\r\n");
    610620                header("Connection: close\r\n");
    611621                ob_start();
     
    614624                header("Content-Length: $size\r\n");
    615625                header("Content-Encoding: application/json\r\n");
    616                 header("HTTP/1.1 200 OK\r\n");
    617626                ob_end_flush();
    618627                ob_get_length() && ob_flush();
     
    623632                if (function_exists('apache_response_headers')) {
    624633                    $headers = apache_response_headers();
    625                     // header('Connection: close\r\n');
     634                    header("Connection: close\r\n");
    626635                    if (isset($headers['Content-Length'])) {
    627636                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    650659            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    651660            $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);
    653662            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    654663                $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                }
    655667            }
    656668            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    709721                        'mxp_dev_default_exclude_dirs',
    710722                        array(
     723                            'MXPDEV',
    711724                            'wp-content/uploads/MXPDEV',
    712725                            'wp-content/uploads/backwpup',
     
    985998            case 'METHOD_A':
    986999                ob_end_clean();
     1000                header("HTTP/1.1 200 OK\r\n");
    9871001                header("Connection: close\r\n");
    9881002                ob_start();
     
    9911005                header("Content-Length: $size\r\n");
    9921006                header("Content-Encoding: application/json\r\n");
    993                 header("HTTP/1.1 200 OK\r\n");
    9941007                ob_end_flush();
    9951008                ob_get_length() && ob_flush();
     
    10031016            default:
    10041017                ob_end_clean();
     1018                header("HTTP/1.1 200 OK\r\n");
    10051019                header("Connection: close\r\n");
    10061020                ob_start();
     
    10091023                header("Content-Length: $size\r\n");
    10101024                header("Content-Encoding: application/json\r\n");
    1011                 header("HTTP/1.1 200 OK\r\n");
    10121025                ob_end_flush();
    10131026                ob_get_length() && ob_flush();
     
    10181031                if (function_exists('apache_response_headers')) {
    10191032                    $headers = apache_response_headers();
    1020                     // header('Connection: close\r\n');
     1033                    header("Connection: close\r\n");
    10211034                    if (isset($headers['Content-Length'])) {
    10221035                        // header('Content-Length: ' . $headers['Content-Length'] . "\r\n");
     
    10451058            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    10461059            $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);
    10481061            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    10491062                $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                }
    10501066            }
    10511067            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    11031119                        'mxp_dev_default_exclude_dirs',
    11041120                        array(
     1121                            'MXPDEV',
    11051122                            'wp-content/uploads/MXPDEV',
    11061123                            'wp-content/uploads/backwpup',
     
    15371554            closedir($folder);
    15381555        }
    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);
    15401557        if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    15411558            $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            }
    15421562        }
    15431563        $directory = $tmp_dir . DIRECTORY_SEPARATOR;
  • mxp-dev-tools/trunk/includes/plugins-list.php

    r3103118 r3103196  
    273273            }
    274274            $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);
    276276            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    277277                $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                }
    278281            }
    279282            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
     
    290293            $zip_file_name = $split_path[count($split_path) - 2] . '.zip';
    291294            $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);
    293296            if ((defined('MDT_TMP_DIR') && MDT_TMP_DIR != 'TMP') || !is_writable($tmp_dir)) {
    294297                $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                }
    295301            }
    296302            $zip_file_path = $tmp_dir . DIRECTORY_SEPARATOR . $zip_file_name;
  • mxp-dev-tools/trunk/index.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939    use SearchReplace;
    4040    use Utility;
    41     static $VERSION                   = '3.1.15';
     41    static $VERSION                   = '3.1.16';
    4242    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    4343    protected static $instance        = null;
  • mxp-dev-tools/trunk/mxp-login-path.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/mxp-site-manager.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939class MDTSiteManager {
    4040    public $plugin_slug    = 'mdt-site-manager';
    41     public static $VERSION = '3.1.15';
     41    public static $VERSION = '3.1.16';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/trunk/mxp-snippets.php

    r3103118 r3103196  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.5
    9  * Stable tag: 3.1.15
    10  * Version: 3.1.15
     9 * Stable tag: 3.1.16
     10 * Version: 3.1.16
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/readme.txt

    r3103118 r3103196  
    66Requires PHP: 5.6
    77Tested up to: 6.5
    8 Stable tag: 3.1.15
     8Stable tag: 3.1.16
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878== Changelog ==
    7979
    80 = 3.1.15 =
     80= 3.1.16 =
    8181
    8282* 增加判斷匯出打包目錄是否可寫入,不可寫入則改為輸出至下載目錄處理
     83* 修正暫存下載目錄建立問題
    8384
    8485= 3.1.14 =
Note: See TracChangeset for help on using the changeset viewer.