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

Source for file view_cache.php

Documentation is available at view_cache.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package kernel
  5.  * @subpackage functions
  6.  */
  7.  
  8. // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  9. // All Rights Reserved. See below for details and a complete list of authors.
  10. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
  11.  
  12. /**
  13.  * required setup
  14.  */
  15. require_once'../kernel/setup_inc.php' );
  16. require_onceWIKI_PKG_PATH.'BitPage.php' );
  17.  
  18. /*
  19. if($gBitSystem->getConfig('wiki_list_pages') != 'y') {
  20.   $gBitSmarty->assign('msg',tra("This feature is disabled"));
  21.   $gBitSystem->display( 'error.tpl' , NULL, array( 'display_mode' => 'display' ));
  22.   die;  
  23. }
  24. */
  25. if (isset($_REQUEST['url'])) {
  26.     $id $wikilib->isUrlCached($_REQUEST['url']);
  27.  
  28.     if (!$id{
  29.         $gBitSmarty->assign('msg'tra("No cache information available"));
  30.  
  31.         $gBitSystem->display'error.tpl' NULLarray'display_mode' => 'display' ));
  32.         die;
  33.     }
  34.  
  35.     $_REQUEST["cache_id"$id;
  36. }
  37.  
  38. if (!isset($_REQUEST["cache_id"])) {
  39.     $gBitSmarty->assign('msg'tra("No page indicated"));
  40.  
  41.     $gBitSystem->display'error.tpl' NULLarray'display_mode' => 'display' ));
  42.     die;
  43. }
  44.  
  45. // Get a list of last changes to the Wiki database
  46. $info $gBitSystem->get_cache($_REQUEST["cache_id"]);
  47. $ggcacheurl 'http://google.com/search?q=cache:'.urlencode(strstr($info['url'],'http://'));
  48.  
  49. // test if url ends with .txt : formatting for text
  50. if (substr($info["url"]-44== ".txt"{
  51.     $info["data""<pre>" $info["data""</pre>";
  52. }
  53.  
  54. $gBitSmarty->assign('ggcacheurl'$ggcacheurl);
  55. $gBitSmarty->assign_by_ref('info'$info);
  56. $gBitSystem->display'bitpackage:kernel/view_cache.tpl'NULLarray'display_mode' => 'display' ));
  57.  
  58.  
  59.  
  60. ?>

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