From: Victor Vasiliev Date: Sun, 20 Jan 2008 06:50:53 +0000 (+0000) Subject: Fix AJAX search caching on invalid titles X-Git-Tag: 1.31.0-rc.0~49900 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=71a05b82bad4357d25f94212083ee29c27014b03;p=lhc%2Fweb%2Fwiklou.git Fix AJAX search caching on invalid titles --- 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'] );