function handleAlbumTitle($dom) { $album_class = new Albums(); $album = $album_class->fetchRow('id = ' . $this->album_id); $title = $dom->createElement('title'); $title->appendChild($dom->createTextNode($album->title)); return $title; }
function viewAction() { $id = $this->_request->getParam('id', 0); if ($id > 0) { $albums = new Albums(); $album = $albums->fetchRow('id=' . $id); $this->view->album = $album; $this->view->title = "Viewing Album {$album->title}"; /*$view = $this->_request->getParam('view', 0); $request = clone $this->getRequest(); // list the viewers of the album if (!strcmp($view, 'viewers')) { $request->setControllerName('viewer') ->setActionName('list') ->setParams(array('album_id' => $id)); } else { // by default, list images in the album $request->setControllerName('image') ->setActionName('list') ->setParams(array('album_id' => $id)); } $this->_helper->actionStack($request);*/ } else { $this->logger->error("No album id passed to viewAction"); } }