public function executeUpdateOrders(sfWebRequest $request) { //Check that the HTTP method is 'POST': $this->forward404Unless($request->isMethod(sfRequest::POST)); //Get the POST parameters: $update_order = $request->getParameter('update_order', array()); $update_short_designation = $request->getParameter('update_short_designation', array()); $update_id = $request->getParameter('update_id', array()); $table = $request->getParameter('table'); //Update the orders and the short designations: PredefinedLists::update($update_id, $update_short_designation, $update_order, $table); //Re-get the table that have been updated $data = PredefinedLists::getData(array($table => null)); $this->updated_table = $data[$table]; if ($table == PredefinedLists::UNITY) { $this->setTemplate('updateUnities', 'configuration'); } else { if ($table == PredefinedLists::COMPUTER_OS) { $this->setTemplate('updateOs', 'configuration'); } else { $this->table_name = $table; $this->setTemplate('updateLists', 'configuration'); } } }