Changeset 5151
- Timestamp:
- 11/08/2013 04:27:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/SimplePress5.php
r4824 r5151 24 24 public function setup_globals() { 25 25 26 /** Forum Section ***************************************************** */26 /** Forum Section *****************************************************/ 27 27 28 28 // Forum id (Stored in postmeta) … … 130 130 ); 131 131 132 /** Topic Section ***************************************************** */132 /** Topic Section *****************************************************/ 133 133 134 134 // Topic id (Stored in postmeta) … … 309 309 'to_fieldname' => 'post_title', 310 310 'callback_method' => 'callback_reply_title' 311 ); 312 313 // Reply slug (Clean name to avoid conflicts) 314 // Note: We join the sftopics table because sfposts table does not include topic title. 315 $this->field_map[] = array( 316 'from_tablename' => 'sftopics', 317 'from_fieldname' => 'topic_name', 318 'join_tablename' => 'sfposts', 319 'join_type' => 'LEFT', 320 'join_expression' => 'USING (topic_id) WHERE sfposts.post_index != 1', 321 'to_type' => 'reply', 322 'to_fieldname' => 'post_name', 323 'callback_method' => 'callback_slug' 311 324 ); 312 325 … … 525 538 $simplepress_markup = preg_replace ( '/\<strong\>(.*?)\ said\ \<\/strong\>/', '@$1 said:', $simplepress_markup ); 526 539 540 // Replace '<p> </p>' with '<p> </p>' 541 $simplepress_markup = preg_replace ( '/\n( |[\s\p{Z}\xA0\x{00A0}]+)\r/', '<br>', $simplepress_markup ); 542 527 543 // Now that SimplePress' custom HTML codes have been stripped put the cleaned HTML back in $field 528 544 $field = $simplepress_markup;
Note: See TracChangeset
for help on using the changeset viewer.