WordPress.org

Plugin Directory

Changeset 1591970 for dynamic-widgets


Ignore:
Timestamp:
02/08/17 20:02:46 (6 weeks ago)
Author:
qurl
Message:

Widen up the database fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamic-widgets/trunk/dynamic-widgets.php

    r1478458 r1591970  
    55 * Description: Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly show or hide widgets on WordPress pages. 
    66 * Author: Qurl 
    7  * Version: 1.5.12 
     7 * Version: 1.5.12.1 
    88 * Author URI: http://www.qurl.nl/ 
    99 * Tags: widget, widgets, dynamic, sidebar, custom, rules, logic, admin, condition, conditional tags, hide, show, wpml, qtranslate, wpec, buddypress, pods 
     
    8282    define('DW_TIME_LIMIT', 86400);             // 1 day 
    8383    define('DW_URL_AUTHOR', 'http://www.qurl.nl'); 
    84     define('DW_VERSION', '1.5.12'); 
     84    define('DW_VERSION', '1.5.12.1'); 
    8585    define('DW_WPML_API', '/inc/wpml-api.php');         // WPML Plugin support - API file relative to ICL_PLUGIN_PATH 
    8686    define('DW_WPML_ICON', 'img/wpml_icon.png');    // WPML Plugin support - WPML icon 
     
    103103        $query = "CREATE TABLE IF NOT EXISTS " . $dbtable . " ( 
    104104                id int(11) NOT NULL auto_increment, 
    105                 widget_id varchar(60) NOT NULL, 
    106                 maintype varchar(50) NOT NULL, 
    107                 `name` varchar(40) NOT NULL, 
     105                widget_id varchar(100) NOT NULL, 
     106                maintype varchar(100) NOT NULL, 
     107                `name` varchar(100) NOT NULL, 
    108108                `value` longtext NOT NULL, 
    109109              PRIMARY KEY  (id), 
     
    168168            if ( version_compare($version, '1.5.3.1', '<') ) { 
    169169                $query = "ALTER TABLE " . $dbtable . " CHANGE `widget_id` `widget_id` VARCHAR(60) NOT NULL"; 
     170                $wpdb->query($query); 
     171            } 
     172 
     173            /* 
     174             * 1.5.12.1 > All needs to widen up again. Moved it all to 100 
     175             */ 
     176            if ( version_compare($version, '1.5.12.1', '<') ) { 
     177                $query = "ALTER TABLE " . $dbtable . " CHANGE `widget_id` `widget_id` VARCHAR(100) NOT NULL"; 
     178                $wpdb->query($query); 
     179 
     180                $query = "ALTER TABLE " . $dbtable . " CHANGE `maintype` `maintype` VARCHAR(100)"; 
     181                $wpdb->query($query); 
     182 
     183                $query = "ALTER TABLE " . $dbtable . " CHANGE `name` `name` VARCHAR(100)"; 
    170184                $wpdb->query($query); 
    171185            } 
Note: See TracChangeset for help on using the changeset viewer.