Index: branches/wmf/1.17wmf1/includes/parser/ParserCache.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | // idhash seem to mean 'page id' + 'rendering hash' (r3710) |
45 | 45 | $pageid = $article->getID(); |
46 | | - $renderkey = (int)($wgRequest->getVal('action') == 'render'); |
| 46 | + $renderkey = (int)($wgRequest->getVal('action') == 'render') + 2*(int)($wgRequest->getVal('action') == 'parse'); |
47 | 47 | |
48 | 48 | $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" ); |
49 | 49 | return $key; |
Index: branches/wmf/1.17wmf1/includes/Title.php |
— | — | @@ -918,6 +918,12 @@ |
919 | 919 | if ( $wgRequest->getVal( 'action' ) == 'render' ) { |
920 | 920 | $url = $wgServer . $url; |
921 | 921 | } |
| 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 | + } |
922 | 928 | } |
923 | 929 | wfRunHooks( 'GetLocalURL', array( &$this, &$url, $query ) ); |
924 | 930 | return $url; |