Plugin Directory

Changeset 2419599


Ignore:
Timestamp:
11/16/2020 07:41:55 PM (5 years ago)
Author:
radovank
Message:

fixing settings update and export

Location:
template-dictionary/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • template-dictionary/trunk/admin/admin.php

    r1830393 r2419599  
    830830        if( $id ){
    831831            $sql = "SELECT COUNT(*) FROM $table_main WHERE code = %s AND id != %d";
     832            $result = $wpdb->get_var( $wpdb->prepare( $sql, $code, $id ) );
    832833        }
    833834        else {
    834835            $sql = "SELECT COUNT(*) FROM $table_main WHERE code = %s";
    835         }
    836 
    837         $result = $wpdb->get_var( $wpdb->prepare( $sql, $code, $id ) );
     836            $result = $wpdb->get_var( $wpdb->prepare( $sql, $code ) );
     837        }
     838
    838839
    839840        return (int)$result;
     
    10601061                    ) ts
    10611062                    ON t.id = ts.id
    1062                 WHERE lang in ($langs_sql)
     1063                WHERE lang in ($langs_sql) OR lang IS NULL
    10631064                ORDER BY code ASC";
    10641065
  • template-dictionary/trunk/readme.txt

    r2132610 r2419599  
    33Tags: template, dictionary, variables, settings, options
    44Requires at least: 4.5
    5 Tested up to: 5.2.2
    6 Stable tag: 1.6
     5Tested up to: 5.5.3
     6Stable tag: 1.6.1
    77License: GPL2
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7070
    7171== Changelog ==
     72= 1.6.1 =
     73* Fix: When exporting both settings and values, export empty settings too.
     74* Fix: Correct number of placeholders for wpdb::prepare.
     75
    7276= 1.6 =
    7377* Added method to get whole dictionary array.
  • template-dictionary/trunk/template-dictionary.php

    r2132610 r2419599  
    33 * Plugin Name: Template Dictionary
    44 * Description: A plugin for developers which provides template variables dictionary editable in backend.
    5  * Version:     1.6
     5 * Version:     1.6.1
    66 * Author:      Radovan Kneblík
    77 * License:     GPL2
     
    2424     * @var string
    2525     */
    26     private $version = '1.6';
     26    private $version = '1.6.1';
    2727
    2828    /**
Note: See TracChangeset for help on using the changeset viewer.