BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/278540
Change subject: Fix missing.php URLs for Labs wikis ...................................................................... Fix missing.php URLs for Labs wikis Don't append the port number to wiki URLs on missing.php when the port is 80 or 443. Change-Id: I3f68bce838accb181febe4cdaaa0c042c653cf6d --- M puppet/modules/mediawiki/templates/docroot/w/missing.php.erb 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/40/278540/1 diff --git a/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb b/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb index 48f5931..0c797d7 100644 --- a/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb +++ b/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb @@ -76,13 +76,17 @@ <?php $port = $_SERVER['SERVER_PORT']; $path = $_SERVER['REQUEST_URI']; -$url = htmlspecialchars( "<%= scope['::mediawiki::server_url'] %>{$path}", ENT_QUOTES ); +$portFragment = ( $port == 80 || $port == 443 ) ? '' : ":{$port}"; +$url = htmlspecialchars( + "<%= @default_wiki %>{$portFragment}{$path}", + ENT_QUOTES +); echo "<li><a href=\"{$url}\">devwiki</a></li>"; foreach ( $GLOBALS['wgLocalDatabases'] as $db ) { $wiki = substr( $db, 0, -4 ); if ( $wiki ) { $url = htmlspecialchars( - "//{$wiki}<%= @base_domain %>:{$port}{$path}", + "//{$wiki}<%= @base_domain %>{$portFragment}{$path}", ENT_QUOTES ); echo "<li><a href=\"{$url}\">{$db}</a></li>"; -- To view, visit https://gerrit.wikimedia.org/r/278540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f68bce838accb181febe4cdaaa0c042c653cf6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits