/** * Add a new folder to this users account. * * @access public */ public function addAction() { if ($this->request->isPost()) { $name = trim($this->request->name); $page = trim($this->request->reqpage); $action = trim($this->request->reqaction); $meta = array(); $meta['name'] = $name; $meta['nev'] = "false"; if (empty($name)) { $adderror = 'A name must be provided for the new folder.'; return $this->_forward($action, $page, null, array('adderror' => $adderror)); } $folder = new Application_Model_Folder($this->user); if ($page == 'nevlocation') { $meta['nev'] = "true"; $meta['nevlocation'] = $name; $page = 'folder'; } $success = $folder->addWithMetaNev($meta); return $this->_forward($action, $page, null, array('success' => $success)); } }