Esempio n. 1
0
 public function editAction()
 {
     $contentID = $this->getRequest()->getParam('content');
     $content = Red_Content::getContent($contentID);
     $form = $this->getAddContentForm('Edit This Content!', $content['title'], $content['description']);
     if ($this->getRequest()->isPost()) {
         /**
          * Form Posted ????
          */
         if ($form->isValid($_POST)) {
             $content = $form->getValues();
             $contentID = Red_Content::editContent($content['title'], $content['description'], $contentID);
             if ($contentID) {
                 $this->_helper->redirector('profile', 'user');
             }
         }
     }
     $this->view->form = $form;
 }