--- a/install/includes/stages/license.php Sun Jun 21 00:31:29 2009 -0400
+++ b/install/includes/stages/license.php Thu Jul 02 08:57:13 2009 -0400
@@ -55,19 +55,22 @@
<?php
}
-function wikiFormat($message, $filter_links = true)
+function wikiFormat($text)
{
- $wiki = Text_Wiki::singleton('Mediawiki');
- $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
- $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', scriptPath . '/index.php?title=');
- $result = $wiki->transform($message, 'Xhtml');
+ require_once( ENANO_ROOT . '/includes/render.php' );
+ require_once( ENANO_ROOT . '/includes/wikiformat.php' );
+ require_once( ENANO_ROOT . '/includes/wikiengine/TagSanitizer.php' );
+ require_once( ENANO_ROOT . '/includes/wikiengine/Tables.php' );
- // HTML fixes
- $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
- $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
- $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
+ $carpenter = new Carpenter();
+ // disable rules that require the DB
+ $carpenter->disable_rule('templates');
+ $carpenter->disable_rule('internallink');
+ $carpenter->disable_rule('image');
- return $result;
+ $text = $carpenter->render($text);
+
+ return $text;
}
?>
--- a/install/install.php Sun Jun 21 00:31:29 2009 -0400
+++ b/install/install.php Thu Jul 02 08:57:13 2009 -0400
@@ -248,7 +248,6 @@
break;
case 'license':
$ui->show_header();
- require( ENANO_ROOT . '/includes/wikiformat.php' );
require( ENANO_ROOT . '/install/includes/stages/license.php' );
break;
case 'sysreqs':