From 0863b51d951bd469b4a791672c8fbcc14b9ff032 Mon Sep 17 00:00:00 2001 From: dairiki Date: Fri, 21 Feb 2003 23:01:11 +0000 Subject: [PATCH] Fixes to support new $basepage argument of WikiPlugin::run(). git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@2634 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/CachedMarkup.php | 4 ++-- lib/WikiPluginCached.php | 12 +++++++----- lib/plugin/RecentChangesCached.php | 13 +++++++++---- lib/plugin/SystemInfo.php | 15 ++++++++++----- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/lib/CachedMarkup.php b/lib/CachedMarkup.php index d6bba798a..c930d49e0 100644 --- a/lib/CachedMarkup.php +++ b/lib/CachedMarkup.php @@ -1,4 +1,4 @@ - * * This file is part of PhpWiki. @@ -343,7 +343,7 @@ class Cached_PluginInvocation extends Cached_DynamicContent { } $xml = HTML::div(array('class' => 'plugin'), - $loader->expandPI($this->_pi, $GLOBALS['request'])); + $loader->expandPI($this->_pi, $GLOBALS['request'], $basepage)); if (isset($this->_tightenable)) { $xml->setInClass('tightenable'); diff --git a/lib/WikiPluginCached.php b/lib/WikiPluginCached.php index af2045fdf..15133ad12 100644 --- a/lib/WikiPluginCached.php +++ b/lib/WikiPluginCached.php @@ -1,4 +1,4 @@ -resetError(); - $content['html'] = $this->getHtml($dbi,$sortedargs,$request); + $content['html'] = $this->getHtml($dbi,$sortedargs,$request,$basepage); if ($errortext = $this->getError()) { WikiPluginCached::printError($errortext,'html'); return HTML(); @@ -285,10 +286,11 @@ class WikiPluginCached extends WikiPlugin * image. It is not necessary to call * WikiPlugin->getArgs anymore. * @param request Request ??? + * @param string $basepage Pagename to use to interpret links [/relative] page names. * @return string html to be printed in place of the plugin command * false if an error occured */ - function getHtml($dbi, $argarray, $request) { + function getHtml($dbi, $argarray, $request, $basepage) { trigger_error('WikiPluginCached::getHtml: pure virtual function in file ' . __FILE__ . ' line ' . __LINE__, E_USER_ERROR); } diff --git a/lib/plugin/RecentChangesCached.php b/lib/plugin/RecentChangesCached.php index 2ff012e8f..c775b3a77 100644 --- a/lib/plugin/RecentChangesCached.php +++ b/lib/plugin/RecentChangesCached.php @@ -1,5 +1,5 @@ expandPI('', $request); + . ' ?>', $request, $basepage); } } // WikiPlugin_TexToPng // $Log: not supported by cvs2svn $ +// Revision 1.2 2003/01/18 22:01:44 carstenklapp +// Code cleanup: +// Reformatting & tabs to spaces; +// Added copyleft, getVersion, getDescription, rcs_id. +// // For emacs users // Local Variables: diff --git a/lib/plugin/SystemInfo.php b/lib/plugin/SystemInfo.php index 7eab5b50d..8aa56e837 100644 --- a/lib/plugin/SystemInfo.php +++ b/lib/plugin/SystemInfo.php @@ -1,5 +1,5 @@ expandPI('', $request); + . ' ?>', $request, $basepage); } /* function getDefaultArguments() { @@ -369,7 +369,7 @@ extends WikiPlugin return $this->error(sprintf(_("unknown argument '%s' to SystemInfo"), $arg)); } - function run($dbi, $argstr, $request) { + function run($dbi, $argstr, $request, $basepage) { // don't parse argstr for name=value pairs. instead we use just 'name' //$args = $this->getArgs($argstr, $request); $args['seperator'] = ' '; @@ -515,6 +515,11 @@ function stddev(&$hits, $total = false) { } // $Log: not supported by cvs2svn $ +// Revision 1.5 2003/01/18 22:08:01 carstenklapp +// Code cleanup: +// Reformatting & tabs to spaces; +// Added copyleft, getVersion, getDescription, rcs_id. +// // Local Variables: // mode: php -- 2.45.0