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

Source for file edit_topic_inc.php

Documentation is available at edit_topic_inc.php

  1. <?php
  2. /**
  3.  * $Header$
  4.  * $Id$
  5.  *
  6.  * @package boards
  7.  * @subpackage functions
  8.  */
  9. /* mass-remove:
  10. the checkboxes are sent as the array $_REQUEST["checked[]"], values are the wiki-PageNames,
  11. e.g. $_REQUEST["checked"][3]="HomePage"
  12. $_REQUEST["submit_mult"] holds the value of the "with selected do..."-option list
  13. we look if any page's checkbox is on and if remove_boards is selected.
  14. then we check permission to delete boards.
  15. if so, we call histlib's method remove_all_versions for all the checked boards.
  16. */
  17. ifisset$_REQUEST["submit_mult"&& isset$_REQUEST["checked"&& $_REQUEST["submit_mult"== "remove_boards" {
  18.  
  19.     // Now check permissions to remove the selected bitboard
  20.     $gContent->verifyUserPermission'p_boards_remove' );
  21.     $gBitUser->verifyTicket();
  22.  
  23.     if!empty$_REQUEST['cancel') ) {
  24.         // user cancelled - just continue on, doing nothing
  25.     elseifempty$_REQUEST['confirm') ) {
  26.         $formHash['b'$_REQUEST['b'];
  27.         $formHash['delete'TRUE;
  28.         $formHash['submit_mult''remove_boards';
  29.         foreach$_REQUEST["checked"as $del {
  30.             $formHash['input']['<input type="hidden" name="checked[]" value="'.$del.'"/>';
  31.         }
  32.         $gBitSystem->confirmDialog$formHash
  33.             array
  34.                 'warning' => tra('Are you sure you want to delete these topics?'' (' tra('Count: 'count$_REQUEST["checked"')',                
  35.                 'error' => tra('This cannot be undone!'),
  36.             )
  37.         );
  38.     else {
  39.         foreach$_REQUEST["checked"as $deleteId {
  40.             $deleteComment new LibertyComment$deleteId );
  41.             if$deleteComment->isValid(&& $gBitUser->hasPermission('p_liberty_admin_comments') ) {
  42.                 if!$deleteComment->expunge() ) {
  43.                     $gBitSmarty->assign_by_ref'errors'$deleteComment->mErrors );
  44.                 }
  45.             }
  46.         }
  47.         if!empty$errors ) ) {
  48.             $gBitSmarty->assign_by_ref'errors'$errors );
  49.         }
  50.     }
  51. }
  52. ?>

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