function com_install() { global $cloneManifest, $mainframe, $cloneParent; $session =& JFactory::getSession(); $si = new SubInstaller(); $ret = $si->install(); $errorArray = $si->getError(); $session->set('jsn_install_error', $errorArray); $document =& $cloneManifest->document; $version =& $document->getElementByPath('version'); $edition =& $document->getElementByPath('edition'); $version = $version->data(); $edition = str_replace(' ', '_', JString::strtolower($edition->data())); $packageFile = JPATH_ROOT . DS . 'tmp' . DS . 'jsn_imageshow_' . $edition . '_' . $version . '_install.zip'; $packageExtDir = $cloneParent->getPath('source'); $flagInstallation = false; $disable = ''; $resultCheckManifestFile = checkManifestFileExist(); if ($resultCheckManifestFile == true) { $objUpgradeHelper = new JSNUpgradeHelper($cloneManifest); $objUpgradeHelper->executeUpgrade(); $objUpgradeDBUtil = new JSNISUpgradeDBUtil($cloneManifest); $objUpgradeDBUtil->executeUpgradeDB(); } if (!$cloneParent->copyManifest()) { $cloneParent->abort(JText::_('Component') . ' ' . JText::_('Install') . ': ' . JText::_('Could not copy setup file')); return false; } removeFile($packageFile); removeFolder($packageExtDir); $mainframe->redirect('index.php?option=com_imageshow&controller=installer&task=installcore'); }
function com_uninstall() { $si = new SubInstaller(); $return = $si->uninstall(); if ($return) { uninstallTheme(); } }
/** * API entry point. Called from main installer. */ function com_uninstall() { $si = new SubInstaller(); return $si->uninstall(); }