Index: branches/wmf/1.18wmf1/includes/parser/ParserCache.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | |
50 | 50 | // idhash seem to mean 'page id' + 'rendering hash' (r3710) |
51 | 51 | $pageid = $article->getID(); |
52 | | - $renderkey = (int)($wgRequest->getVal('action') == 'render'); |
| 52 | + $renderkey = (int)($wgRequest->getVal('action') == 'render') + 2*(int)($wgRequest->getVal('action') == 'parse'); |
53 | 53 | |
54 | 54 | $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" ); |
55 | 55 | return $key; |
Index: branches/wmf/1.18wmf1/includes/Title.php |
— | — | @@ -953,6 +953,12 @@ |
954 | 954 | if ( $wgRequest->getVal( 'action' ) == 'render' ) { |
955 | 955 | $url = $wgServer . $url; |
956 | 956 | } |
| 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 | + } |
957 | 963 | } |
958 | 964 | wfRunHooks( 'GetLocalURL', array( &$this, &$url, $query ) ); |
959 | 965 | return $url; |