Ejemplo n.º 1
0
 public function setFavoriteAction()
 {
     $project_id = $this->_getParam('project_id');
     $set = $this->_getParam('set') == "1" ? true : false;
     $status = array('status' => 0);
     if (!is_numeric($project_id)) {
         $status['error'] = 'No Project ID given.';
     } else {
         Application_Model_Projects::setFavorite($project_id, $set);
         $status['status'] = 1;
     }
     $this->getResponse()->setBody(Zend_Json::encode($status));
 }