Changeset 3866 for branches/plugin/bbp-admin/converters/Example.php
- Timestamp:
- 05/04/2012 06:07:26 AM (14 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbp-admin/converters/Example.php (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/converters/Example.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 … … 104 104 'from_tablename' => 'thread', 'from_fieldname' => 'title', 105 105 'to_type' => 'topic', 'to_fieldname' => 'post_name', 106 ' translate_method' => 'translate_title'106 'callback_method' => 'callback_slug' 107 107 ); 108 108 … … 111 111 'from_tablename' => 'thread', 'from_fieldname' => 'forumid', 112 112 'to_type' => 'topic', 'to_fieldname' => 'post_parent', 113 ' translate_method' => 'translate_forumid'113 'callback_method' => 'callback_forumid' 114 114 ); 115 115 … … 118 118 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 119 119 'to_type' => 'topic', 'to_fieldname' => 'post_date', 120 ' translate_method' => 'translate_datetime'120 'callback_method' => 'callback_datetime' 121 121 ); 122 122 $this->field_map[] = array( 123 123 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 124 124 'to_type' => 'topic', 'to_fieldname' => 'post_date_gmt', 125 ' translate_method' => 'translate_datetime'125 'callback_method' => 'callback_datetime' 126 126 ); 127 127 $this->field_map[] = array( 128 128 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 129 129 'to_type' => 'topic', 'to_fieldname' => 'post_modified', 130 ' translate_method' => 'translate_datetime'130 'callback_method' => 'callback_datetime' 131 131 ); 132 132 $this->field_map[] = array( 133 133 'from_tablename' => 'thread', 'from_fieldname' => 'dateline', 134 134 'to_type' => 'topic', 'to_fieldname' => 'post_modified_gmt', 135 ' translate_method' => 'translate_datetime'135 'callback_method' => 'callback_datetime' 136 136 ); 137 137 … … 142 142 'from_tablename' => 'tagcontent', 'from_fieldname' => 'contentid', 143 143 'to_type' => 'tags', 'to_fieldname' => 'objectid', 144 ' translate_method' => 'translate_topicid'144 'callback_method' => 'callback_topicid' 145 145 ); 146 146 … … 157 157 $this->field_map[] = array( 158 158 'from_tablename' => 'post', 'from_fieldname' => 'postid', 159 'to_type' => 'reply', 'to_fieldname' => '_bb c_post_id'159 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id' 160 160 ); 161 161 … … 163 163 $this->field_map[] = array( 164 164 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 165 'to_type' => 'reply', 'to_fieldname' => '_bb c_forum_id',166 ' translate_method' => 'translate_topicid_to_forumid'165 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 166 'callback_method' => 'callback_topicid_to_forumid' 167 167 ); 168 168 … … 170 170 $this->field_map[] = array( 171 171 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 172 'to_type' => 'reply', 'to_fieldname' => '_bb c_topic_id',173 ' translate_method' => 'translate_topicid'172 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 173 'callback_method' => 'callback_topicid' 174 174 ); 175 175 … … 177 177 $this->field_map[] = array( 178 178 'from_tablename' => 'post', 'from_fieldname' => 'ipaddress', 179 'to_type' => 'reply', 'to_fieldname' => '__bb c_author_ip'179 'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip' 180 180 ); 181 181 … … 184 184 'from_tablename' => 'post', 'from_fieldname' => 'userid', 185 185 'to_type' => 'reply', 'to_fieldname' => 'post_author', 186 ' translate_method' => 'translate_userid'186 'callback_method' => 'callback_userid' 187 187 ); 188 188 … … 197 197 'from_tablename' => 'post', 'from_fieldname' => 'title', 198 198 'to_type' => 'reply', 'to_fieldname' => 'post_name', 199 ' translate_method' => 'translate_title'199 'callback_method' => 'callback_slug' 200 200 ); 201 201 … … 204 204 'from_tablename' => 'post', 'from_fieldname' => 'pagetext', 205 205 'to_type' => 'reply', 'to_fieldname' => 'post_content', 206 ' translate_method' => 'translate_html'206 'callback_method' => 'callback_html' 207 207 ); 208 208 … … 211 211 'from_tablename' => 'post', 'from_fieldname' => 'threadid', 212 212 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 213 ' translate_method' => 'translate_topicid'213 'callback_method' => 'callback_topicid' 214 214 ); 215 215 … … 218 218 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 219 219 'to_type' => 'reply', 'to_fieldname' => 'post_date', 220 ' translate_method' => 'translate_datetime'220 'callback_method' => 'callback_datetime' 221 221 ); 222 222 $this->field_map[] = array( 223 223 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 224 224 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', 225 ' translate_method' => 'translate_datetime'225 'callback_method' => 'callback_datetime' 226 226 ); 227 227 $this->field_map[] = array( 228 228 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 229 229 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 230 ' translate_method' => 'translate_datetime'230 'callback_method' => 'callback_datetime' 231 231 ); 232 232 $this->field_map[] = array( 233 233 'from_tablename' => 'post', 'from_fieldname' => 'dateline', 234 234 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', 235 ' translate_method' => 'translate_datetime'235 'callback_method' => 'callback_datetime' 236 236 ); 237 237 … … 241 241 $this->field_map[] = array( 242 242 'from_tablename' => 'user', 'from_fieldname' => 'userid', 243 'to_type' => 'user', 'to_fieldname' => '_bb c_user_id'243 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id' 244 244 ); 245 245 … … 247 247 $this->field_map[] = array( 248 248 'from_tablename' => 'user', 'from_fieldname' => 'password', 249 'to_type' => 'user', 'to_fieldname' => '_bb c_password',250 ' translate_method' => 'translate_savepass'249 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 250 'callback_method' => 'callback_savepass' 251 251 ); 252 252 … … 259 259 // User password verify class. Stores in usermeta for verifying password. 260 260 $this->field_map[] = array( 261 'to_type' => 'user', 'to_fieldname' => '_bb c_class',261 'to_type' => 'user', 'to_fieldname' => '_bbp_class', 262 262 'default' => 'Vbulletin' 263 263 ); … … 285 285 'from_tablename' => 'user', 'from_fieldname' => 'joindate', 286 286 'to_type' => 'user', 'to_fieldname' => 'user_registered', 287 ' translate_method' => 'translate_datetime'287 'callback_method' => 'callback_datetime' 288 288 ); 289 289 … … 315 315 * as one value. Array values are auto sanitized by wordpress. 316 316 */ 317 public function translate_savepass( $field, $row )317 public function callback_savepass( $field, $row ) 318 318 { 319 319 $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
Note: See TracChangeset
for help on using the changeset viewer.