Plugin Directory

Changeset 2508832


Ignore:
Timestamp:
04/04/2021 07:51:49 AM (5 years ago)
Author:
spreadsheetconverter
Message:

10.1.2 removes a rare error that may occur when the calculator name contains dots.

Location:
import-spreadsheets-from-microsoft-excel
Files:
38 added
3 edited

Legend:

Unmodified
Added
Removed
  • import-spreadsheets-from-microsoft-excel/trunk/changelog.txt

    r2443245 r2508832  
    11== Changelog ==
     2
     3= 10.1.2 =
     4
     5* Under very rare circumstances, WordPress would add one or more underscores to the name of a folder for uploaded content. When our code generated links to the folder, these underscores were not included, which caused the links to break.
    26
    37= 10.1.1 =
  • import-spreadsheets-from-microsoft-excel/trunk/import-spreadsheets-from-microsoft-excel.php

    r2443247 r2508832  
    33 *
    44Plugin Name: Import Spreadsheets from Microsoft Excel
    5 Plugin URI: https://www.spreadsheetconverter.com/support/online-help/help-wordpress-plugin-to-import-spreadsheets-from-microsoft-excel
     5Plugin URI: https://help.spreadsheetconverter.com/support/online-help/ssc-help-wordpress-plugin-to-import-spreadsheets-from-microsoft-excel/
    66Description: Import Spreadsheets from Microsoft Excel
    7 Version: 10.1.1
     7Version: 10.1.2
    88Author: SpreadsheetConverter
    9 Author URI: http://www.spreadsheetconverter.com
     9Author URI: https://www.spreadsheetconverter.com
    1010Text Domain: SpreadsheetConverter
    1111License: GPLv2 or later
     
    1616 *
    1717
    18 Copyright (C) 2019-2020  SpreadsheetConverter, http://www.spreadsheetconverter.com
     18Copyright (C) 2019-2021  SpreadsheetConverter, http://www.spreadsheetconverter.com
    1919This program is free software: you can redistribute it and/or modify
    2020it under the terms of the GNU General Public License as published by
     
    228228    endif;
    229229
    230     $fileurl    = esc_url( get_post_meta( $postid, 'wp_custom_attachment', true ) );
     230    $fileurl    = get_post_meta( $postid, 'wp_custom_attachment', true );
    231231    $height     = intval( get_post_meta( $postid, 'wp_custom_attachment_height', true ) );
    232232    $width      = intval( get_post_meta( $postid, 'wp_custom_attachment_width', true ) );
     
    468468    //     return $id;
    469469    // }
    470 
    471470    $folder_name    = basename( sanitize_file_name( $_FILES['wp_custom_attachment']['name'] ),".zip" );
    472471
     
    480479   
    481480    $source         = $_FILES['wp_custom_attachment']['tmp_name'];
    482     $target_path    = $pub_dir."/". sanitize_file_name( $_FILES['wp_custom_attachment']['name'] );
     481    $target_path    = $pub_dir."/".$folder_name.'.zip';
    483482
    484483    // change this to the correct site path
     
    519518
    520519                }
     520
    521521                // change this to the correct site path
    522522                $zip->extractTo( $pub_dir.'/');
    523                
    524523                if ( true === $rename ){
    525524                    //rename folder to sanitize name
    526                     rename( $pub_dir .'/'. $pathall[0] , $pub_dir .'/'. sanitize_file_name( $pathall[0] ) );
     525                    rename( $pub_dir .'/'. $pathall[0] , $pub_dir .'/'. $folder_name );
    527526
    528527                    //reanme file to sanitize name
    529                     if( file_exists( $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. $pathall[0] . '.htm'  ) ) {
    530                         $oldname = $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. $pathall[0] . '.htm';
    531                         $sanitize_name = $pub_dir .'/'. sanitize_file_name( $pathall[0] ) .'/'. sanitize_file_name( $pathall[0] ) . '.htm';
     528                    if( file_exists( $pub_dir .'/'. $folder_name .'/'. $pathall[0] . '.htm'  ) ) {
     529                        $oldname = $pub_dir .'/'. $folder_name .'/'. $pathall[0] . '.htm';
     530                        $sanitize_name = $pub_dir .'/'. $folder_name .'/'. $folder_name . '.htm';
    532531                        copy( $oldname ,  $sanitize_name );
    533532                        wp_delete_file( $oldname );
  • import-spreadsheets-from-microsoft-excel/trunk/readme.txt

    r2505217 r2508832  
    77Tested up to: 5.7
    88Requires PHP: 5.2.4
    9 Stable tag: 10.1.1
     9Stable tag: 10.1.2
    1010
    1111Import live, calculating spreadsheets from Microsoft Excel to WordPress. The uploaded online spreadsheet is live, and looks and feels like in Excel.
     
    357357== Changelog ==
    358358
     359= 10.1.2 =
     360
     361* Under very rare circumstances, WordPress would add one or more underscores to the name of a folder for uploaded content. When our code generated links to the folder, these underscores were not included, which caused the links to break.
     362
    359363= 10.1.1 =
    360364
    361 * Added support for PHP 8.
     365* $row array issue fixes.
     366* zip file open/read issue fixed for PHP version 8.
     367* getting zip file name function changed.
    362368
    363369= 10.1 =
Note: See TracChangeset for help on using the changeset viewer.