r83995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83994‎ | r83995 | r83996 >
Date:03:05, 15 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
Revert r83994, no longer needed
Modified paths:
  • /branches/wmf/1.17wmf1/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/parser/ParserCache.php
@@ -156,30 +156,6 @@
157157 wfIncrStats( "pcache_hit" );
158158 }
159159
160 - // WMF logging hack for bug 27891 -- TS
161 - if ( session_id() && substr( session_id(), 0, 1 ) === '0' ) {
162 - $info = array(
163 - 'title' => $article->getTitle()->getPrefixedDBkey(),
164 - 'key' => $parserOutputKey,
165 - 'mod-time' => $value->mTimestamp,
166 - );
167 - if ( isset( $_SESSION['wmfLastSaveInfo'] ) ) {
168 - $lastInfo = $_SESSION['wmfLastSaveInfo'];
169 - if ( $lastInfo['title'] == $info['title']
170 - && $lastInfo['mod-time'] !== $info['mod-time']
171 - && ( strpos( @$_SERVER['HTTP_REFERER'], 'action=submit' ) !== false ) )
172 - {
173 - wfDebugLog( 'bug-27891',
174 - "User: " . $GLOBALS['wgUser']->getName() . ', ' .
175 - "Session: " . session_id() . ', ' .
176 - print_r( compact( 'lastInfo', 'info' ), true ) .
177 - "\n" );
178 - }
179 - }
180 - }
181 - // End hack
182 -
183 -
184160 wfProfileOut( __METHOD__ );
185161 return $value;
186162 }
@@ -212,35 +188,7 @@
213189 $this->mMemc->set( $parserOutputKey, $parserOutput, $expire );
214190
215191 // ...and its pointer
216 - $optionsKeyString = $this->getOptionsKey( $article );
217 - $this->mMemc->set( $optionsKeyString, $optionsKey, $expire );
218 -
219 - // WMF logging hack for bug 27891 -- TS
220 - if ( session_id() && substr( session_id(), 0, 1 ) === '0' ) {
221 - $info = array(
222 - 'title' => $article->getTitle()->getPrefixedDBkey(),
223 - 'key' => $parserOutputKey,
224 - 'optionsKey' => $optionsKeyString,
225 - 'now' => $now,
226 - 'mod-time' => $parserOutput->mTimestamp,
227 - );
228 - if ( $GLOBALS['wgRequest']->getVal( 'action' ) == 'submit' ) {
229 - $_SESSION['wmfLastSaveInfo'] = $info;
230 - } elseif ( isset( $_SESSION['wmfLastSaveInfo'] ) ) {
231 - $lastInfo = $_SESSION['wmfLastSaveInfo'];
232 - if ( $lastInfo['title'] == $info['title']
233 - && ( strpos( @$_SERVER['HTTP_REFERER'], 'action=submit' ) !== false ) )
234 - {
235 - wfDebugLog( 'bug-27891',
236 - "User: " . $GLOBALS['wgUser']->getName() . ', ' .
237 - "Session: " . session_id() . ', ' .
238 - print_r( compact( 'lastInfo', 'info' ), true ) .
239 - "\n" );
240 - }
241 - }
242 - }
243 - // End hack
244 -
 192+ $this->mMemc->set( $this->getOptionsKey( $article ), $optionsKey, $expire );
245193 } else {
246194 wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );
247195 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83994Logging hack for bug 27891. Committing so I can revert it without being too sad.tstarling03:04, 15 March 2011

Status & tagging log