Ejemplo n.º 1
0
 function save()
 {
     $mainframe =& JFactory::getApplication();
     JRequest::checkToken() or jexit('Invalid Token');
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'models' . DS . 'item.php';
     $model = new K2ModelItem();
     $model->save(true);
     $mainframe->close();
 }
Ejemplo n.º 2
0
 function save()
 {
     $mainframe = JFactory::getApplication();
     JRequest::checkToken() or jexit('Invalid Token');
     JRequest::setVar('tmpl', 'component');
     $language = JFactory::getLanguage();
     $language->load('com_k2', JPATH_ADMINISTRATOR);
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'models' . DS . 'item.php';
     $model = new K2ModelItem();
     $model->save(true);
     $mainframe->close();
 }