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

Source for file mod_wiki_last_comments.php

Documentation is available at mod_wiki_last_comments.php

  1. <?php
  2. /**
  3.  * Copyright (c) 2004 bitweaver.org
  4.  * Copyright (c) 2003 tikwiki.org
  5.  * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  6.  * All Rights Reserved. See below for details and a complete list of authors.
  7.  * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
  8.  *
  9.  * @package wiki
  10.  * @subpackage modules
  11.  */
  12.  
  13. /**
  14.  * Show last comments on wiki pages
  15.  */
  16. global $gQueryUserId, $moduleParams;
  17. /**
  18.  * required setup
  19.  */
  20. if( $gBitUser->hasPermission( 'p_wiki_view_page' ) ) {
  21.     require_once( LIBERTY_PKG_PATH.'LibertyComment.php' );
  22.     $cmt = new LibertyComment();
  23.     $listHash = array( 'max_records' => $moduleParams['module_rows'], 'user_id' => $gQueryUserId, 'content_type_guid' => BITPAGE_CONTENT_TYPE_GUID );
  24.     $lastComments = $cmt->getList( $listHash );
  25.     $_template->tpl_vars['lastComments'] = new Smarty_variable( $lastComments);
  26.     $_template->tpl_vars['moretooltips'] = new Smarty_variable( isset($module_params["moretooltips"]) ? $module_params["moretooltips"] : 'n');
  27. }
  28. ?>

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