User Role Editor - Version 3.8.3

Version Description

  • 14.12.2012
  • Compatibility issue with WordPress 3.5 was found (thanks to Sonja) and fixed: $wpdb->prepare() was called without 2nd $args parameter - removed.
Download this release

Release Info

Developer shinephp
Plugin Icon 128x128 User Role Editor
Version 3.8.3
Comparing to
See all releases

Code changes from version 3.8.2 to 3.8.3

Files changed (4) hide show
  1. includes/ure-lib.php +3 -4
  2. readme.txt +5 -0
  3. uninstall.php +1 -1
  4. user-role-editor.php +2 -2
includes/ure-lib.php CHANGED
@@ -15,7 +15,7 @@ $ure_currentRole = false; $ure_currentRoleName = false;
15
  $ure_toldAboutBackup = false; $ure_apply_to_all = false;
16
  $ure_userToEdit = false; $ure_fullCapabilities = false;
17
 
18
- // this array will be used to cash users checked for Administrator role
19
  $ure_userToCheck = array();
20
 
21
  function ure_logEvent($message, $showMessage = false) {
@@ -280,7 +280,7 @@ function ure_updateRoles() {
280
 
281
  $old_blog = $wpdb->blogid;
282
  // Get all blog ids
283
- $blogIds = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs"));
284
  if (defined('URE_MULTISITE_DIRECT_UPDATE') && URE_MULTISITE_DIRECT_UPDATE == 1) {
285
  ure_direct_site_roles_update($blogIds);
286
  } else {
@@ -803,7 +803,7 @@ function ure_removeCapability() {
803
  }
804
 
805
  // process users
806
- $usersId = $wpdb->get_col($wpdb->prepare("SELECT $wpdb->users.ID FROM $wpdb->users"));
807
  foreach ($usersId as $user_id) {
808
  $user = get_user_to_edit($user_id);
809
  if (isset($user->roles[0]) && $user->roles[0] == 'administrator') {
@@ -826,7 +826,6 @@ function ure_removeCapability() {
826
 
827
  return $mess;
828
  }
829
-
830
  // end of ure_removeCapability()
831
 
832
 
15
  $ure_toldAboutBackup = false; $ure_apply_to_all = false;
16
  $ure_userToEdit = false; $ure_fullCapabilities = false;
17
 
18
+ // this array will be used to cashe users checked for Administrator role
19
  $ure_userToCheck = array();
20
 
21
  function ure_logEvent($message, $showMessage = false) {
280
 
281
  $old_blog = $wpdb->blogid;
282
  // Get all blog ids
283
+ $blogIds = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
284
  if (defined('URE_MULTISITE_DIRECT_UPDATE') && URE_MULTISITE_DIRECT_UPDATE == 1) {
285
  ure_direct_site_roles_update($blogIds);
286
  } else {
803
  }
804
 
805
  // process users
806
+ $usersId = $wpdb->get_col("SELECT $wpdb->users.ID FROM $wpdb->users");
807
  foreach ($usersId as $user_id) {
808
  $user = get_user_to_edit($user_id);
809
  if (isset($user->roles[0]) && $user->roles[0] == 'administrator') {
826
 
827
  return $mess;
828
  }
 
829
  // end of ure_removeCapability()
830
 
831
 
readme.txt CHANGED
@@ -86,6 +86,11 @@ Share with me new ideas about plugin further development and link to your site w
86
 
87
 
88
  == Changelog ==
 
 
 
 
 
89
  = 3.8.2 =
90
  * 02.12.2012
91
  * load_plugin_textdomain() call moved to the 'plugins_loaded' hook for higher compatibility with translation plugins.
86
 
87
 
88
  == Changelog ==
89
+
90
+ = 3.8.3 =
91
+ * 14.12.2012
92
+ * Compatibility issue with WordPress 3.5 was found (thanks to Sonja) and fixed: $wpdb->prepare() was called without 2nd $args parameter - removed.
93
+
94
  = 3.8.2 =
95
  * 02.12.2012
96
  * load_plugin_textdomain() call moved to the 'plugins_loaded' hook for higher compatibility with translation plugins.
uninstall.php CHANGED
@@ -20,7 +20,7 @@ if (!is_multisite()) {
20
  } else {
21
  $old_blog = $wpdb->blogid;
22
  // Get all blog ids
23
- $blogIds = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs"));
24
  foreach ($blogIds as $blog_id) {
25
  switch_to_blog($blog_id);
26
  $backup_option_name = $wpdb->prefix.'backup_user_roles';
20
  } else {
21
  $old_blog = $wpdb->blogid;
22
  // Get all blog ids
23
+ $blogIds = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
24
  foreach ($blogIds as $blog_id) {
25
  switch_to_blog($blog_id);
26
  $backup_option_name = $wpdb->prefix.'backup_user_roles';
user-role-editor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://www.shinephp.com/user-role-editor-wordpress-plugin/
5
  Description: It allows you to change/add/delete any WordPress user role (except administrator) capabilities list with a few clicks.
6
- Version: 3.8.2
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
@@ -304,7 +304,7 @@ if (function_exists('is_multisite') && is_multisite()) {
304
  global $wpdb, $wp_roles;
305
 
306
  // get Id of 1st (main) blog
307
- $blogIds = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs order by blog_id asc"));
308
  if (!isset($blogIds[0])) {
309
  return;
310
  }
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://www.shinephp.com/user-role-editor-wordpress-plugin/
5
  Description: It allows you to change/add/delete any WordPress user role (except administrator) capabilities list with a few clicks.
6
+ Version: 3.8.3
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
304
  global $wpdb, $wp_roles;
305
 
306
  // get Id of 1st (main) blog
307
+ $blogIds = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs order by blog_id asc");
308
  if (!isset($blogIds[0])) {
309
  return;
310
  }