Synchronizes the packages with the file system.
public static synchronizeWithFileSystem ( ) |
protected function doAction() { if (($msg = $this->extractArchiveTo(rex_path::addon($this->addonkey))) !== true) { return $msg; } rex_package_manager::synchronizeWithFileSystem(); rex_install_packages::addedPackage($this->addonkey); }
private static function installAddons($uninstallBefore = false, $installDump = true) { $addonErr = ''; rex_package_manager::synchronizeWithFileSystem(); if ($uninstallBefore) { foreach (array_reverse(rex_package::getSystemPackages()) as $package) { $manager = rex_package_manager::factory($package); $state = $manager->uninstall($installDump); if ($state !== true) { $addonErr .= '<li>' . $package->getPackageId() . '<ul><li>' . $manager->getMessage() . '</li></ul></li>'; } } } foreach (rex::getProperty('system_addons') as $packageRepresentation) { $state = true; $package = rex_package::get($packageRepresentation); $manager = rex_package_manager::factory($package); if ($state === true && !$package->isInstalled()) { $state = $manager->install($installDump); } if ($state !== true) { $addonErr .= '<li>' . $package->getPackageId() . '<ul><li>' . $manager->getMessage() . '</li></ul></li>'; } if ($state === true && !$package->isAvailable()) { $state = $manager->activate(); if ($state !== true) { $addonErr .= '<li>' . $package->getPackageId() . '<ul><li>' . $manager->getMessage() . '</li></ul></li>'; } } } if ($addonErr != '') { $addonErr = '<ul class="rex-ul1"> <li> <h3 class="rex-hl3">' . rex_i18n::msg('setup_513', '<span class="rex-error">', '</span>') . '</h3> <ul>' . $addonErr . '</ul> </li> </ul>'; } return $addonErr; }
if ($author) { $credits .= '<dt>' . rex_i18n::msg('credits_author') . '</dt><dd>' . htmlspecialchars($author) . '</dd>'; } if ($supportPage) { $credits .= '<dt>' . rex_i18n::msg('credits_supportpage') . '</dt><dd><a href="http://' . $supportPage . '" onclick="window.open(this.href); return false;">' . $supportPage . '</a></dd>'; } $credits .= '</dl>'; $fragment = new rex_fragment(); $fragment->setVar('title', rex_i18n::msg('credits'), false); $fragment->setVar('body', $credits, false); echo $fragment->parse('core/page/section.php'); echo '<a class="btn btn-back" href="javascript:history.back();">' . rex_i18n::msg('package_back') . '</a>'; } // ----------------- OUT if ($subpage == '') { rex_package_manager::synchronizeWithFileSystem(); $content .= ' <table class="table table-hover"> <thead> <tr> <th class="rex-table-icon"> </th> <th>' . rex_i18n::msg('package_hname') . '</th> <th>' . rex_i18n::msg('package_hversion') . '</th> <th class="rex-table-slim">' . rex_i18n::msg('package_hhelp') . '</th> <th class="rex-table-action">' . rex_i18n::msg('package_hinstall') . '</th> <th class="rex-table-action">' . rex_i18n::msg('package_hactive') . '</th> <th class="rex-table-action" colspan="2">' . rex_i18n::msg('package_hdelete') . '</th> </tr> </thead> <tbody>'; $getLink = function (rex_package $package, $function, $icon = '', $confirm = false, $key = null) {