Seems r44406 would've broken the RC feed on secure.wikimedia org: fix by introducing...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 10 Dec 2008 17:03:57 +0000 (17:03 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Wed, 10 Dec 2008 17:03:57 +0000 (17:03 +0000)
NOTE: Wikimedia's secure.php needs to be updated to use the new variable.  It might be possible to retire the fixupSquidUrl() hack once this is done, though I'm not sure if anything else relies on it.

RELEASE-NOTES
includes/DefaultSettings.php
includes/RecentChange.php

index 8e4589e..3817551 100644 (file)
@@ -70,6 +70,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   using $wgUsePrivateIPs.
 * (bug 11009) The null file (ie: /dev/null) can be configured with $wgNullFile. 
   Useful for overriding if the normal file isn't accessible
+* $wgRC2UDPScriptUrl can be used to set the prefix for URLs in the RC->IRC feed
+  where enabled.  The default is $wgServer . $wgScript (used to effectively be
+  $wgInternalServer . $wgScript).
 
 === Migrated extensions ===
 The following extensions are migrated into MediaWiki 1.14:
index 4510a91..0178f04 100644 (file)
@@ -2142,6 +2142,13 @@ $wgRC2UDPPrefix = '';
  */
 $wgRC2UDPInterwikiPrefix = false;
 
+/**
+ * This prefix is prepended to each URL in the IRC feed.  If left false, the prefix
+ * $wgServer . $wgScript is used by default.  You should set this if your $wgServer
+ * or $wgScript might vary, e.g. if your wiki can be reached via both HTTP and HTTPS.
+ */
+$wgRC2UDPScriptUrl = false;
+
 /**
  * Set to true to omit "bot" edits (by users with the bot permission) from the 
  * UDP feed.
index 10834ba..c4f1c7e 100644 (file)
@@ -590,7 +590,7 @@ class RecentChange
 
        protected function getIRCLine() {
                global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki,
-                       $wgInternalServer, $wgScript;
+                       $wgServer, $wgScript, $wgRC2UDPScriptUrl;
 
                // FIXME: Would be good to replace these 2 extract() calls with something more explicit
                // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that]
@@ -610,13 +610,18 @@ class RecentChange
                if( $rc_type == RC_LOG ) {
                        $url = '';
                } else {
-                       // XXX: *HACK* this should use $wgServer, hacked for SSL madness --brion 2005-12-26
-                       $url = $wgInternalServer . $wgScript;
+                       if( $wgRC2UDPScriptUrl !== false ) {
+                               $url = $wgRC2UDPScriptUrl;
+                       } else {
+                               $url = $wgServer . $wgScript;
+                       }
+
                        if( $rc_type == RC_NEW ) {
                                $url .= "?oldid=$rc_this_oldid";
                        } else {
                                $url .= "?diff=$rc_this_oldid&oldid=$rc_last_oldid";
                        }
+
                        if( $wgUseRCPatrol || ($rc_type == RC_NEW && $wgUseNPPatrol) ) {
                                $url .= "&rcid=$rc_id";
                        }