jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
BryanDavis: Looks good to me, approved
Anomie: Looks good to me, but someone else must approve
Gergő Tisza: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb
b/puppet/modules/mediawiki/templates/docroot/w/missing.php.erb
index 48f5931..8ad2073 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: merged
Gerrit-Change-Id: I3f68bce838accb181febe4cdaaa0c042c653cf6d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits