Skip to content

Commit

Permalink
Show all sites item only if multi sites is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Oct 1, 2019
1 parent ca74816 commit 539e39a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/Plugin/Controller.php
Expand Up @@ -751,6 +751,7 @@ protected function setBasicVariablesNoneAdminView($view)

$pluginManager = Plugin\Manager::getInstance();
$view->relativePluginWebDirs = (object) $pluginManager->getWebRootDirectoriesForCustomPluginDirs();
$view->isMultiSitesEnabled = Manager::getInstance()->isPluginActivated('MultiSites');

self::setHostValidationVariablesView($view);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/CoreHome/templates/_siteSelectHeader.twig
@@ -1,3 +1,3 @@
<div class="top_bar_sites_selector piwikTopControl">
<div piwik-siteselector show-selected-site="true" class="sites_autocomplete"></div>
<div piwik-siteselector show-selected-site="true" show-all-sites-item="{{ (isMultiSitesEnabled|default) ? 'true' : 'false' }}" class="sites_autocomplete"></div>
</div>

0 comments on commit 539e39a

Please sign in to comment.