*/ GalleryCoreApi::requireOnce('modules/permalinks/classes/PermalinksMapHelper.class'); /** * Perform the redirection * * @package Permalinks * @subpackage UserInterface * */ class RedirectController extends GalleryController { /** * @see GalleryController::handleRequest */ function handleRequest(&$form) { $alias = GalleryUtilities::getRequestVariables('filename'); if (empty($alias)) { return array(GalleryCoreApi::error(ERROR_BAD_PARAMETER, __FILE__, __LINE__), null); } list ($ret, $itemId) = PermalinksMapHelper::fetchItemIdForAlias($alias); if ($ret) { return array($ret->wrap(__FILE__, __LINE__), null); } GalleryUtilities::putRequestVariable('itemId', $itemId); $results = array('delegate' => array('view' => 'core.ShowItem'), 'status' => array(), 'error' => array()); return array(null, $results); } } ?>