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

Source for file page_watches.php

Documentation is available at page_watches.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 functions
  11.  */
  12.  
  13. /**
  14.  * required setup
  15.  */
  16. require_once'../kernel/setup_inc.php' );
  17. include_onceWIKI_PKG_PATH.'BitPage.php');
  18.  
  19. $gBitSystem->verifyPackage'wiki' );
  20. $gBitSystem->verifyFeature'users_watches' );
  21. $gBitSystem->verifyPermission'p_admin_users'tra"Permission denied you cannot browse these page watches" ) );
  22.  
  23. // Get the page from the request var or default it to HomePage
  24. includeWIKI_PKG_PATH.'lookup_page_inc.php' );
  25.  
  26. // make comment count for this page available for templates
  27. $gComment new LibertyComment();
  28. $numComments $gComment->getNumComments($gContent->mContentId);
  29. $gBitSmarty->assign('comments_count'$numComments);
  30.  
  31.  
  32.  
  33. //vd($gContent->mPageId);vd($gContent->mInfo);
  34. if!$gContent->isValid(|| empty$gContent->mInfo ) ) {
  35.     $gBitSystem->fatalErrortra"Unknown page" ));
  36. }
  37.  
  38. $watches NULL;
  39. if!empty$gContent->mPageId ) ) {
  40.  
  41.     $event 'wiki_page_changed';    
  42.     $watches $gBitUser->get_event_watches($event$gContent->mPageId);
  43.     $gBitSmarty->assign_by_ref('watches'$watches);
  44.     $gBitSmarty->assign_by_ref'pageInfo'$gContent->mInfo );
  45.     }
  46.  
  47. // Display the template
  48. $gBitSystem->display'bitpackage:wiki/page_watches.tpl'NULLarray'display_mode' => 'display' ));
  49.  
  50. ?>

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