From: garvinhicking Date: Thu, 12 Jan 2006 10:17:45 +0000 (+0000) Subject: * document X-Git-Tag: 1.0~175 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=786a173949a40fc5473bc1087b548cb26040def1;p=s9y.git * document * fix wp 2.0 import --- diff --git a/docs/NEWS b/docs/NEWS index 339df3c..ac6e9de 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,12 @@ 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. diff --git a/include/admin/importers/wordpress.inc.php b/include/admin/importers/wordpress.inc.php index 2abccab..f65f87a 100644 --- a/include/admin/importers/wordpress.inc.php +++ b/include/admin/importers/wordpress.inc.php @@ -91,7 +91,8 @@ class Serendipity_Import_WordPress extends Serendipity_Import { } /* 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)); } @@ -99,14 +100,14 @@ class Serendipity_Import_WordPress extends Serendipity_Import { for ( $x=0 ; $x ($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;