r57129 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57128‎ | r57129 | r57130 >
Date:18:44, 30 September 2009
Author:werdna
Status:ok
Tags:
Comment:
Replace hardcoded api.php with a call to wfScript(api) in a few places per comments on code-review r57120
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -25,7 +25,7 @@
2626 global $wgServer, $wgScriptPath, $wgFeedClasses;
2727 $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
2828 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken );
29 - $feedTemplate = $wgServer . $wgScriptPath . '/api.php?';
 29+ $feedTemplate = wfScript('api').'?';
3030
3131 foreach( $wgFeedClasses as $format => $class ) {
3232 $theseParams = $apiParams + array( 'feedformat' => $format );
Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -143,7 +143,7 @@
144144 $thread = $this->thread->topmostThread()->title()->getPrefixedText();
145145 $apiParams = array( 'action' => 'feedthreads', 'type' => 'replies|newthreads',
146146 'thread' => $thread );
147 - $urlPrefix = $wgServer . $wgScriptPath."/api.php?";
 147+ $urlPrefix = wfScript('api').'?';
148148 foreach( $wgFeedClasses as $format => $class ) {
149149 $theseParams = $apiParams + array( 'feedformat' => $format );
150150 $url = $urlPrefix . wfArrayToCGI( $theseParams );
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -187,7 +187,7 @@
188188 global $wgFeedClasses, $wgScriptPath, $wgServer;
189189 $apiParams = array( 'action' => 'feedthreads', 'type' => 'replies|newthreads',
190190 'talkpage' => $this->title->getPrefixedText() );
191 - $urlPrefix = $wgServer . $wgScriptPath."/api.php?";
 191+ $urlPrefix = wfScript('api').'?';
192192 foreach( $wgFeedClasses as $format => $class ) {
193193 $theseParams = $apiParams + array( 'feedformat' => $format );
194194 $url = $urlPrefix . wfArrayToCGI( $theseParams );

Follow-up revisions

RevisionCommit summaryAuthorDate
r57145Unmerge r57129 and r57122 from wmf-deployment (LiquidThreads only), breaks be...werdna19:38, 30 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57120Fix for r57119, remove double-/ in URLswerdna17:44, 30 September 2009

Status & tagging log