tags
[ class tree: tags ] [ index: tags ] [ all elements ]

Source for file drop_tags.php

Documentation is available at drop_tags.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package tags
  5.  * @subpackage functions
  6.  * 
  7.  * @copyright Copyright (c) 2004-2006, bitweaver.org
  8.  *  All Rights Reserved. See below for details and a complete list of authors.
  9.  *  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
  10.  */
  11.  
  12. /**
  13.  * required setup
  14.  */
  15. require_once"../kernel/setup_inc.php" );
  16. require_onceTAGS_PKG_PATH."LibertyTag.php" );
  17.  
  18. $gBitSystem->verifyPackage'tags' );
  19.  
  20. require_onceLIBERTY_PKG_PATH.'lookup_content_inc.php' );
  21.  
  22. if (!$gContent || !$gContent->isValid()) {
  23.     $gBitSystem->fatalError'The content is not valid.' );
  24. }
  25.  
  26. if (!($gBitUser->hasPermission('p_tags_admin'|| $gContent->isOwner())) {
  27.     $gBitSystem->fatalError'You do not have permission to remove tags.' );
  28. }
  29.  
  30. if (empty($_REQUEST['tag_id'])) {
  31.     $gBitSystem->fatalError('You must select some tags.');
  32. }
  33.  
  34. ifisset$_REQUEST["confirm") ) {
  35.     $tag new LibertyTag();
  36.     $tag->expungeTags($_REQUEST['content_id']explode(","$_REQUEST['tag_id']));
  37.     header("location: ".$gContent->getDisplayUrl());
  38. }
  39.  
  40. $gBitSystem->setBrowserTitletra'Confirm drop of tags from: ' ).$gContent->getTitle() );
  41. $formHash['tag_id'implode(","$_REQUEST['tag_id']);
  42. $formHash['content_id'$_REQUEST['content_id'];
  43. foreach($_REQUEST['tag_id'as $id{
  44.     $tags[$_REQUEST['tag_'.$id];
  45. }
  46. $msgHash array(
  47.     'label' => tra'Drop Tags' ),
  48.     'confirm_item' => implode("<br>"$tags),
  49.     'warning' => tra'These tags will be dropped from this content.<br />This cannot be undone!' ),
  50.     );
  51. $gBitSystem->confirmDialog$formHash,$msgHash );
  52.  
  53.  
  54.  
  55. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:23 +0000 by phpDocumentor 1.5.0-lsces