Skip to:
Content

bbPress.org

Changeset 5077


Ignore:
Timestamp:
08/19/2013 07:05:19 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Check that 'bbp_topic_status' is set before comparing to available topic statuses. Also, use bbp_get_topic_statuses() instead of hardcoded array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/topics/functions.php

    r5060 r5077  
    277277
    278278    // Check a whitelist of possible topic status ID's
    279     } elseif ( in_array( $_POST['bbp_topic_status'], array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id(), bbp_get_trash_status_id(), bbp_get_orphan_status_id() ) ) ) {
     279    } elseif ( isset( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( bbp_get_topic_statuses() ) ) ) {
    280280        $topic_status = $_POST['bbp_topic_status'];
    281281
     
    613613
    614614    // Check a whitelist of possible topic status ID's
    615     } elseif ( in_array( $_POST['bbp_topic_status'], array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id(), bbp_get_trash_status_id(), bbp_get_orphan_status_id() ) ) ) {
     615    } elseif ( isset( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( bbp_get_topic_statuses() ) ) ) {
    616616        $topic_status = $_POST['bbp_topic_status'];
    617617
Note: See TracChangeset for help on using the changeset viewer.