Changeset 3866 for branches/plugin/bbp-admin/converters/Invision.php
- Timestamp:
- 05/04/2012 06:07:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/converters/Invision.php
r3816 r3866 19 19 $this->field_map[] = array( 20 20 'from_tablename' => 'forums', 'from_fieldname' => 'id', 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' => 'forums', 'from_fieldname' => 'parent_id', 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' => 'forums', 'from_fieldname' => 'name', 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' => 'forums', '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' => 'topics', 'from_fieldname' => 'tid', 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' => 'topics', 'from_fieldname' => 'forum_id', 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' => 'topics', 'from_fieldname' => 'starter_id', 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' => 'topics', 'join_type' => 'INNER', 'join_expression' => 'ON(topics.tid = posts.topic_id) WHERE posts.new_topic = 1', 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' => 'topics', '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' => 'topics', 'from_fieldname' => 'forum_id', 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' => 'topics', 'from_fieldname' => 'start_date', 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' => 'topics', 'from_fieldname' => 'start_date', 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' => 'topics', 'from_fieldname' => 'last_post', 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' => 'topics', 'from_fieldname' => 'last_post', 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' => 'core_tags', 'from_fieldname' => 'tag_meta_id', 151 151 'to_type' => 'tags', 'to_fieldname' => 'objectid', 152 ' translate_method' => 'translate_topicid'152 'callback_method' => 'callback_topicid' 153 153 ); 154 154 … … 164 164 $this->field_map[] = array( 165 165 'from_tablename' => 'posts', 'from_fieldname' => 'pid', 'from_expression' => 'WHERE posts.new_topic = 1', 166 'to_type' => 'reply', 'to_fieldname' => '_bb c_post_id'166 'to_type' => 'reply', 'to_fieldname' => '_bbp_post_id' 167 167 ); 168 168 … … 170 170 $this->field_map[] = array( 171 171 'from_tablename' => 'posts', 'from_fieldname' => 'topic_id', 172 'to_type' => 'reply', 'to_fieldname' => '_bb c_forum_id',173 ' translate_method' => 'translate_topicid_to_forumid'172 'to_type' => 'reply', 'to_fieldname' => '_bbp_forum_id', 173 'callback_method' => 'callback_topicid_to_forumid' 174 174 ); 175 175 … … 177 177 $this->field_map[] = array( 178 178 'from_tablename' => 'posts', 'from_fieldname' => 'topic_id', 179 'to_type' => 'reply', 'to_fieldname' => '_bb c_topic_id',180 ' translate_method' => 'translate_topicid'179 'to_type' => 'reply', 'to_fieldname' => '_bbp_topic_id', 180 'callback_method' => 'callback_topicid' 181 181 ); 182 182 … … 184 184 $this->field_map[] = array( 185 185 'from_tablename' => 'posts', 'from_fieldname' => 'ip_address', 186 'to_type' => 'reply', 'to_fieldname' => '__bb c_author_ip'186 'to_type' => 'reply', 'to_fieldname' => '__bbp_author_ip' 187 187 ); 188 188 … … 191 191 'from_tablename' => 'posts', 'from_fieldname' => 'author_id', 192 192 'to_type' => 'reply', 'to_fieldname' => 'post_author', 193 ' translate_method' => 'translate_userid'193 'callback_method' => 'callback_userid' 194 194 ); 195 195 … … 204 204 'from_tablename' => 'posts', 'from_fieldname' => 'post_title', 205 205 'to_type' => 'reply', 'to_fieldname' => 'post_name', 206 ' translate_method' => 'translate_title'206 'callback_method' => 'callback_slug' 207 207 ); 208 208 … … 211 211 'from_tablename' => 'posts', 'from_fieldname' => 'post', 212 212 'to_type' => 'reply', 'to_fieldname' => 'post_content', 213 ' translate_method' => 'translate_html'213 'callback_method' => 'callback_html' 214 214 ); 215 215 … … 218 218 'from_tablename' => 'posts', 'from_fieldname' => 'topic_id', 219 219 'to_type' => 'reply', 'to_fieldname' => 'post_parent', 220 ' translate_method' => 'translate_topicid'220 'callback_method' => 'callback_topicid' 221 221 ); 222 222 … … 225 225 'from_tablename' => 'posts', 'from_fieldname' => 'post_date', 226 226 'to_type' => 'reply', 'to_fieldname' => 'post_date', 227 ' translate_method' => 'translate_datetime'227 'callback_method' => 'callback_datetime' 228 228 ); 229 229 $this->field_map[] = array( 230 230 'from_tablename' => 'posts', 'from_fieldname' => 'post_date', 231 231 'to_type' => 'reply', 'to_fieldname' => 'post_date_gmt', 232 ' translate_method' => 'translate_datetime'232 'callback_method' => 'callback_datetime' 233 233 ); 234 234 $this->field_map[] = array( 235 235 'from_tablename' => 'posts', 'from_fieldname' => 'edit_time', 236 236 'to_type' => 'reply', 'to_fieldname' => 'post_modified', 237 ' translate_method' => 'translate_datetime'237 'callback_method' => 'callback_datetime' 238 238 ); 239 239 $this->field_map[] = array( 240 240 'from_tablename' => 'posts', 'from_fieldname' => 'edit_time', 241 241 'to_type' => 'reply', 'to_fieldname' => 'post_modified_gmt', 242 ' translate_method' => 'translate_datetime'242 'callback_method' => 'callback_datetime' 243 243 ); 244 244 … … 248 248 $this->field_map[] = array( 249 249 'from_tablename' => 'members', 'from_fieldname' => 'member_id', 250 'to_type' => 'user', 'to_fieldname' => '_bb c_user_id'250 'to_type' => 'user', 'to_fieldname' => '_bbp_user_id' 251 251 ); 252 252 … … 254 254 $this->field_map[] = array( 255 255 'from_tablename' => 'members', 'from_fieldname' => 'members_pass_hash', 256 'to_type' => 'user', 'to_fieldname' => '_bb c_password',257 ' translate_method' => 'translate_savepass'256 'to_type' => 'user', 'to_fieldname' => '_bbp_password', 257 'callback_method' => 'callback_savepass' 258 258 ); 259 259 … … 266 266 // User password verify class. Stores in usermeta for verifying password. 267 267 $this->field_map[] = array( 268 'to_type' => 'user', 'to_fieldname' => '_bb c_class',268 'to_type' => 'user', 'to_fieldname' => '_bbp_class', 269 269 'default' => 'Invision' 270 270 ); … … 286 286 'from_tablename' => 'members', 'from_fieldname' => 'joined', 287 287 'to_type' => 'user', 'to_fieldname' => 'user_registered', 288 ' translate_method' => 'translate_datetime'288 'callback_method' => 'callback_datetime' 289 289 ); 290 290 … … 326 326 * as one value. Array values are auto sanitized by wordpress. 327 327 */ 328 public function translate_savepass( $field, $row )328 public function callback_savepass( $field, $row ) 329 329 { 330 330 $pass_array = array( 'hash' => $field, 'salt' => $row['members_pass_salt'] );
Note: See TracChangeset
for help on using the changeset viewer.