Version 1.0 ()
------------------------------------------------------------------------
+ * Make WordPress importer not fail on the missing "user_level" column
+ for WordPress 2.0 (garvinhicking)
+
+ * Add new option to spamblock plugin to forbid trackbacks from URLs that
+ don't have our URL in them. (garvinhicking)
+
* Recognize "multiselect" as new plugin item type. Calls to get_config()
will return a string, that needs exploding to convert it into the
array of multi-selected input values.
}
/* Users */
- $res = @$this->nativeQuery("SELECT ID, user_login, user_pass, user_email, user_level FROM {$this->data['prefix']}users;", $wpdb);
+ // Fields: ID, user_login, user_pass, user_email, user_level
+ $res = @$this->nativeQuery("SELECT * FROM {$this->data['prefix']}users;", $wpdb);
if ( !$res ) {
return sprintf(COULDNT_SELECT_USER_INFO, mysql_error($wpdb));
}
for ( $x=0 ; $x<mysql_num_rows($res) ; $x++ ) {
$users[$x] = mysql_fetch_assoc($res);
- $data = array('right_publish' => ($users[$x]['user_level'] >= 1) ? 1 : 0,
+ $data = array('right_publish' => (!isset($users[$x]['user_level']) || $users[$x]['user_level'] >= 1) ? 1 : 0,
'realname' => $users[$x]['user_login'],
'username' => $users[$x]['user_login'],
'password' => $users[$x]['user_pass']); // WP uses md5, too.
- if ( $users[$x]['user_level'] <= 1 ) {
+ if ( isset($users[$x]['user_level']) && $users[$x]['user_level'] <= 1 ) {
$data['userlevel'] = USERLEVEL_EDITOR;
- } elseif ( $users[$x]['user_level'] < 5 ) {
+ } elseif ( isset($users[$x]['user_level']) && $users[$x]['user_level'] < 5 ) {
$data['userlevel'] = USERLEVEL_CHIEF;
} else {
$data['userlevel'] = USERLEVEL_ADMIN;