From 71a05b82bad4357d25f94212083ee29c27014b03 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 20 Jan 2008 06:50:53 +0000 Subject: [PATCH] Fix AJAX search caching on invalid titles --- includes/AjaxFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/AjaxFunctions.php b/includes/AjaxFunctions.php index d630461741..9704e83a24 100644 --- a/includes/AjaxFunctions.php +++ b/includes/AjaxFunctions.php @@ -86,7 +86,7 @@ function wfSajaxSearch( $term ) { $term = $wgContLang->ucfirst( $term ); $term_title = Title::newFromText( $term ); - $memckey = wfMemcKey( 'ajaxsearch', md5( $term_title->getFullText() ) ); + $memckey = $term_title ? wfMemcKey( 'ajaxsearch', md5( $term_title->getFullText() ) ) : wfMemcKey( 'ajaxsearch', md5( $term ) ); $cached = $wgMemc->get($memckey); if( is_array( $cached ) && $cached['version'] == AJAX_SEARCH_VERSION ) { $response = new AjaxResponse( $cached['html'] ); -- 2.20.1