[ Root ] [ Search ] [ Index ]

PHP Cross Reference of bbPress Trunk

Provided by Yoast

title

Body

[close]

/ -> tag-remove.php (source)

   1  <?php
   2  require ('./bb-load.php');
   3  
   4  bb_auth('logged_in');
   5  
   6  $tag_id = (int) @$_GET['tag'];
   7  $user_id = (int) @$_GET['user'];
   8  $topic_id = (int) @$_GET['topic'];
   9  
  10  bb_check_admin_referer( 'remove-tag_' . $tag_id . '|' . $topic_id );
  11  
  12  $tag    =  bb_get_tag ( $tag_id );
  13  $topic    =  get_topic ( $topic_id );
  14  $user    =  bb_get_user( $user_id );
  15  
  16  if ( !$tag || !$topic )
  17      bb_die(__('Invalid tag or topic.'));
  18  
  19  if ( false !== bb_remove_topic_tag( $tag_id, $user_id, $topic_id ) ) {
  20      if ( !$redirect = wp_get_referer() )
  21          $redirect = get_topic_link( $topic_id );
  22      bb_safe_redirect( $redirect );
  23  } else {
  24      bb_die(__('The tag was not removed.'));
  25  }
  26  exit;
  27  ?>


Generated: Mon Nov 15 04:45:27 2010 Cross-referenced by PHPXref 0.7