Changeset 5021
- Timestamp:
- 07/10/2013 03:29:03 PM (12 years ago)
- Location:
- trunk/includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/topics.php
r4995 r5021 502 502 503 503 $is_sticky = bbp_is_topic_sticky( $topic_id ); 504 $is_super = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && 1 === (int)$_GET['super'] ) ? true : false;505 $message = true === $is_sticky ? 'unsticked' : 'sticked';506 $message = true === $is_super ? 'super_sticked' : $message;507 $success = true === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );504 $is_super = false === $is_sticky && !empty( $_GET['super'] ) && ( "1" === $_GET['super'] ) ? true : false; 505 $message = true === $is_sticky ? 'unsticked' : 'sticked'; 506 $message = true === $is_super ? 'super_sticked' : $message; 507 $success = true === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super ); 508 508 509 509 break; -
trunk/includes/forums/functions.php
r5017 r5021 509 509 510 510 // Update revision log 511 if ( !empty( $_POST['bbp_log_forum_edit'] ) && ( 1=== $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) {511 if ( !empty( $_POST['bbp_log_forum_edit'] ) && ( "1" === $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) { 512 512 bbp_update_forum_revision_log( array( 513 513 'forum_id' => $forum_id, -
trunk/includes/replies/functions.php
r5009 r5021 713 713 714 714 // Update revision log 715 if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1=== $_POST['bbp_log_reply_edit'] ) ) {715 if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( "1" === $_POST['bbp_log_reply_edit'] ) ) { 716 716 $revision_id = wp_save_post_revision( $reply_id ); 717 717 if ( !empty( $revision_id ) ) { -
trunk/includes/topics/functions.php
r5019 r5021 690 690 691 691 // Update revision log 692 if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1=== $_POST['bbp_log_topic_edit'] ) ) {692 if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( "1" === $_POST['bbp_log_topic_edit'] ) ) { 693 693 $revision_id = wp_save_post_revision( $topic_id ); 694 694 if ( ! empty( $revision_id ) ) { … … 1211 1211 1212 1212 // Shift the subscriber if told to 1213 if ( !empty( $_POST['bbp_topic_subscribers'] ) && ( 1=== $_POST['bbp_topic_subscribers'] ) && bbp_is_subscriptions_active() )1213 if ( !empty( $_POST['bbp_topic_subscribers'] ) && ( "1" === $_POST['bbp_topic_subscribers'] ) && bbp_is_subscriptions_active() ) 1214 1214 bbp_add_user_subscription( $subscriber, $destination_topic->ID ); 1215 1215 … … 1231 1231 1232 1232 // Shift the favoriter if told to 1233 if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1=== $_POST['bbp_topic_favoriters'] )1233 if ( !empty( $_POST['bbp_topic_favoriters'] ) && "1" === $_POST['bbp_topic_favoriters'] ) 1234 1234 bbp_add_user_favorite( $favoriter, $destination_topic->ID ); 1235 1235 … … 1248 1248 1249 1249 // Shift the tags if told to 1250 if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1=== $_POST['bbp_topic_tags'] ) )1250 if ( !empty( $_POST['bbp_topic_tags'] ) && ( "1" === $_POST['bbp_topic_tags'] ) ) 1251 1251 wp_set_post_terms( $destination_topic->ID, $source_topic_tags, bbp_get_topic_tag_tax_id(), true ); 1252 1252 … … 1562 1562 1563 1563 // Copy the subscribers 1564 if ( !empty( $_POST['bbp_topic_subscribers'] ) && 1=== $_POST['bbp_topic_subscribers'] && bbp_is_subscriptions_active() ) {1564 if ( !empty( $_POST['bbp_topic_subscribers'] ) && "1" === $_POST['bbp_topic_subscribers'] && bbp_is_subscriptions_active() ) { 1565 1565 1566 1566 // Get the subscribers … … 1579 1579 1580 1580 // Copy the favoriters if told to 1581 if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1 === $_POST['bbp_topic_favoriters']) {1581 if ( !empty( $_POST['bbp_topic_favoriters'] ) && ( "1" === $_POST['bbp_topic_favoriters'] ) ) { 1582 1582 1583 1583 // Get the favoriters … … 1596 1596 1597 1597 // Copy the tags if told to 1598 if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1=== $_POST['bbp_topic_tags'] ) ) {1598 if ( !empty( $_POST['bbp_topic_tags'] ) && ( "1" === $_POST['bbp_topic_tags'] ) ) { 1599 1599 1600 1600 // Get the source topic tags … … 2067 2067 2068 2068 $is_sticky = bbp_is_topic_sticky( $topic_id ); 2069 $is_super = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && 1 === (int)$_GET['super'] ) ? true : false;2069 $is_super = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && "1" === $_GET['super'] ) ? true : false; 2070 2070 $success = $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super ); 2071 2071 $failure = $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );
Note: See TracChangeset
for help on using the changeset viewer.