/** * Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing * or updating your component. This is the last chance you've got to perform any additional installations, clean-up, * database updates and similar housekeeping functions. * * @param string $type install, update or discover_update * @param JInstallerAdapterComponent $parent Parent object */ function postflight($type, $parent) { // Let's install common tables $container = null; $model = null; if (class_exists('FOF30\\Container\\Container')) { try { $container = \FOF30\Container\Container::getInstance('com_akeeba'); } catch (\Exception $e) { $container = null; } } if (is_object($container) && class_exists('FOF30\\Container\\Container') && $container instanceof \FOF30\Container\Container) { /** @var \Akeeba\Backup\Admin\Model\UsageStatistics $model */ try { $model = $container->factory->model('UsageStatistics')->tmpInstance(); } catch (\Exception $e) { $model = null; } } if (is_object($model) && class_exists('Akeeba\\Backup\\Admin\\Model\\UsageStatistics') && $model instanceof Akeeba\Backup\Admin\Model\UsageStatistics && method_exists($model, 'checkAndFixCommonTables')) { try { $model->checkAndFixCommonTables(); } catch (Exception $e) { // Do nothing if that failed. } } // Parent method parent::postflight($type, $parent); // Uninstall post-installation messages we are no longer using $this->uninstallObsoletePostinstallMessages(); // Remove the update sites for this component on installation. The update sites are now handled at the package // level. $this->removeObsoleteUpdateSites($parent); // Remove the FOF 2.x update sites (annoying leftovers) $this->removeFOFUpdateSites(); // If this is a new installation tell it to NOT mark the backup profiles as configured. if (defined('AKEEBA_THIS_IS_INSTALLATION_FROM_SCRATCH')) { $this->markProfilesAsNotConfiguredYet(); } // This is an update of an existing installation if (!defined('AKEEBA_THIS_IS_INSTALLATION_FROM_SCRATCH')) { // Migrate profiles if necessary $this->migrateProfiles(); } }
protected function renderPostUninstallation($parent) { ?> <h2>Akeeba Release System Uninstalation</h2> <?php parent::renderPostUninstallation($parent); }