Changeset 3866 for branches/plugin/bbp-admin/converters/vBulletin.php
- Timestamp:
- 05/04/2012 06:07:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/converters/vBulletin.php
r3816 r3866 19 19 $this->field_map[] = array( 20 20 'from_tablename' => 'forum', 'from_fieldname' => 'forumid', 21 'to_type' => 'forum', 'to_fieldname' => '_bb c_forum_id'21 'to_type' => 'forum', 'to_fieldname' => '_bbp_forum_id' 22 22 ); 23 23 … … 25 25 $this->field_map[] = array( 26 26 'from_tablename' => 'forum', 'from_fieldname' => 'parentid', 27 'to_type' => 'forum', 'to_fieldname' => '_bb c_parent_id'27 'to_type' => 'forum', 'to_fieldname' => '_bbp_parent_id' 28 28 ); 29 29 … … 38 38 'from_tablename' => 'forum', 'from_fieldname' => 'title_clean', 39 39 'to_type' => 'forum', 'to_fieldname' => 'post_name', 40 ' translate_method' => 'translate_title'40 'callback_method' => 'callback_slug' 41 41 ); 42 42 … … 45 45 'from_tablename' => 'forum', 'from_fieldname' => 'description', 46 46 'to_type' => 'forum', 'to_fieldname' => 'post_content', 47 ' translate_method' => 'translate_null'47 'callback_method' => 'callback_null' 48 48 ); 49 49 … … 77 77 $this->field_map[] = array( 78 78 'from_tablename' => 'thread', 'from_fieldname' => 'threadid', 79 'to_type' => 'topic', 'to_fieldname' => '_bb c_topic_id'79 'to_type' => 'topic', 'to_fieldname' => '_bbp_topic_id' 80 80 ); 81 81 … … 83 83 $this->field_map[] = array( 84 84 'from_tablename' => 'thread', 'from_fieldname' => 'forumid', 85 'to_type' => 'topic', 'to_fieldname' => '_bb c_forum_id',86 ' translate_method' => 'translate_forumid'85 'to_type' => 'topic', 'to_fieldname' => '_bbp_forum_id', 86 'callback_method' => 'callback_forumid' 87 87 ); 88 88 … … 91 91 'from_tablename' => 'thread', 'from_fieldname' => 'postuserid', 92 92 'to_type' => 'topic', 'to_fieldname' => 'post_author', 93 ' translate_method' => 'translate_userid'93 'callback_method' => 'callback_userid' 94 94 ); 95 95 … … 99 99 'join_tablename' => 'thread', 'join_type' => 'INNER', 'join_expression' => 'USING (threadid) WHERE post.parentid = 0', 100 100 'to_type' => 'topic', 'to_fieldname' => 'post_content', 101 ' translate_method' => 'translate_html'101 'callback_method' => 'callback_html' 102 102 ); 103 103 … … 112 112 'from_tablename' => 'thread', 'from_fieldname' => 'title', 113 113 'to_type' => 'topic', 'to_fieldname' => 'post_name', 114 ' translate_method' => 'translate_title'114 'callback_method' => 'callback_slug' 115 115 ); 116 116 … … 119 119 'from_tablename' => 'thread', 'from_fieldname' => 'forumid', 120 120 'to_type' => 'topic', 'to_fieldname' => 'post_parent', 121 ' translate_method' => 'translate_forumid'121 'callback_method' => 'callback_forumid' 122 122 ); 123 123 … … 126 126 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 127 127 'to_type' => 'topic', 'to_fieldname' => 'post_date', 128 ' translate_method' => 'translate_datetime'128 'callback_method' => 'callback_datetime' 129 129 ); 130 130 $this->field_map[] = array( 131 131 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 132 132 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', 133 ' translate_method' => 'translate_datetime'133 'callback_method' => 'callback_datetime' 134 134 ); 135 135 $this->field_map[] = array( 136 136 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 137 137 'to_type' => 'topic', 'to_fieldname' => 'post_modified', 138 ' translate_method' => 'translate_datetime'138 'callback_method' => 'callback_datetime' 139 139 ); 140 140 $this->field_map[] = array( 141 141 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 142 142 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', 143 ' translate_method' => 'translate_datetime'143 'callback_method' => 'callback_datetime' 144 144 ); 145 145 … … 150 150 'from_tablename' => 'tagcontent', 'from_fieldname' => 'contentid', 151 151 'to_type' => 'tags', 'to_fieldname' => 'objectid', 152 ' translate_method' => 'translate_topicid'152 'callback_method' => 'callback_topicid' 153 153 ); 154 154 … … 165 165 $this->field_map[] = array( 166 166 'from_tablename' => 'post', 'from_fieldname' => 'postid', 'from_expression' => 'WHERE post.parentid != 0', 167 'to_type' => 'reply', 'to_fieldname' => '_bb c_post_id'167 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id' 168 168 ); 169 169 … … 171 171 $this->field_map[] = array( 172 172 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 173 'to_type' => 'reply', 'to_fieldname' => '_bb c_forum_id',174 ' translate_method' => 'translate_topicid_to_forumid'173 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 174 'callback_method' => 'callback_topicid_to_forumid' 175 175 ); 176 176 … … 178 178 $this->field_map[] = array( 179 179 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 180 'to_type' => 'reply', 'to_fieldname' => '_bb c_topic_id',181 ' translate_method' => 'translate_topicid'180 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 181 'callback_method' => 'callback_topicid' 182 182 ); 183 183 … … 185 185 $this->field_map[] = array( 186 186 'from_tablename' => 'post', 'from_fieldname' => 'ipaddress', 187 'to_type' => 'reply', 'to_fieldname' => '__bb c_author_ip'187 'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip' 188 188 ); 189 189 … … 192 192 'from_tablename' => 'post', 'from_fieldname' => 'userid', 193 193 'to_type' => 'reply', 'to_fieldname' => 'post_author', 194 ' translate_method' => 'translate_userid'194 'callback_method' => 'callback_userid' 195 195 ); 196 196 … … 205 205 'from_tablename' => 'post', 'from_fieldname' => 'title', 206 206 'to_type' => 'reply', 'to_fieldname' => 'post_name', 207 ' translate_method' => 'translate_title'207 'callback_method' => 'callback_slug' 208 208 ); 209 209 … … 212 212 'from_tablename' => 'post', 'from_fieldname' => 'pagetext', 213 213 'to_type' => 'reply', 'to_fieldname' => 'post_content', 214 ' translate_method' => 'translate_html'214 'callback_method' => 'callback_html' 215 215 ); 216 216 … … 219 219 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 220 220 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 221 ' translate_method' => 'translate_topicid'221 'callback_method' => 'callback_topicid' 222 222 ); 223 223 … … 226 226 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 227 227 'to_type' => 'reply', 'to_fieldname' => 'post_date', 228 ' translate_method' => 'translate_datetime'228 'callback_method' => 'callback_datetime' 229 229 ); 230 230 $this->field_map[] = array( 231 231 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 232 232 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', 233 ' translate_method' => 'translate_datetime'233 'callback_method' => 'callback_datetime' 234 234 ); 235 235 $this->field_map[] = array( 236 236 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 237 237 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 238 ' translate_method' => 'translate_datetime'238 'callback_method' => 'callback_datetime' 239 239 ); 240 240 $this->field_map[] = array( 241 241 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 242 242 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', 243 ' translate_method' => 'translate_datetime'243 'callback_method' => 'callback_datetime' 244 244 ); 245 245 … … 249 249 $this->field_map[] = array( 250 250 'from_tablename' => 'user', 'from_fieldname' => 'userid', 251 'to_type' => 'user', 'to_fieldname' => '_bb c_user_id'251 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id' 252 252 ); 253 253 … … 255 255 $this->field_map[] = array( 256 256 'from_tablename' => 'user', 'from_fieldname' => 'password', 257 'to_type' => 'user', 'to_fieldname' => '_bb c_password',258 ' translate_method' => 'translate_savepass'257 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 258 'callback_method' => 'callback_savepass' 259 259 ); 260 260 … … 267 267 // User password verify class. Stores in usermeta for verifying password. 268 268 $this->field_map[] = array( 269 'to_type' => 'user', 'to_fieldname' => '_bb c_class',269 'to_type' => 'user', 'to_fieldname' => '_bbp_class', 270 270 'default' => 'Vbulletin' 271 271 ); … … 293 293 'from_tablename' => 'user', 'from_fieldname' => 'joindate', 294 294 'to_type' => 'user', 'to_fieldname' => 'user_registered', 295 ' translate_method' => 'translate_datetime'295 'callback_method' => 'callback_datetime' 296 296 ); 297 297 … … 323 323 * as one value. Array values are auto sanitized by wordpress. 324 324 */ 325 public function translate_savepass( $field, $row )325 public function callback_savepass( $field, $row ) 326 326 { 327 327 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
Note: See TracChangeset
for help on using the changeset viewer.