/** * Installs the uploaded file * */ function installContentElement() { if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) { JLoader::import('helpers.jfinstaller', FALANG_ADMINPATH); $installer = new jfInstaller(); if ($installer->install($_FILES["userfile"])) { $msg = JText::_('Fileupload successful'); } else { JError::raiseError(417, JText::_('Fileupload not successful')); } } else { JError::raiseError(418, JText::_('Fileupload not successful')); } $this->setRedirect('index.php?option=com_falang&task=elements.installer', $msg); }
/** * Installs the uploaded file * */ public function installContentElement() { if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) { JLoader::import('helpers.jfinstaller', JOOMFISH_ADMINPATH); $installer = new jfInstaller(); if ($installer->install($_FILES["userfile"])) { $msg = JText::_('FILEUPLOAD_SUCCESSFUL'); } else { JError::raiseError(417, JText::_('FILEUPLOAD_NOT_SUCCESSFUL')); } } else { JError::raiseError(418, JText::_('FILEUPLOAD_NOT_SUCCESSFUL')); } $this->setRedirect('index.php?option=com_joomfish&task=elements.installer', $msg); }