On Tue, Apr 8, 2008 at 6:40 PM, aaron@svn.wikimedia.org wrote:
Log Message:
Don't set $this->pattern unless it is allowed
$this->pattern = $pattern; $ns = $title->getNamespace(); if( $pattern && !$wgMiserMode ) { # use escapeLike to avoid expensive search patterns like 't%st%' $safetitle = $this->mDb->escapeLike( $title->getDBkey() ); $this->mConds['log_namespace'] = $ns; $this->mConds[] = "log_title LIKE '$safetitle%'";
$this->pattern = $pattern; } else {
Does this need to look at $wgMiserMode at all? A prefix search should be fine efficiency-wise.