Plugin Directory

Changeset 3041947


Ignore:
Timestamp:
02/27/2024 01:36:18 PM (2 years ago)
Author:
knhar
Message:

news and fixed

Location:
presta-products/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • presta-products/trunk/presta-products.php

    r3041337 r3041947  
    44 * Plugin URI:          https://www.guillaume-bouaud.fr/produit/presta-products-for-wordpress 
    55 * Description:         Affichage des produits Prestashop sur le site internet généré par Wordpress.
    6  * Version:             1.1.23
     6 * Version:             1.1.24
    77 * Requires at least:   5.2
    88 * Requires PHP:        7.2
     
    373373                        // Récupération de la redirection par les fonctions PHP (si la précédente n'a pas marché)
    374374                        if (empty($product->url_rewrite) || !isset($product->url_rewrite)) {
    375                             $product->url_rewrite = get_headers($url_rewrite, 1)['Location'];
     375                            $get_headers = get_headers($url_rewrite, 1);
     376                           
     377                            if (isset($get_headers['Location'])) {
     378                                $product->url_rewrite = $get_headers['Location'];
     379                            }
    376380                        }
    377381                       
     
    467471            // Réinit la base
    468472            $myTable    = $wpdb->prefix.'ppgbo_cache';
    469             $sql        = $wpdb->prepare("TRUNCATE TABLE $myTable");
     473            $sql        = $wpdb->prepare("TRUNCATE TABLE %i", $myTable);
    470474            $wpdb->query($sql) or wp_die(__( 'Problème de réinitialisation du cache.', 'presta-products' ));
    471475           
     
    484488            // Réinit la base
    485489            $myTable    = $wpdb->prefix.'ppgbo_cache';
    486             $sql        = $wpdb->prepare("TRUNCATE TABLE $myTable");
     490            $sql        = $wpdb->prepare("TRUNCATE TABLE %i", $myTable);
    487491            $wpdb->query($sql);
    488492           
     
    852856           
    853857            // Si on est OK
    854             if (isset($result) && !empty($result) && $result->success && $result->data->productId == base64_decode($product) && in_array($result->data->status, array(2,3)) && $result->data->userId == $userId) {
     858            if (isset($result) && !empty($result) && isset($result->success) && isset($result->data) && isset($result->data->productId) && isset($result->data->status) && isset($result->data->userId) && $result->data->productId == base64_decode($product) && in_array($result->data->status, array(2,3)) && $result->data->userId == $userId) {
    855859                return true;
    856860            }
     
    10701074    // Appel aux fichiers assets
    10711075    public function ppgbo_enqueue() {       
    1072         if ($_GET['page'] != 'presta-products') {
     1076        if (!isset($_GET['page']) || $_GET['page'] != 'presta-products') {
    10731077            return;
    10741078        }
     
    10901094    // Appel aux fichiers assets
    10911095    public function ppgbo_admin_enqueue() {     
    1092         if ($_GET['page'] != 'presta-products') {
     1096        if (!isset($_GET['page']) || $_GET['page'] != 'presta-products') {
    10931097            return;
    10941098        }
     
    11541158        $datas      = array();
    11551159        $myTable    = $wpdb->prefix.'ppgbo_cache';
    1156         $sql        = $wpdb->prepare("SELECT * FROM $myTable");       
     1160        $sql        = $wpdb->prepare("SELECT * FROM %i", $myTable);       
    11571161        $elements   = $wpdb->get_results($sql);
    11581162       
  • presta-products/trunk/readme.txt

    r3041335 r3041947  
    66Requires PHP: 5.6
    77Tested up to: 6.4.3
    8 Stable tag: 1.1.23
     8Stable tag: 1.1.24
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6363
    6464== Changelog ==
     65
     66= 1.1.24 = (27/02/2024)
     67* Fixed: quelques correctifs mineurs apportés (PHP8)
    6568
    6669= 1.1.23 = (26/02/2024)
Note: See TracChangeset for help on using the changeset viewer.