'[pagename]'); } function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); extract($args); if (empty($page)) return ''; $html = HTML(HTML::h3(fmt("Retransform page ā€œ%sā€", $page))); // bypass WikiDB and cache, go directly through the backend. $backend = &$dbi->_backend; //$pagedata = $backend->get_pagedata($page); $version = $backend->get_latest_version($page); $vdata = $backend->get_versiondata($page, $version, true); include_once 'lib/PageType.php'; $formatted = new TransformedText($dbi->getPage($page), $vdata['%content'], $vdata); $content =& $formatted->_content; $html->pushContent($this->DebugPrintArray($content)); $links = $formatted->getWikiPageLinks(); if (count($links) > 0) { $html->pushContent(HTML::h3("Links")); $html->pushContent($this->DebugPrintArray($links)); } return $html; } private function DebugPrintArray(&$array) { $html = HTML(); foreach ($array as $line) { ob_start(); print_r($line); $s = HTML::pre(ob_get_contents()); ob_end_clean(); $html->pushContent($s); } return $html; } } // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: