r44414 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44413‎ | r44414 | r44415 >
Date:18:41, 10 December 2008
Author:vyznev
Status:ok (Comments)
Tags:
Comment:
revert r44412 and part of r44406: keep the improved new page URLs, but use the old getInternalURL()/preg_replace() hack to generate them
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -589,8 +589,7 @@
590590 }
591591
592592 protected function getIRCLine() {
593 - global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki,
594 - $wgServer, $wgScript, $wgRC2UDPScriptUrl;
 593+ global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki;
595594
596595 // FIXME: Would be good to replace these 2 extract() calls with something more explicit
597596 // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that]
@@ -605,26 +604,22 @@
606605 $title = $titleObj->getPrefixedText();
607606 $title = self::cleanupForIRC( $title );
608607
609 - // XXX: This used to call Title::getInternalURL() and then strip out the title, but that's
610 - // a lot of complex code just to prepend two globals to a query string. Simplified.
611608 if( $rc_type == RC_LOG ) {
612609 $url = '';
613610 } else {
614 - if( $wgRC2UDPScriptUrl !== false ) {
615 - $url = $wgRC2UDPScriptUrl;
616 - } else {
617 - $url = $wgServer . $wgScript;
618 - }
619 -
620611 if( $rc_type == RC_NEW ) {
621 - $url .= "?oldid=$rc_this_oldid";
 612+ $url = "oldid=$rc_this_oldid";
622613 } else {
623 - $url .= "?diff=$rc_this_oldid&oldid=$rc_last_oldid";
 614+ $url = "diff=$rc_this_oldid&oldid=$rc_last_oldid";
624615 }
625 -
626616 if( $wgUseRCPatrol || ($rc_type == RC_NEW && $wgUseNPPatrol) ) {
627617 $url .= "&rcid=$rc_id";
628618 }
 619+ // XXX: *HACK* this should use getFullURL(), hacked for SSL madness --brion 2005-12-26
 620+ // XXX: *HACK^2* the preg_replace() undoes much of what getInternalURL() does, but we
 621+ // XXX: need to call it so that URL paths on the Wikimedia secure server can be fixed
 622+ // XXX: by a custom GetInternalURL hook --vyznev 2008-12-10
 623+ $url = preg_replace( '/title=[^&]*&/', '', $titleObj->getInternalURL( $url ) );
629624 }
630625
631626 if( isset( $oldSize ) && isset( $newSize ) ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2143,13 +2143,6 @@
21442144 $wgRC2UDPInterwikiPrefix = false;
21452145
21462146 /**
2147 - * This prefix is prepended to each URL in the IRC feed. If left false, the prefix
2148 - * $wgServer . $wgScript is used by default. You should set this if your $wgServer
2149 - * or $wgScript might vary, e.g. if your wiki can be reached via both HTTP and HTTPS.
2150 - */
2151 -$wgRC2UDPScriptUrl = false;
2152 -
2153 -/**
21542147 * Set to true to omit "bot" edits (by users with the bot permission) from the
21552148 * UDP feed.
21562149 */
Index: trunk/phase3/RELEASE-NOTES
@@ -70,9 +70,6 @@
7171 using $wgUsePrivateIPs.
7272 * (bug 11009) The null file (ie: /dev/null) can be configured with $wgNullFile.
7373 Useful for overriding if the normal file isn't accessible
74 -* $wgRC2UDPScriptUrl can be used to set the prefix for URLs in the RC->IRC feed
75 - where enabled. The default is $wgServer . $wgScript (used to effectively be
76 - $wgInternalServer . $wgScript).
7774
7875 === Migrated extensions ===
7976 The following extensions are migrated into MediaWiki 1.14:

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44406(bug 4253, bug 16586) Don't repeat titles of new pages in URLs in the RC->IRC...vyznev15:56, 10 December 2008
r44412Seems r44406 would've broken the RC feed on secure.wikimedia org: fix by intr...vyznev17:03, 10 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   18:48, 10 December 2008

whee :D

Status & tagging log