Plugin Directory

Changeset 2791735


Ignore:
Timestamp:
09/29/2022 08:28:10 AM (4 years ago)
Author:
soflyy
Message:

Release a new version - 3.6.9

Location:
wp-all-import
Files:
638 added
13 edited

Legend:

Unmodified
Added
Removed
  • wp-all-import/trunk/classes/PHPExcel/Calculation.php

    r2604971 r2791735  
    33473347                    //    If the last entry on the stack was a : operator, then we have a cell range reference
    33483348                    $testPrevOp = $stack->last(1);
    3349                     if ($testPrevOp['value'] == ':') {
     3349                    if (isset($testPrevOp['value']) && $testPrevOp['value'] == ':') {
    33503350                        //    If we have a worksheet reference, then we're playing with a 3D reference
    33513351                        if ($matches[2] == '') {
  • wp-all-import/trunk/classes/PHPExcel/Reader/CSV.php

    r1559996 r2791735  
    227227    public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
    228228    {
    229         $lineEnding = ini_get('auto_detect_line_endings');
    230         ini_set('auto_detect_line_endings', true);
     229        if (version_compare(phpversion(), '8.1', '<')) {
     230            $lineEnding = ini_get( 'auto_detect_line_endings' );
     231            ini_set( 'auto_detect_line_endings', true );
     232        }
    231233
    232234        // Open file
     
    285287        }
    286288
    287         ini_set('auto_detect_line_endings', $lineEnding);
     289        if (version_compare(phpversion(), '8.1', '<')) {
     290            ini_set( 'auto_detect_line_endings', $lineEnding );
     291        }
    288292
    289293        // Return
  • wp-all-import/trunk/classes/PHPExcel/Reader/Excel2007.php

    r1559996 r2791735  
    546546                        }
    547547
    548                         foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
    549                             $numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
    550                             if ($numFmts && $xf["numFmtId"]) {
    551                                 $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
    552                                 if (isset($tmpNumFmt["formatCode"])) {
    553                                     $numFmt = (string) $tmpNumFmt["formatCode"];
    554                                 } elseif ((int)$xf["numFmtId"] < 165) {
    555                                     $numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
    556                                 }
    557                             }
    558 
    559                             $cellStyle = (object) array(
    560                                 "numFmt" => $numFmt,
    561                                 "font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
    562                                 "fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
    563                                 "border" => $xmlStyles->borders->border[intval($xf["borderId"])],
    564                                 "alignment" => $xf->alignment,
    565                                 "protection" => $xf->protection,
    566                                 "quotePrefix" => $quotePrefix,
    567                             );
    568                             $cellStyles[] = $cellStyle;
    569 
    570                             // add style to cellStyleXf collection
    571                             $objStyle = new PHPExcel_Style;
    572                             self::readStyle($objStyle, $cellStyle);
    573                             $excel->addCellStyleXf($objStyle);
     548                        if (!empty($xmlStyles->cellStyleXfs->xf) && is_array($xmlStyles->cellStyleXfs->xf)) {
     549                            foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
     550                                $numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
     551                                if ($numFmts && $xf["numFmtId"]) {
     552                                    $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
     553                                    if (isset($tmpNumFmt["formatCode"])) {
     554                                        $numFmt = (string) $tmpNumFmt["formatCode"];
     555                                    } elseif ((int)$xf["numFmtId"] < 165) {
     556                                        $numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
     557                                    }
     558                                }
     559
     560                                $cellStyle = (object) array(
     561                                    "numFmt" => $numFmt,
     562                                    "font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
     563                                    "fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
     564                                    "border" => $xmlStyles->borders->border[intval($xf["borderId"])],
     565                                    "alignment" => $xf->alignment,
     566                                    "protection" => $xf->protection,
     567                                    "quotePrefix" => $quotePrefix,
     568                                );
     569                                $cellStyles[] = $cellStyle;
     570
     571                                // add style to cellStyleXf collection
     572                                $objStyle = new PHPExcel_Style;
     573                                self::readStyle($objStyle, $cellStyle);
     574                                $excel->addCellStyleXf($objStyle);
     575                            }
    574576                        }
    575577                    }
     
    16851687                    if ((!$this->readDataOnly) || (!empty($this->loadSheetsOnly))) {
    16861688                        // active sheet index
    1687                         $activeTab = intval($xmlWorkbook->bookViews->workbookView["activeTab"]); // refers to old sheet index
     1689                        if(isset($xmlWorkbook->bookViews->workbookView["activeTab"])) {
     1690                            $activeTab = intval( $xmlWorkbook->bookViews->workbookView["activeTab"] ); // refers to old sheet index
     1691                        }else{
     1692                            $activeTab = false;
     1693                        }
    16881694
    16891695                        // keep active sheet index if sheet is still loaded, else first sheet is set as the active
  • wp-all-import/trunk/classes/PHPExcel/Reader/Excel5.php

    r2604971 r2791735  
    38383838            if (!$this->readDataOnly) {
    38393839                // add cell style
    3840                 $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);
     3840                if ( array_key_exists( $xfIndex, $this->mapCellXfIndex ) ) {
     3841                    $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);
     3842                }
    38413843            }
    38423844
     
    41784180                if (!$this->readDataOnly) {
    41794181                    // add cell style
    4180                     $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);
     4182                    if ( array_key_exists( $xfIndex, $this->mapCellXfIndex ) ) {
     4183                        $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]);
     4184                    }
    41814185                }
    41824186            }
  • wp-all-import/trunk/classes/PHPExcel/Settings.php

    r2788737 r2791735  
    363363            $options = LIBXML_DTDLOAD | LIBXML_DTDATTR;
    364364        }
    365         if (version_compare(PHP_VERSION, '5.2.11') >= 0 && \LIBXML_VERSION < 20900) {
     365
     366        // Only use the function in PHP/libxml versions where it exists.
     367        if (version_compare(PHP_VERSION, '5.2.11') >= 0 && \LIBXML_VERSION < 20900) {
    366368            @libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
    367369        }
     
    380382            self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
    381383        }
    382         if (version_compare(PHP_VERSION, '5.2.11') >= 0 && \LIBXML_VERSION < 20900) {
     384
     385        // Only use the function in PHP/libxml versions where it exists.
     386        if (version_compare(PHP_VERSION, '5.2.11') >= 0 && \LIBXML_VERSION < 20900) {
    383387            @libxml_disable_entity_loader(self::$libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
    384388        }
  • wp-all-import/trunk/classes/PHPExcel/Shared/OLE.php

    r2604971 r2791735  
    287287                    break;
    288288                default:
    289                     continue;
     289                    continue 2;
     290                    break;
    290291            }
    291292            fseek($fh, 1, SEEK_CUR);
  • wp-all-import/trunk/classes/PHPExcel/Shared/ZipArchive.php

    r2633722 r2791735  
    44    define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR);
    55}
    6 require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
    76
     7if (!class_exists('WpaiPclZip')) require_once(PMXI_Plugin::ROOT_DIR.'/libraries/wpaipclzip.lib.php');
    88/**
    99 * PHPExcel_Shared_ZipArchive
     
    6363    {
    6464        $this->tempDir = PHPExcel_Shared_File::sys_get_temp_dir();
    65         $this->zip = new PclZip($fileName);
     65        $this->zip = new WpaiPclZip($fileName);
    6666
    6767        return true;
  • wp-all-import/trunk/classes/PHPExcel/locale/es/config

    r2071386 r2791735  
    3838##
    3939##  Excel Error Codes   (For future use)
    40 
    4140##
    4241NULL    = #¡NULO!
  • wp-all-import/trunk/classes/PHPExcel/locale/pt/br/config

    r2071386 r2791735  
    3838##
    3939##  Excel Error Codes   (For future use)
    40 
    4140##
    4241NULL    = #NULO!
  • wp-all-import/trunk/classes/upload.php

    r2749264 r2791735  
    6060            } elseif (preg_match('%\W(zip)$%i', trim(basename($this->file)))) {
    6161
    62                 if (!class_exists('PclZip')) {
    63                     require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
    64                 }
    65 
    66                 $archive = new PclZip($this->file);
    67                 if (($v_result_list = $archive->extract(PCLZIP_OPT_PATH, $this->uploadsPath, PCLZIP_OPT_REPLACE_NEWER)) == 0) {
     62                if (!class_exists('WpaiPclZip')) include_once(PMXI_Plugin::ROOT_DIR.'/libraries/wpaipclzip.lib.php');
     63
     64                $archive = new WpaiPclZip($this->file);
     65
     66                // Attempt to extract files.
     67                $v_result_list = $archive->extract(PCLZIP_OPT_PATH, $this->uploadsPath, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_EXTRACT_DIR_RESTRICTION, $this->uploadsPath, PCLZIP_OPT_EXTRACT_EXT_RESTRICTIONS, ['php','phtml','htaccess']);
     68                if (empty($v_result_list) || !is_array($v_result_list) && $v_result_list < 1) {
    6869                    $this->errors->add('form-validation', __('WP All Import couldn\'t find a file to import inside your ZIP.<br/><br/>Either the .ZIP file is broken, or doesn\'t contain a file with an extension of  XML, CSV, PSV, DAT, or TXT. <br/>Please attempt to unzip your .ZIP file on your computer to ensure it is a valid .ZIP file which can actually be unzipped, and that it contains a file which WP All Import can import.', 'wp_all_import_plugin'));
    6970                } else {
     
    317318                    }
    318319
    319                     if (!class_exists('PclZip'))  {
    320                         require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
    321                     }
    322 
    323                     $archive = new PclZip($tmpname);
    324                     if (($v_result_list = $archive->extract(PCLZIP_OPT_PATH, $this->uploadsPath, PCLZIP_OPT_REPLACE_NEWER)) == 0) {
     320                    if (!class_exists('WpaiPclZip')) include_once(PMXI_Plugin::ROOT_DIR.'/libraries/wpaipclzip.lib.php');
     321
     322                    $archive = new WpaiPclZip($tmpname);
     323
     324                    // Attempt to extract files.
     325                    $v_result_list = $archive->extract(PCLZIP_OPT_PATH, $this->uploadsPath, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_EXTRACT_DIR_RESTRICTION, $this->uploadsPath, PCLZIP_OPT_EXTRACT_EXT_RESTRICTIONS, ['php','phtml','htaccess']);
     326                    if (empty($v_result_list) || !is_array($v_result_list) && $v_result_list < 1) {
    325327                        $this->errors->add('form-validation', __('WP All Import couldn\'t find a file to import inside your ZIP.<br/><br/>Either the .ZIP file is broken, or doesn\'t contain a file with an extension of  XML, CSV, PSV, DAT, or TXT. <br/>Please attempt to unzip your .ZIP file on your computer to ensure it is a valid .ZIP file which can actually be unzipped, and that it contains a file which WP All Import can import.', 'wp_all_import_plugin'));
    326328                    } else {
  • wp-all-import/trunk/models/import/record.php

    r2736112 r2791735  
    35463546    }
    35473547
    3548     public function downloadFile($url, $image_filepath, $is_cron = false, $logger, $type = 'images'){
     3548    public function downloadFile($url, $image_filepath, $is_cron, $logger, $type = 'images'){
    35493549
    35503550        $downloaded = false;
  • wp-all-import/trunk/plugin.php

    r2749264 r2791735  
    44Plugin URI: http://www.wpallimport.com/wordpress-xml-csv-import/?utm_source=import-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
    55Description: The most powerful solution for importing XML and CSV files to WordPress. Create Posts and Pages with content from any XML or CSV file. A paid upgrade to WP All Import Pro is available for support and additional features.
    6 Version: 3.6.8
     6Version: 3.6.9
    77Author: Soflyy
    88*/
     
    2626define('WP_ALL_IMPORT_PREFIX', 'pmxi_');
    2727
    28 define('PMXI_VERSION', '3.6.8');
     28define('PMXI_VERSION', '3.6.9');
    2929
    3030define('PMXI_EDITION', 'free');
  • wp-all-import/trunk/readme.txt

    r2764127 r2791735  
    33Requires at least: 4.1
    44Tested up to: 6.0
    5 Stable tag: 3.6.8
     5Stable tag: 3.6.9
    66Tags: wordpress csv import, wordpress xml import, xml, csv, datafeed, import, migrate, import csv to wordpress, import xml to wordpress, advanced xml import, advanced csv import, bulk csv import, bulk xml import, bulk data import, xml to custom post type, csv to custom post type, woocommerce csv import, woocommerce xml import, csv import, import csv, xml import, import xml, csv importer
    77
     
    113113
    114114== Changelog ==
     115
     116= 3.6.9 =
     117* security improvement
     118* improvement: resolve PHP 8 Deprecated notice
    115119
    116120= 3.6.8 =
Note: See TracChangeset for help on using the changeset viewer.