Exemple #1
0
 /**
  * cancel editing a record
  * @return void
  */
 function cancel()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     $msg = JText::_('AVR_MSG_CANCELLED');
     JRequest::setVar('view', 'playlist');
     JRequest::setVar('controller', 'playlist');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     AvrGenericHelper::qmsg($msg);
     parent::display();
 }
 function saveorder()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     $model = $this->getModel('playlist');
     $cid = JRequest::getVar('cid', array(), 'post', 'array');
     $order = JRequest::getVar('order', array(), 'post', 'array');
     JArrayHelper::toInteger($cid);
     JArrayHelper::toInteger($order);
     $model->saveorder($cid, $order);
     $msg = JText::_('New ordering saved');
     $data =& $model->getData();
     JRequest::setVar('data', base64_encode(serialize($data)));
     JRequest::setVar('view', 'playlist');
     JRequest::setVar('controller', 'playlist');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
     JRequest::setVar('filename', $model->getFilename());
     AvrGenericHelper::qmsg($msg);
     parent::display();
 }