Example #1
0
 public function cancel()
 {
     // Check for request forgeries
     MRequest::checkToken() or mexit('Invalid Token');
     $vars = '&ja_tbl_g=' . base64_encode($this->_table) . '&ja_qry_g=' . base64_encode($this->_query);
     $this->setRedirect('index.php?option=com_miwosql' . $vars, $msg);
 }
Example #2
0
 public function remove()
 {
     // Check for request forgeries
     MRequest::checkToken() or jexit('Invalid Token');
     $cid = MRequest::getVar('cid', array(), '', 'array');
     MArrayHelper::toInteger($cid);
     $msg = '';
     for ($i = 0, $n = count($cid); $i < $n; $i++) {
         $query = MTable::getInstance('Query', 'Table');
         if (!$query->delete($cid[$i])) {
             $msg .= $query->getError();
             $tom = "error";
         } else {
             $msg = MTEXT::_('COM_MIWOSQL_QUERY_DELETED');
             $tom = "";
         }
     }
     $this->setRedirect('index.php?option=com_miwosql&controller=queries', $msg, $tom);
 }