Plugin Directory

Changeset 2562808


Ignore:
Timestamp:
07/12/2021 12:08:23 PM (5 years ago)
Author:
avisverifies
Message:
  • Less utilisation of SQL Queries
  • Various bugfix
Location:
netreviews/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • netreviews/trunk/api_functions.php

    r2537184 r2562808  
    242242
    243243                    //We retrieve product details depending if WPML is enable or not. (Specific URL product and ID_product)
    244                     $WpmlEnable = ntav_getWpmlEnable();
     244                    $WpmlEnable = ntav_getWpmlEnable($message['lang_code']);
    245245                    if($WpmlEnable == "yes"){
    246246                        global $wpdb;
     
    295295    $reponse['debug']['produit'] = $allowedProducts;
    296296    $reponse['debug']['no_flag'] = $message['no_flag'];
     297    $reponse['debug']['lang'] =  $message['lang_code'];
     298    $reponse['debug']['wpml'] =  $WpmlEnable;
    297299    return $reponse;
    298300}
     
    329331            $table = 'AVERAGE';
    330332            // where data
    331             $where = array('ref_product' => $data['ref_product'], 'lang' => $message['lang_code']);
     333            // $where = array('ref_product' => $data['ref_product'], 'lang' => $message['lang_code']);
     334            $where = array('ref_product' => $data['ref_product']);
    332335            // check if value exist
    333336
     
    351354            $table = 'REVIEWS';
    352355            // where data
    353             $where = array('id_product_av' => $data['id_product_av'], 'lang' => $message['lang_code']);
     356            // $where = array('id_product_av' => $data['id_product_av'], 'lang' => $message['lang_code']);
     357            $where = array('id_product_av' => $data['id_product_av']);
    354358            // check if value exist
    355359            $res = ntav_apiSelectExist($table, $where);
     
    433437    global $wpdb;
    434438
    435    $WpmlEnable = ntav_getWpmlEnable();
     439    $WpmlEnable = ntav_getWpmlEnable($lang);
    436440 
    437441     if($WpmlEnable == "yes"){
  • netreviews/trunk/changelog.txt

    r2537184 r2562808  
    1 Version 2.3.7 / 15/03/2021
     1Version 2.3.8 / 25/05/2021
     2- Less utilisation of SQL Queries
     3- Various bugfix
     4
     5Version 2.3.7 / 15/03/2021
    26- Performance optimisation on install
    37
  • netreviews/trunk/functions.php

    r2537184 r2562808  
    55function ntav_update_version_plugin()
    66{
    7     ntav_updateValue('MODVERSION', '2.3.7');
     7    ntav_updateValue('MODVERSION', '2.3.8');
    88}
    99
     
    124124function ntav_getConfig($name, $lang='')
    125125{
    126 
    127     global $wpdb;
    128     $getResults =  ntav_getWpmlEnable();
    129 
    130     if($getResults == "yes" && $lang !='non'){
    131 
    132     $query = "SELECT value FROM " . $wpdb->prefix . "netreviews_configuration WHERE name = '" . $name . "' AND lang_code='" . $lang . "'";
    133         $myrows = $wpdb->get_results($query);
    134 
    135          if(!empty($myrows)) {
    136 
    137             return $myrows[0]->value;
    138         }
    139         else{return NULL;}
    140     }
    141 
    142     else{
    143     $query = "SELECT value FROM " . $wpdb->prefix . "netreviews_configuration WHERE name = '" . $name . "' AND lang_code IS NULL";
     126    global $wpdb;
     127    $lang_filter = ($lang && $lang !='non')?  " AND lang_code='" . $lang . "'": " AND lang_code IS NULL " ;
     128    $query = "SELECT value FROM " . $wpdb->prefix . "netreviews_configuration WHERE name = '" . $name . "'". $lang_filter;
    144129    $myrows = $wpdb->get_results($query);
    145 
    146         if (!empty($myrows)) {
    147             return $myrows[0]->value;
    148         }
    149         else{return NULL;}
    150     }
    151 
     130    if (!empty($myrows)) {
     131        return $myrows[0]->value;
     132    }
    152133}
    153134
     
    605586
    606587        return $avg;
    607     } else {
    608         return false;
    609588    }
    610589}
     
    798777 */
    799778
    800 function ntav_getWpmlEnable(){
    801 
    802 global $wpdb;
    803 if(ntav_create_table_conf()) {
    804     $WpmlConfig = $wpdb->get_var("SELECT value  FROM " . $wpdb->prefix . "netreviews_configuration WHERE name='WPMLENABLE';");
    805 }
    806 
    807 return $WpmlConfig;
    808 
     779function ntav_getWpmlEnable($lang=''){
     780    $wpmlActive = ntav_getConfig('WPMLENABLE', $lang);
     781    return $wpmlActive;
    809782}
    810783
  • netreviews/trunk/includes/av_backoffice.php

    r2537184 r2562808  
    389389                                value="<?php if (isset($s_keyArray[$key]) && $s_keyArray[$key]!= NULL) : echo "$s_keyArray[$key]"; endif; ?>"/>
    390390                    </div>
    391                     <img src='../wp-content/plugins/sitepress-multilingual-cms/res/flags/<?php echo $value; ?>' height="50px" style="float: right;">
     391                    <img src='../wp-content/plugins/sitepress-multilingual-cms/res/flags/<?php echo $value; ?>' alt='<?php echo $value; ?>' height="50px" style="float: right;">
    392392                    <div class="form-group">
    393393                        <label for="id_web"><b><?php _e('ID Website : ', 'av'); ?></b></label><input
  • netreviews/trunk/includes/js/carousel.js

    r1859148 r2562808  
    203203            var newImg = new Image();
    204204            newImg.onload = function () {
    205                 modalContent.innerHTML = "<img id='netreviews_media_image' src='" + dataSrc + "'/>";
     205                modalContent.innerHTML = "<img id='netreviews_media_image' alt='netreviews_media_image' src='" + dataSrc + "'/>";
    206206                resizeMedia('netreviews_media_image', newImg.height, newImg.width);
    207207                modal.style.display = 'block';
  • netreviews/trunk/netreviews.php

    r2537184 r2562808  
    99 * Description: We provide you with a solution that enables you to collect customer reviews about your website and products which will show on your
    1010 * website and on a attestation which will increase the credibility of published reviews.
    11  * Version: 2.3.7
     11 * Version: 2.3.8
    1212 * Author: NetReviews SAS <contact@avis-verifies.com>
    1313 * Author URI: www.avis-verifies.com
  • netreviews/trunk/readme.txt

    r2537184 r2562808  
    5757
    5858== Changelog ==
     59Version 2.3.8 / 25/05/2021
     60- Less utilisation of SQL Queries
     61- Various bugfix
     62
     63Version 2.3.7 / 15/03/2021
     64- Performance optimisation on install
     65
     66Version 2.3.6 / 06/10/2020
     67- Fix number of stars displayed with badge 2
     68- Adapt product name and url to WPML lang when exporting CSV orders
     69
     70Version 2.3.5 / 26/08/2020
     71- Add shortcodes for stars and tab content on product pages
     72- Fix encoding in customers names and format date in exchanges
     73- Fix get_user_locale in case WP version < 4.7
     74- Fix scroll to tab content when reviews block not in a tab
     75- Add product url in Json Rich Snippets
     76
     77Version 2.3.4 / 23/06/2020
     78- Fix missing traductions
     79
     80Version 2.3.3 / 05/06/2020
     81- Several bug fixes and usability improvements
     82
     83Version: 2.3.2  / 22/05/2020
     84- Uninstall tables when uninstall hook instead of deactivation hook
     85- Select template if not chosen
     86
     87Version: 2.3.2  / 22/05/2020
     88- Uninstall tables when uninstall hook instead of deactivation hook
     89- Select template if not chosen
     90
     91Version: 2.3.1  / 05/05/2020
     92- Fix override of datepicker format date in Back-Office manual export
     93
     94Version: 2.3.0  / 30/03/2020
     95- Reviews synchronisation json format
     96- Add option to select template V2
     97- Fix responsive Back-Office
     98- Fix RS
     99- Fix collecting orders with WPML
     100
     101Version: 2.1.7  / 07/02/2020
     102- Fix js datepicker back-office
     103
     104Version: 2.1.7  / 31/01/2020
     105- Add option to select template V2
     106- Fix responsive Back-Office
     107
     108Version: 2.1.6  / 27/01/2020
     109- The module has been lightened
     110- Sprite css (BO only)
     111
     112Version: 2.1.5  / 16/12/2019
     113-Tag API responses to avoid errors when debug mode activated
     114-Add select date range for manual orders exportation
     115
     116Version: 2.1.4  / 29/11/2019
     117-Add option to add complete rich snippets
     118
    59119Version: 2.1.3  / 03/10/2019
    60120-Fix display review date in reviews tab
     
    62122Version: 2.1.2  / 05/08/2019
    63123-SQL code optimization
     124
    64125
    65126Version: 2.1.1  / 15/07/2019
     
    73134    - Number of reviews to display in product page.
    74135
    75 
    76136Version: 2.0.3 / 25/04/2019
    77137- fix ajax lang
     
    80140- Small bug corrections
    81141
    82 Version: 2.0.1 / 15/04/2019
    83 - Fix Back-office and template
     142Version: 2.0.1 / 18/04/2019
     143- Bug Correction in Front-end
     144
     145Version: 2.0.0 / 15/04/2019
     146- Fix Back-office and template
    84147- Additional Rich Snippets code (Review)
    85148- Bug Correction in Back-office
     
    90153
    91154Version: 1.9.4 / 15/03/2019
    92 -Important security update
     155- Important security update
    93156
    94157Version: 1.9.3 / 22/02/2019
     
    100163
    101164version: 1.9.1 / 18/02/2019
    102 - fix bug multiligual 
     165- fix bug multiligual
    103166- Add function flag order (API)
    104167
     
    117180version: 1.8.2 / date 13/11/2018
    118181- Fix count() warning for PHP 7.2
    119 - Look through to all prefix queries. 
     182- Look through to all prefix queries.
    120183- try catch in order to check if the product exist api_functions.php
    121184- Compatibilities wordpress 5.0 and woocommerce 3.5.1
     
    183246- Clean JS code
    184247- Clean CSS code
     248
     249version : 1.5.6 / date : 12/02/2018
     250- Texte modifier
     251- Ajout de traduction
     252- More comment
     253
     254version : 1.5.5 / date : 17/01/2018
     255- Correction translation
     256
     257version : 1.5.4 / date : 07/12/2017
     258- add img missing
     259- modif css
     260
     261version : 1.5.3 / date : 07/12/2017
     262- Fix display infobulle
     263
     264version : 1.5.2 / date : 28/11/2017
     265- Fix load more reviews
     266- add function update version module
     267- add order date and display on the reviews
     268
     269version : 1.5.1 / date : 22/11/2017
     270- Fix pagination
     271- Make the helpful feature optionnal
     272
     273version : 1.5.0 / date : 27/10/2017
     274- Add helpful reviews feature
     275- Add indicators
     276- New reviews design
     277
     278version : 1.4.9 / date : 04/10/2017
     279- Fix new tables
     280
     281version : 1.4.8 / date : 02/10/2017
     282- New feature multisite managemenent (many request impacted)
     283- Rich snippet site modified
     284- Replace function file_get_content by file_get_contents_curl
     285
     286version : 1.4.7 / date : 07/09/2017
     287- Remove set_time_limit function
     288
     289version : 1.4.6 / date : 22/06/2017
     290- Fix is_admin error 500
     291
     292version : 1.4.5 / date : /05/2017
     293- Fix update_version
     294
     295version : 1.4.4 / date : /04/2017
     296- Fix bug ntav_snippet_category()
     297
     298version : 1.4.3 / date : 18/04/2017
     299- Integration rich snippet category (microdata and json ld)
     300
     301version : 1.4.2 / date : 18/04/2017
     302- fix bug get_id on null
     303
     304version : 1.4.1 / date : 13/04/2017
     305- fix error display
     306
     307version : 1.4.0 / date : 13/04/2017
     308- Integration rich snippet product with json ld (compatible woocommerce 3.0)
     309
     310version : 1.3.16 / date : 01/03/2017
     311- Migration de paramètres de configuration du back-office Wordpress vers le back-office Avis-Vérifiés
     312
     313version : 1.3.15 / date : 16/02/2017
     314- Ajout du choix de la couleur de fond
     315- Ajout d'un champ CSS spécifique
     316
     317version : 1.3.14 / date : 10/02/2017
     318- Correction d'un bug sur l'inclusion du fichier CSS
     319
     320version : 1.3.13 / date : 09/02/2017
     321- Nouveau design front office
     322
     323version : 1.3.12 / date : 09/02/2017
     324- Correction d'un bug majeur sur l'automatisation
     325
     326version : 1.3.11 / date : 08/02/2017
     327- Ajout du choix de couleur des étoiles
     328
     329version : 1.3.10 / date : 08/02/2017
     330- Amélioration backoffice
     331- Correction du problème de l'API non joignable à cause du template.
     332
     333version : 1.3.9 / date : 06/02/2017
     334- Correction du problème de l'API non joignable à cause du template.
     335
     336version : 1.3.8 / date : 02/02/2017
     337- Correction de quelques messages d'erreur.
     338
     339version : 1.3.7 / date : 01/02/2017
     340- Ajout de l'option d'activation des richsnippets produits
     341- Modification du module pour respecter les standards Wordpress
     342
     343version : 1.3.6 / date : 25/01/2017
     344- Fiche produit, on n'affiche rien si il n'y a pas d'avis
     345- Modification du module pour respecter les standards Wordpress
     346
     347version : 1.3.5 / date : 16/01/2017
     348- Refonte graphique de la configuration
     349
     350version : 1.3.4 / date : 11/01/2017
     351- Modification du header
     352- Ajout de traductions
     353
     354version : 1.3.3 / date : 09/01/2017
     355- Amélioration graphique de la page de configuration
     356
     357version : 1.3.2 / date : 06/01/2017
     358- Amélioration graphique de la page de configuration
     359
     360version : 1.3.1 / date : 05/01/2017
     361- fix function view_project_template in pagetemplater.php exception
     362
     363version : 1.3 / date : 29/12/2016
     364- Ajout favicon
     365- Amélioration graphique de la page de configuration
     366- Ajout des configurations des rich snippet site
     367- Ajout du widget Avis Vérifiés
     368- Modification et fix sur la fonction netreviews_product_rating()
Note: See TracChangeset for help on using the changeset viewer.