Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -589,7 +589,8 @@ |
590 | 590 | } |
591 | 591 | |
592 | 592 | protected function getIRCLine() { |
593 | | - global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki; |
| 593 | + global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki, |
| 594 | + $wgInternalServer, $wgScript; |
594 | 595 | |
595 | 596 | // FIXME: Would be good to replace these 2 extract() calls with something more explicit |
596 | 597 | // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that] |
— | — | @@ -604,19 +605,21 @@ |
605 | 606 | $title = $titleObj->getPrefixedText(); |
606 | 607 | $title = self::cleanupForIRC( $title ); |
607 | 608 | |
608 | | - // FIXME: *HACK* these should be getFullURL(), hacked for SSL madness --brion 2005-12-26 |
| 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. |
609 | 611 | if( $rc_type == RC_LOG ) { |
610 | 612 | $url = ''; |
611 | | - } elseif( $rc_new && ($wgUseRCPatrol || $wgUseNPPatrol) ) { |
612 | | - $url = $titleObj->getInternalURL("rcid=$rc_id"); |
613 | | - } else if( $rc_new ) { |
614 | | - $url = $titleObj->getInternalURL(); |
615 | | - } else if( $wgUseRCPatrol ) { |
616 | | - $url = $titleObj->getInternalURL("diff=$rc_this_oldid&oldid=$rc_last_oldid&rcid=$rc_id"); |
617 | | - $url = preg_replace('/title=[^&]*&/', '', $url); |
618 | 613 | } else { |
619 | | - $url = $titleObj->getInternalURL("diff=$rc_this_oldid&oldid=$rc_last_oldid"); |
620 | | - $url = preg_replace('/title=[^&]*&/', '', $url); |
| 614 | + // XXX: *HACK* this should use $wgServer, hacked for SSL madness --brion 2005-12-26 |
| 615 | + $url = $wgInternalServer . $wgScript; |
| 616 | + if( $rc_type == RC_NEW ) { |
| 617 | + $url .= "?oldid=$rc_this_oldid"; |
| 618 | + } else { |
| 619 | + $url .= "?diff=$rc_this_oldid&oldid=$rc_last_oldid"; |
| 620 | + } |
| 621 | + if( $wgUseRCPatrol || ($rc_type == RC_NEW && $wgUseNPPatrol) ) { |
| 622 | + $url .= "&rcid=$rc_id"; |
| 623 | + } |
621 | 624 | } |
622 | 625 | |
623 | 626 | if( isset( $oldSize ) && isset( $newSize ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -394,6 +394,8 @@ |
395 | 395 | * (bug 14268) SVG image sizes now extracted with proper XML parser |
396 | 396 | * (bug 14365) RepoGroup::findFiles() no longer crashes if passed an invalid |
397 | 397 | title via the API |
| 398 | +* (bug 4253, bug 16586) Revision ID is now given instead of title in URLs for |
| 399 | + new pages in the recent changes IRC feed |
398 | 400 | |
399 | 401 | === API changes in 1.14 === |
400 | 402 | |