diff --git a/groups.php b/groups.php index 1dba8e1..f2b664e 100644 --- a/groups.php +++ b/groups.php @@ -21,13 +21,13 @@ * Plugin Name: Groups * Plugin URI: http://www.itthinx.com/plugins/groups * Description: Groups provides group-based user membership management, group-based capabilities and content access control. - * Version: 1.5.0 + * Version: 1.5.1 * Author: itthinx * Author URI: http://www.itthinx.com * Donate-Link: http://www.itthinx.com * License: GPLv3 */ -define( 'GROUPS_CORE_VERSION', '1.5.0' ); +define( 'GROUPS_CORE_VERSION', '1.5.1' ); define( 'GROUPS_FILE', __FILE__ ); if ( !defined( 'GROUPS_CORE_DIR' ) ) { define( 'GROUPS_CORE_DIR', WP_PLUGIN_DIR . '/groups' ); diff --git a/lib/core/class-groups-controller.php b/lib/core/class-groups-controller.php index c169948..4c223d7 100644 --- a/lib/core/class-groups-controller.php +++ b/lib/core/class-groups-controller.php @@ -169,7 +169,7 @@ class VARCHAR(255) DEFAULT NULL, name VARCHAR(100) DEFAULT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY (capability_id), - UNIQUE INDEX capability (capability(20)), + UNIQUE INDEX capability (capability(100)), INDEX capability_kco (capability(20),class(20),object(20)) ) $charset_collate;"; } @@ -270,9 +270,9 @@ public static function update( $previous_version ) { Groups_Options::update_option( Groups_Post_Access::READ_POST_CAPABILITIES, array( Groups_Post_Access::READ_POST_CAPABILITY ) ); $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_value = %s WHERE meta_key = %s", Groups_Post_Access::READ_POST_CAPABILITY, Groups_Post_Access::POSTMETA_PREFIX . Groups_Post_Access::READ_POST_CAPABILITY ) ); } - if ( strcmp( $previous_version, '1.5.0' ) < 0 ) { + if ( strcmp( $previous_version, '1.5.1' ) < 0 ) { $capability_table = _groups_get_tablename( 'capability' ); - $queries[] = "ALTER TABLE $capability_table DROP INDEX capability, ADD UNIQUE INDEX capability(capability(20));"; + $queries[] = "ALTER TABLE $capability_table DROP INDEX capability, ADD UNIQUE INDEX capability(capability(100));"; } } } // switch diff --git a/readme.txt b/readme.txt index 70ed652..3f2f4f4 100644 --- a/readme.txt +++ b/readme.txt @@ -177,6 +177,11 @@ See also [Groups](http://www.itthinx.com/plugins/groups/) == Changelog == += 1.5.1 = +* Please **MAKE A BACKUP** of your site and database PRIOR to updating. +* WordPress 4.2 compatible. +* Adopted a more flexible index size on the capability row of the capability table. + = 1.5.0 = * Please **MAKE A BACKUP** of your site and database PRIOR to updating. * WordPress 4.2 compatible. @@ -430,6 +435,6 @@ Some installations wouldn't work correctly, showing no capabilities and making i == Upgrade Notice == -= 1.5.0 = += 1.5.1 = Please **MAKE A BACKUP** of your site and database PRIOR to updating. This release is required for compatibility with WordPress 4.2 and above (uses a reduced index size on a database table).