getArchiveUrl() public method

public getArchiveUrl ( string $version, boolean $https = true ) : string
$version string
$https boolean Whether to use HTTPS if supported of not. If false, will use HTTP.
return string
Example #1
0
 public function newVersionAvailable()
 {
     Piwik::checkUserHasSuperUserAccess();
     $this->checkNewVersionIsAvailableOrDie();
     $newVersion = $this->updater->getLatestVersion();
     $view = new View('@CoreUpdater/newVersionAvailable');
     $this->addCustomLogoInfo($view);
     $this->setBasicVariablesView($view);
     $view->piwik_version = Version::VERSION;
     $view->piwik_new_version = $newVersion;
     $incompatiblePlugins = $this->getIncompatiblePlugins($newVersion);
     $marketplacePlugins = array();
     try {
         if (!empty($incompatiblePlugins)) {
             $marketplace = new Marketplace();
             $marketplacePlugins = $marketplace->getAllAvailablePluginNames();
         }
     } catch (\Exception $e) {
     }
     $view->marketplacePlugins = $marketplacePlugins;
     $view->incompatiblePlugins = $incompatiblePlugins;
     $view->piwik_latest_version_url = $this->updater->getArchiveUrl($newVersion);
     $view->can_auto_update = Filechecks::canAutoUpdate();
     $view->makeWritableCommands = Filechecks::getAutoUpdateMakeWritableMessage();
     return $view->render();
 }