|
From: <var...@us...> - 2014-10-06 12:21:34
|
Revision: 9196
http://sourceforge.net/p/phpwiki/code/9196
Author: vargenau
Date: 2014-10-06 12:21:30 +0000 (Mon, 06 Oct 2014)
Log Message:
-----------
Wikicreole syntax
Modified Paths:
--------------
trunk/lib/WikiPluginCached.php
Modified: trunk/lib/WikiPluginCached.php
===================================================================
--- trunk/lib/WikiPluginCached.php 2014-10-06 10:19:30 UTC (rev 9195)
+++ trunk/lib/WikiPluginCached.php 2014-10-06 12:21:30 UTC (rev 9196)
@@ -27,7 +27,6 @@
*/
require_once 'lib/WikiPlugin.php';
-// require_once "lib/plugincache-config.php"; // replaced by config.ini settings!
// types:
define('PLUGIN_CACHED_HTML', 0); // cached html (extensive calculation)
@@ -76,7 +75,6 @@
private function genUrl($cache, $argarray)
{
global $request;
- //$cacheparams = $GLOBALS['CacheParams'];
$plugincall = serialize(array(
'pluginname' => $this->getName(),
@@ -137,7 +135,6 @@
public function run($dbi, $argstr, &$request, $basepage)
{
$cache = $this->newCache();
- //$cacheparams = $GLOBALS['CacheParams'];
$sortedargs = $this->getArgs($argstr, $request);
if (is_array($sortedargs))
@@ -400,15 +397,15 @@
* Creates an HTML map hyperlinked to the image specified
* by url and containing the hotspots given by map.
*
- * @param $id string unique id for the plugin call
- * @param $url string url pointing to the image part of the map
- * @param $map string <area> tags defining active
+ * @param string $id unique id for the plugin call
+ * @param string $url url pointing to the image part of the map
+ * @param string $map <area> tags defining active
* regions in the map
- * @param $dbi WikiDB database abstraction class
- * @param $argarray array complete (!) arguments to produce
+ * @param WikiDB $dbi database abstraction class
+ * @param array $argarray complete (!) arguments to produce
* image. It is not necessary to call
* WikiPlugin->getArgs anymore.
- * @param $request Request
+ * @param Request $request
* @return string html output
*/
protected function embedMap($id, $url, $map, &$dbi, $argarray, &$request)
@@ -659,9 +656,9 @@
* Extracts the parameters necessary to reconstruct the plugin
* call needed to produce the requested image.
*
- * @param $plugincall string reference to serialized array containing both
+ * @param string $plugincall reference to serialized array containing both
* name and parameters of the plugin call
- * @param $request Request ???
+ * @param Request $request ???
* @return bool false if an error occurs, true otherwise.
*
*/
@@ -686,13 +683,13 @@
/**
* Creates an image or image map depending on the plugin type.
- * @param $content array reference to created array which overwrite the keys
+ * @param array $content reference to created array which overwrite the keys
* 'image', 'imagetype' and possibly 'html'
- * @param $plugin WikiPluginCached plugin which is called to create image or map
- * @param $dbi WikiDB handle to database
- * @param $argarray array Contains all arguments needed by plugin
- * @param $request Request ????
- * @param $errorformat string outputs errors in 'png', 'gif', 'jpg' or 'html'
+ * @param WikiPluginCached $plugin plugin which is called to create image or map
+ * @param WikiDB $dbi WikiDB handle to database
+ * @param array $argarray array Contains all arguments needed by plugin
+ * @param Request $request Request ????
+ * @param string $errorformat outputs errors in 'png', 'gif', 'jpg' or 'html'
* @return bool error status; true=ok; false=error
*/
private function produceImage(&$content, $plugin, $dbi, $argarray, $request, $errorformat)
@@ -711,8 +708,8 @@
if (!$imagehandle || $errortext) {
if (!$errortext) {
- $errortext = "'<?plugin " . $plugin->getName() . ' '
- . $this->glueArgs($argarray) . " ?>' returned no image, "
+ $errortext = "'<<" . $plugin->getName() . ' '
+ . $this->glueArgs($argarray) . " >>' returned no image, "
. " although no error was reported.";
}
$this->printError($errorformat, $errortext);
@@ -858,7 +855,7 @@
return true;
}
- $errortext = "Could not create image file from imagehandle.";
+ $errortext = _("Could not create image file from imagehandle.");
$this->printError($errorformat, $errortext);
return false;
} // FetchImageFromCache
@@ -941,11 +938,11 @@
* values may be smaller if the chosen font is to big for there
* is further restriction to 600 pixel in width and 350 in height.
*
- * @param $txt string multi line text to be converted
- * @param $fontnr integer number (1-5) telling gd which internal font to use;
+ * @param string $txt multi line text to be converted
+ * @param int $fontnr number (1-5) telling gd which internal font to use;
* I recommend font 2 for errors and 4 for help texts.
- * @param $textcol array text color as a list of the rgb components; array(red,green,blue)
- * @param $bgcol array background color; array(red,green,blue)
+ * @param array $textcol text color as a list of the rgb components; array(red,green,blue)
+ * @param array $bgcol background color; array(red,green,blue)
* @return string image handle for gd routines
*/
static public function text2img($txt, $fontnr, $textcol, $bgcol)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|