Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/07/2014 02:43:19 PM (10 years ago)
Author:
netweb
Message:

Fixed topic sticky status importing method for compatibility when wp_bbconverter_translator database sync_table exists.

  • Topic stickies and super stickies are correctly stuck with or without sync_table
  • Renamed sticky meta key _bbp_old_sticky_status to _bbp_old_sticky_status_id for importers that support stickies

See #2650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/converter.php

    r5425 r5427  
    10941094
    10951095        if ( !empty( $this->sync_table ) ) {
    1096             $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1096            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    10971097        } else {
    1098             $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1098            $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta  . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    10991099        }
    11001100
     
    11251125
    11261126        if ( !empty( $this->sync_table ) ) {
    1127             $query = 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1127            $query = 'SELECT value_id, meta_value FROM '            . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    11281128        } else {
    1129             $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta . ' WHERE meta_key = "_bbp_old_sticky_status" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
     1129            $query = 'SELECT post_id AS value_id, meta_value FROM ' . $this->wpdb->postmeta  . ' WHERE meta_key = "_bbp_old_sticky_status_id" AND meta_value = "super-sticky" LIMIT ' . $start . ', ' . $this->max_rows;
    11301130        }
    11311131
Note: See TracChangeset for help on using the changeset viewer.