[ Root ] [ Search ] [ Index ]

PHP Cross Reference of bbPress Trunk

Provided by Yoast

title

Body

[close]

/ -> tag-add.php (source)

   1  <?php
   2  require ('./bb-load.php');
   3  
   4  bb_auth('logged_in');
   5  
   6  if ( !bb_is_user_logged_in() )
   7      bb_die(__('You need to be logged in to add a tag.'));
   8  
   9  $topic_id = (int) @$_POST['id' ];
  10  $page     = (int) @$_POST['page'];
  11  $tag      =       @$_POST['tag'];
  12  $tag      =       stripslashes( $tag );
  13  
  14  bb_check_admin_referer( 'add-tag_' . $topic_id );
  15  
  16  $topic = get_topic ( $topic_id );
  17  if ( !$topic )
  18      bb_die(__('Topic not found.'));
  19  
  20  if ( bb_add_topic_tags( $topic_id, $tag ) )
  21      wp_redirect( get_topic_link( $topic_id, $page ) );
  22  else
  23      bb_die(__('The tag was not added.  Either the tag name was invalid or the topic is closed.'));
  24  exit;
  25  ?>


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