/** * Create an album */ public function createalbumAction() { $request = $this->getRequest(); $Albums = new Application_Model_Albums(); $album_form = new Application_Form_AddAlbum(); $this->view->album_form = $album_form; $this->prepareProfile($this->profile); $this->prepareImagesAlbumsCount(); if ($request->isPost() && $album_form->isValid($_POST)) { $album_name = $album_form->getValue('album_name'); $description = $album_form->getValue('description'); $Albums->createAlbum($album_name, $description); Application_Plugin_Alerts::success($this->view->translate('New album created')); $this->redirect('profiles/albums'); } }