r98308 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98307‎ | r98308 | r98309 >
Date:13:40, 28 September 2011
Author:catrope
Status:old
Tags:
Comment:
Followup r98305: fix borked URLs with double server names due to an extra action=render check that wasn't present in trunk, and bump the renderkey for action=parse to force invalidations so cached entries with double server names aren't served any more
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') + 2*(int)($wgRequest->getVal('action') == 'parse');
 46+ $renderkey = (int)($wgRequest->getVal('action') == 'render') + 3*(int)($wgRequest->getVal('action') == 'parse');
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' ) {
 825+ if ( $wgRequest->getVal( 'action' ) != 'render' && $wgRequest->getVal( 'action' ) != 'parse' ) {
826826 $url = $wgServer . $url;
827827 }
828828 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r983091.18wmf1: Merge r98308 from 1.17wmf1catrope13:41, 28 September 2011
r983101.17wmf1: Followup r98305, r98308, bump to 4 because I've been trying stuff o...catrope13:49, 28 September 2011
r997161.17wmf1: Revert r98305, r98308, r98310, r98930 (action=parse iOS hack)catrope18:49, 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