r29967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29966‎ | r29967 | r29968 >
Date:06:50, 20 January 2008
Author:vasilievvv
Status:old
Tags:
Comment:
Fix AJAX search caching on invalid titles
Modified paths:
  • /trunk/phase3/includes/AjaxFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/AjaxFunctions.php
@@ -86,7 +86,7 @@
8787 $term = $wgContLang->ucfirst( $term );
8888 $term_title = Title::newFromText( $term );
8989
90 - $memckey = wfMemcKey( 'ajaxsearch', md5( $term_title->getFullText() ) );
 90+ $memckey = $term_title ? wfMemcKey( 'ajaxsearch', md5( $term_title->getFullText() ) ) : wfMemcKey( 'ajaxsearch', md5( $term ) );
9191 $cached = $wgMemc->get($memckey);
9292 if( is_array( $cached ) && $cached['version'] == AJAX_SEARCH_VERSION ) {
9393 $response = new AjaxResponse( $cached['html'] );

Status & tagging log