Plugin Directory

Changeset 3076572


Ignore:
Timestamp:
04/24/2024 03:18:07 PM (22 months ago)
Author:
mxp
Message:

update 3.1.2

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

Legend:

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

    r3067061 r3076572  
    2727        global $wpdb;
    2828        $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;
    3031        $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;
    3233        // error_log($sql_full_path);
    3334        $fp = fopen($sql_full_path, 'w');
     
    169170            $zip           = new \ZipArchive();
    170171            $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;
    172174            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    173175            if ($zip) {
     
    234236        $database       = sanitize_text_field($_REQUEST['database']);
    235237        $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;
    237240        $table          = $wpdb->options;
    238241        $column         = 'option_name';
     
    488491                break;
    489492            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' => '發生錯誤,匯出發生錯誤作業中斷'));
    491494                exit;
    492495                break;
     
    620623            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    621624            $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;
    623627            //清除當前打包檔案
    624628            if (file_exists($zip_file_path)) {
     
    10171021            closedir($folder);
    10181022        }
    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;
    10201025        $files     = scandir($directory);
    10211026        foreach ($files as $file) {
  • mxp-dev-tools/tags/3.1.2/includes/plugins-list.php

    r3035023 r3076572  
    270270            }
    271271            $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;
    273274            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    274275            if (!$zip) {
     
    283284            $zip_file_name = $split_path[count($split_path) - 2] . '.zip';
    284285            $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;
    286288            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    287289            if (!$zip) {
  • mxp-dev-tools/tags/3.1.2/index.php

    r3072940 r3076572  
    44 * Plugin URI: https://goo.gl/2gLq18
    55 * Description: 一介資男の常用外掛整理與常用開發功能整合外掛。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
     
    2626    use SearchReplace;
    2727    use Utility;
    28     static $VERSION                   = '3.1.1';
     28    static $VERSION                   = '3.1.2';
    2929    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    3030    protected static $instance        = null;
  • mxp-dev-tools/tags/3.1.2/mxp-login-path.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 隱藏後台登入位置工具。啟用即更改預設登入網址為 /admin-staff/
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.1.2/mxp-site-manager.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 管理多個 WordPress 站點的工具。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
     
    3535class MDTSiteManager {
    3636    public $plugin_slug    = 'mdt-site-manager';
    37     public static $VERSION = '3.1.1';
     37    public static $VERSION = '3.1.2';
    3838
    3939    public function __construct() {
  • mxp-dev-tools/tags/3.1.2/mxp-snippets.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 整合 GitHub 中常用的程式碼片段。請注意,並非所有網站都適用全部的選項,有進階需求可以透過設定 wp-config.php 中此外掛預設常數,啟用或停用部分功能。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.1.2/readme.txt

    r3072940 r3076572  
    66Requires PHP: 5.6
    77Tested up to: 6.5
    8 Stable tag: 3.1.1
     8Stable tag: 3.1.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878
    7979== Changelog ==
     80
     81= 3.1.2 =
     82
     83* 修正打包暫存目錄使用的 sys_get_temp_dir() 方法
    8084
    8185= 3.1.1 =
  • mxp-dev-tools/trunk/includes/db-optimize.php

    r3067061 r3076572  
    2727        global $wpdb;
    2828        $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;
    3031        $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;
    3233        // error_log($sql_full_path);
    3334        $fp = fopen($sql_full_path, 'w');
     
    169170            $zip           = new \ZipArchive();
    170171            $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;
    172174            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    173175            if ($zip) {
     
    234236        $database       = sanitize_text_field($_REQUEST['database']);
    235237        $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;
    237240        $table          = $wpdb->options;
    238241        $column         = 'option_name';
     
    488491                break;
    489492            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' => '發生錯誤,匯出發生錯誤作業中斷'));
    491494                exit;
    492495                break;
     
    620623            $zip_file_name    = $split_path[count($split_path) - 2] . '.zip';
    621624            $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;
    623627            //清除當前打包檔案
    624628            if (file_exists($zip_file_path)) {
     
    10171021            closedir($folder);
    10181022        }
    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;
    10201025        $files     = scandir($directory);
    10211026        foreach ($files as $file) {
  • mxp-dev-tools/trunk/includes/plugins-list.php

    r3035023 r3076572  
    270270            }
    271271            $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;
    273274            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    274275            if (!$zip) {
     
    283284            $zip_file_name = $split_path[count($split_path) - 2] . '.zip';
    284285            $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;
    286288            $zip->open($zip_file_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    287289            if (!$zip) {
  • mxp-dev-tools/trunk/index.php

    r3072940 r3076572  
    44 * Plugin URI: https://goo.gl/2gLq18
    55 * Description: 一介資男の常用外掛整理與常用開發功能整合外掛。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
     
    2626    use SearchReplace;
    2727    use Utility;
    28     static $VERSION                   = '3.1.1';
     28    static $VERSION                   = '3.1.2';
    2929    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    3030    protected static $instance        = null;
  • mxp-dev-tools/trunk/mxp-login-path.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 隱藏後台登入位置工具。啟用即更改預設登入網址為 /admin-staff/
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/mxp-site-manager.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 管理多個 WordPress 站點的工具。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
     
    3535class MDTSiteManager {
    3636    public $plugin_slug    = 'mdt-site-manager';
    37     public static $VERSION = '3.1.1';
     37    public static $VERSION = '3.1.2';
    3838
    3939    public function __construct() {
  • mxp-dev-tools/trunk/mxp-snippets.php

    r3072940 r3076572  
    44 * Plugin URI: https://tw.wordpress.org/plugins/mxp-dev-tools/
    55 * Description: 整合 GitHub 中常用的程式碼片段。請注意,並非所有網站都適用全部的選項,有進階需求可以透過設定 wp-config.php 中此外掛預設常數,啟用或停用部分功能。
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Author: Chun
    88 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/readme.txt

    r3072940 r3076572  
    66Requires PHP: 5.6
    77Tested up to: 6.5
    8 Stable tag: 3.1.1
     8Stable tag: 3.1.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878
    7979== Changelog ==
     80
     81= 3.1.2 =
     82
     83* 修正打包暫存目錄使用的 sys_get_temp_dir() 方法
    8084
    8185= 3.1.1 =
Note: See TracChangeset for help on using the changeset viewer.