r98306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98305‎ | r98306 | r98307 >
Date:13:22, 28 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Merge 98305 from 1.17wmf1
Modified paths:
  • /branches/wmf/1.18wmf1/includes/Title.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/parser/ParserCache.php
@@ -48,7 +48,7 @@
4949
5050 // idhash seem to mean 'page id' + 'rendering hash' (r3710)
5151 $pageid = $article->getID();
52 - $renderkey = (int)($wgRequest->getVal('action') == 'render');
 52+ $renderkey = (int)($wgRequest->getVal('action') == 'render') + 2*(int)($wgRequest->getVal('action') == 'parse');
5353
5454 $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
5555 return $key;
Index: branches/wmf/1.18wmf1/includes/Title.php
@@ -953,6 +953,12 @@
954954 if ( $wgRequest->getVal( 'action' ) == 'render' ) {
955955 $url = $wgServer . $url;
956956 }
 957+
 958+ // HACK for iOS issue: expand URLs to absolute in API action=parse
 959+ // See http://lists.wikimedia.org/pipermail/mediawiki-api/2011-September/002361.html for details
 960+ if ( $wgRequest->getVal( 'action' ) == 'parse' ) {
 961+ $url = wfExpandUrl( $url, PROTO_CANONICAL );
 962+ }
957963 }
958964 wfRunHooks( 'GetLocalURL', array( &$this, &$url, $query ) );
959965 return $url;

Follow-up revisions

RevisionCommit summaryAuthorDate
r997171.18wmf1: Revert r98306, r98309, r98311, r98929 (action=parse iOS hack)catrope18:50, 13 October 2011

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

Status & tagging log