r99716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99715‎ | r99716 | r99717 >
Date:18:49, 13 October 2011
Author:catrope
Status:old
Tags:
Comment:
1.17wmf1: Revert r98305, r98308, r98310, r98930 (action=parse iOS hack)
Modified paths:
  • /branches/wmf/1.17wmf1/includes/Title.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/parser/ParserCache.php
@@ -42,7 +42,7 @@
4343
4444 // idhash seem to mean 'page id' + 'rendering hash' (r3710)
4545 $pageid = $article->getID();
46 - $renderkey = (int)($wgRequest->getVal('action') == 'render') + 5*(int)($wgRequest->getVal('action') == 'parse');
 46+ $renderkey = (int)($wgRequest->getVal('action') == 'render');
4747
4848 $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
4949 return $key;
Index: branches/wmf/1.17wmf1/includes/Title.php
@@ -821,7 +821,7 @@
822822
823823 // Ugly quick hack to avoid duplicate prefixes (bug 4571 etc)
824824 // Correct fix would be to move the prepending elsewhere.
825 - if ( $wgRequest->getVal( 'action' ) != 'render' && $wgRequest->getVal( 'action' ) != 'parse' ) {
 825+ if ( $wgRequest->getVal( 'action' ) != 'render' ) {
826826 $url = $wgServer . $url;
827827 }
828828 } else {
@@ -918,12 +918,6 @@
919919 if ( $wgRequest->getVal( 'action' ) == 'render' ) {
920920 $url = $wgServer . $url;
921921 }
922 -
923 - // HACK for iOS issue: expand URLs to absolute in API action=parse
924 - // See http://lists.wikimedia.org/pipermail/mediawiki-api/2011-September/002361.html for details
925 - if ( $wgRequest->getVal( 'action' ) == 'parse' ) {
926 - $url = wfExpandUrl( $url, PROTO_CANONICAL );
927 - }
928922 }
929923 wfRunHooks( 'GetLocalURL', array( &$this, &$url, $query ) );
930924 return $url;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r983051.17wmf1: Dirty, dirty hack to force API action=parse to generate absolute UR...catrope13:09, 28 September 2011
r98308Followup r98305: fix borked URLs with double server names due to an extra act...catrope13:40, 28 September 2011
r983101.17wmf1: Followup r98305, r98308, bump to 4 because I've been trying stuff o...catrope13:49, 28 September 2011
r98930Commit live hack: bump render hash for API parsecatrope21:37, 4 October 2011

Status & tagging log