Changeset 6115
- Timestamp:
- 11/02/2016 10:59:20 AM (7 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converters/Kunena2.php
r5951 r6115 30 30 * Sets up the field mappings 31 31 */ 32 33 34 32 public function setup_globals() { 33 34 /** Forum Section *****************************************************/ 35 35 36 36 … … 296 296 ); 297 297 298 298 /** Tags Section ******************************************************/ 299 299 300 300 /** … … 399 399 ); 400 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 401 /** User Section ******************************************************/ 402 403 //Note: We are importing the Joomla User details and the Kunena v2.x user profile details. 404 405 // Store old user id (Stored in usermeta) 406 $this->field_map[] = array( 407 'from_tablename' => 'users', 408 'from_fieldname' => 'id', 409 'to_type' => 'user', 410 'to_fieldname' => '_bbp_old_user_id' 411 ); 412 413 // Store old user password (Stored in usermeta serialized with salt) 414 $this->field_map[] = array( 415 'from_tablename' => 'users', 416 'from_fieldname' => 'password', 417 'to_type' => 'user', 418 'to_fieldname' => '_bbp_password', 419 'callback_method' => 'callback_savepass' 420 ); 421 422 // Store old user salt. This is only used for the SELECT row info for the above password save 423 /* 424 $this->field_map[] = array( 425 'from_tablename' => 'users', 426 'from_fieldname' => 'salt', 427 'to_type' => 'user', 428 'to_fieldname' => '' 429 ); 430 */ 431 432 // User password verify class. Stores in usermeta for verifying password. 433 /* 434 $this->field_map[] = array( 435 'to_type' => 'user', 436 'to_fieldname' => '_bbp_class', 437 'default' => 'Kunena2' 438 ); 439 */ 440 441 // User name. 442 $this->field_map[] = array( 443 'from_tablename' => 'users', 444 'from_fieldname' => 'username', 445 'to_type' => 'user', 446 'to_fieldname' => 'user_login' 447 ); 448 449 // User email. 450 $this->field_map[] = array( 451 'from_tablename' => 'users', 452 'from_fieldname' => 'email', 453 'to_type' => 'user', 454 'to_fieldname' => 'user_email' 455 ); 456 457 // User registered. 458 $this->field_map[] = array( 459 'from_tablename' => 'users', 460 'from_fieldname' => 'registerDate', 461 'to_type' => 'user', 462 'to_fieldname' => 'user_registered', 463 'callback_method' => 'callback_datetime' 464 ); 465 465 466 466 // User display name. … … 472 472 ); 473 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 474 } 475 476 /** 477 * This method allows us to indicates what is or is not converted for each 478 * converter. 479 */ 480 public function info() { 481 return ''; 482 } 483 484 /** 485 * This method is to save the salt and password together. That 486 * way when we authenticate it we can get it out of the database 487 * as one value. Array values are auto sanitized by WordPress. 488 */ 489 public function callback_savepass($field, $row) { 490 $pass_array = array('hash' => $field, 'salt' => $row['salt']); 491 return $pass_array; 492 } 493 494 /** 495 * This method is to take the pass out of the database and compare 496 * to a pass the user has typed in. 497 */ 498 public function authenticate_pass($password, $serialized_pass) { 499 $pass_array = unserialize($serialized_pass); 500 return ( $pass_array['hash'] == md5(md5($password) . $pass_array['salt']) ); 501 } 502 502 /** 503 503 * Translate the forum type from Kunena v2.x numeric's to WordPress's strings. -
trunk/src/includes/admin/converters/Mingle.php
r5951 r6115 239 239 /** 240 240 * Mingle Forums do not support topic tags 241 241 */ 242 242 243 243 /** Reply Section ******************************************************/ … … 476 476 477 477 /** 478 * This callback processes any custom BBCodes with parser.php479 */478 * This callback processes any custom BBCodes with parser.php 479 */ 480 480 protected function callback_html( $field ) { 481 481 require_once( bbpress()->admin->admin_dir . 'parser.php' ); -
trunk/src/includes/admin/converters/Vanilla.php
r5951 r6115 604 604 605 605 /** 606 * This callback processes any custom BBCodes with parser.php607 */606 * This callback processes any custom BBCodes with parser.php 607 */ 608 608 protected function callback_html( $field ) { 609 609 require_once( bbpress()->admin->admin_dir . 'parser.php' ); -
trunk/src/includes/admin/functions.php
r5951 r6115 210 210 211 211 // Bail if no activation redirect 212 212 if ( ! get_transient( '_bbp_activation_redirect' ) ) { 213 213 return; 214 214 } -
trunk/src/includes/admin/metaboxes.php
r6095 r6115 204 204 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 205 205 } 206 206 $num = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $num . '</a>'; 207 207 $text = '<a class="waiting" href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_topic_title'] ) . '">' . $text . '</a>'; 208 208 ?> … … 226 226 $link = add_query_arg( array( 'post_status' => bbp_get_spam_status_id() ), $link ); 227 227 } 228 228 $num = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $num . '</a>'; 229 229 $text = '<a class="waiting" href="' . esc_url( $link ) . '" title="' . esc_attr( $r['hidden_reply_title'] ) . '">' . $text . '</a>'; 230 230 ?> -
trunk/src/includes/common/functions.php
r6085 r6115 1901 1901 // Check if this query is for a bbPress post type 1902 1902 foreach ( $post_types as $bbp_pt ) { 1903 1904 1905 1906 1903 if ( in_array( $bbp_pt, $qv_array, true ) ) { 1904 $post_type = $bbp_pt; 1905 break; 1906 } 1907 1907 } 1908 1908 -
trunk/src/includes/extend/akismet.php
r5951 r6115 319 319 // Add some reporter info 320 320 if ( is_object( $current_user ) ) { 321 321 $post_data['reporter'] = $current_user->user_login; 322 322 } 323 323 -
trunk/src/includes/extend/buddypress/activity.php
r5951 r6115 612 612 } 613 613 614 614 /** 615 615 * Delete the activity stream entry when a reply is spammed, trashed, or deleted 616 616 * -
trunk/src/includes/extend/buddypress/groups.php
r5951 r6115 1392 1392 * @uses maybe_map_permalink_to_group 1393 1393 * @return array 1394 1394 */ 1395 1395 public function topic_pagination( $args ) { 1396 1396 $new = $this->maybe_map_permalink_to_group( bbp_get_forum_id() );
Note: See TracChangeset
for help on using the changeset viewer.