Skip to:
Content

bbPress.org

Changeset 4637


Ignore:
Timestamp:
12/23/2012 12:54:20 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Revert r4625, as it could cause spam topics to become published. Will need to rethink/revisit this in 2.4. See #2125.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/converters/bbPress1.php

    r4625 r4637  
    206206            'to_fieldname'    => 'post_status',
    207207            'callback_method' => 'callback_status'
    208         );
    209 
    210         // Topic status (Publish or Closed to new replies)
    211         $this->field_map[] = array(
    212             'from_tablename'  => 'topics',
    213             'from_fieldname'  => 'topic_open',
    214             'to_type'         => 'topic',
    215             'to_fieldname'    => 'post_status',
    216             'callback_method' => 'callback_topic_status'
    217208        );
    218209
     
    528519    }
    529520
    530     /**
    531      * Translate the topic status from bbPress 1's numeric's to WordPress's
    532      * strings.
    533      *
    534      * @param int $topic_status bbPress 1.x numeric status
    535      * @return string WordPress safe
    536      */
    537     public function callback_topic_status( $topic_status = 1 ) {
    538         switch ( $topic_status ) {
    539             case 0 :
    540                 $topic_status = 'closed';  // bbp_get_closed_status_id()
    541                 break;
    542 
    543             case 1  :
    544             default :
    545                 $topic_status = 'publish'; // bbp_get_public_status_id()
    546                 break;
    547         }
    548         return $topic_status;
    549     }
    550 
    551521    /**
    552522     * Verify the topic reply count.
Note: See TracChangeset for help on using the changeset viewer.