*/ /** * This controller handles printing a single photo * * @package PhotoAccess * @subpackage UserInterface */ class PrintPhotoController extends GalleryController { /** * @see GalleryController::handleRequest() */ function handleRequest($form) { global $gallery; list ($itemId, $returnUrl) = GalleryUtilities::getRequestVariables('itemId', 'returnUrl'); GalleryCoreApi::requireOnce('modules/photoaccess/classes/PhotoAccessHelper.class'); list ($ret, $cartUrl) = PhotoAccessHelper::printPhotos(array($itemId => 1), $returnUrl); if ($ret) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Prepare our results */ $results['redirect']['href'] = $cartUrl; $results['status'] = array(); $results['error'] = array(); return array(null, $results); } } ?>