/** * static workaround on broken Cache or broken dot executable, * called only if debug=static. * * @access private * @param url string url pointing to the image part of the map * @param map string <area> tags defining active * regions in the map * @param dbi WikiDB database abstraction class * @param argarray array complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. * @param request Request ??? * @return string html output */ function embedImg($url, &$dbi, $argarray, &$request) { if (!VISUALWIKI_ALLOWOPTIONS) { $argarray = $this->defaultarguments(); } $this->checkArguments($argarray); //extract($argarray); if ($argarray['help']) { return array($this->helpImage(), ' '); } // FIXME $this->createColors(); $this->extract_wikipages($dbi, $argarray); list($imagehandle, $content['html']) = $this->invokeDot($argarray); // write to uploads and produce static url $file_dir = getUploadFilePath(); $upload_dir = getUploadDataPath(); $tmpfile = tempnam($file_dir, "VisualWiki") . "." . $argarray['imgtype']; WikiPluginCached::writeImage($argarray['imgtype'], $imagehandle, $tmpfile); ImageDestroy($imagehandle); return WikiPluginCached::embedMap(1, $upload_dir . basename($tmpfile), $content['html'], $dbi, $argarray, $request); }
/** * static workaround on broken Cache or broken dot executable, * called only if debug=static. * * @access private * @param url string url pointing to the image part of the map * @param map string <area> tags defining active * regions in the map * @param dbi WikiDB database abstraction class * @param argarray array complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. * @param request Request ??? * @return string html output */ function embedImg($url, &$dbi, $argarray, &$request) { if (!VISUALWIKI_ALLOWOPTIONS) { $argarray = $this->defaultarguments(); } $this->checkArguments($argarray); //extract($argarray); if ($argarray['help']) { return array($this->helpImage(), ' '); } // FIXME $this->createColors(); $this->extract_wikipages($dbi, $argarray); list($imagehandle, $content['html']) = $this->invokeDot($argarray); // write to uploads and produce static url $file_dir = defined('PHPWIKI_DIR') ? PHPWIKI_DIR . "/uploads" : "uploads"; $upload_dir = SERVER_URL . (substr(DATA_PATH, 0, 1) == '/' ? '' : "/") . DATA_PATH . '/uploads/'; $tmpfile = tempnam($file_dir, "VisualWiki") . "." . $argarray['imgtype']; WikiPluginCached::writeImage($argarray['imgtype'], $imagehandle, $tmpfile); ImageDestroy($imagehandle); return WikiPluginCached::embedMap(1, $upload_dir . basename($tmpfile), $content['html'], $dbi, $argarray, $request); }