mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-12-24 03:53:07 +00:00
Added limit for search query
Change-Id: I62cd622cfd2f9d44f09648ec51932acdb54a3991
(cherry picked from commit c854531150
)
This commit is contained in:
parent
42748d0d6d
commit
d5fc4b8655
|
@ -35,9 +35,14 @@ class ReplaceTextSearch {
|
|||
|
||||
self::categoryCondition( $category, $tables, $conds );
|
||||
self::prefixCondition( $prefix, $conds );
|
||||
$sort = [ 'ORDER BY' => 'page_namespace, page_title' ];
|
||||
$options = [
|
||||
'ORDER BY' => 'page_namespace, page_title',
|
||||
// 250 seems like a reasonable limit for one screen.
|
||||
// @TODO - should probably be a setting.
|
||||
'LIMIT' => 250
|
||||
];
|
||||
|
||||
return $dbr->select( $tables, $vars, $conds, __METHOD__, $sort );
|
||||
return $dbr->select( $tables, $vars, $conds, __METHOD__, $options );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue