*/ /** * @package Rewrite * @subpackage UserInterface */ class FileNotFoundView extends GalleryView { /** * @see GalleryView::getViewDescription */ function getViewDescription() { list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'rewrite'); if ($ret) { return array($ret->wrap(__FILE__, __LINE__), null); } return array(null, $module->translate('404 File Not Found')); } /** * @see GalleryView::loadTemplate */ function loadTemplate(&$template, &$form) { global $gallery; $phpVm = $gallery->getPhpVm(); $urlGenerator =& $gallery->getUrlGenerator(); /* Don't use getCurrentUrl, it migh be staged by the url generator */ $path = GalleryUtilities::getServerVar('REQUEST_URI'); $path = $urlGenerator->makeUrl($path); $phpVm->header('HTTP/1.0 404 Not Found'); $template->setVariable('FileNotFound', $path); return array(null, array('body' => 'modules/rewrite/templates/FileNotFound.tpl')); } } ?>