Exemplo n.º 1
0
 /**
  * save translatio to file
  * 
  */
 function save()
 {
     $cid = JRequest::getVar('cid', array(), 'post', 'array');
     $cid = $cid[0];
     $post = MissingtAdminHelper::getRealPOST();
     // message type for redirect
     $type = 'message';
     $model = $this->getModel('file');
     if ($model->store($post)) {
         $msg = JText::_('COM_MISSINGT_FILE_SAVED_SUCCESS');
     } else {
         $msg = JText::_('COM_MISSINGT_FILE_SAVED_FAILURE') . $model->getError();
         $type = 'error';
     }
     if ($this->getTask() == 'save') {
         $link = 'index.php?option=com_missingt&view=files';
     } else {
         $link = 'index.php?option=com_missingt&controller=files&task=translate&cid[]=' . $cid . '&from=' . JRequest::getVar('from') . '&to=' . JRequest::getVar('to') . '&location=' . JRequest::getVar('location');
     }
     $this->setRedirect($link, $msg, $type);
     $this->redirect();
 }
Exemplo n.º 2
0
 function getResult()
 {
     $post = MissingtAdminHelper::getRealPOST();
     $text = $this->_convertToIni($post);
     return $text;
 }