Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/248989
Change subject: Avoid pointless range scan for 'load-recent-authors'
......................................................................
Avoid pointless range scan for 'load-recent-authors'
This was just set the present time anyway and this
code is called from EditFilterMergedContent, before
the edit in question was saved either.
Bug: T116557
Change-Id: I2f84cff0ad4f65b6c2572a89a267cf42d4a96f94
---
M AbuseFilter.class.php
M AbuseFilterVariableHolder.php
2 files changed, 1 insertion(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter
refs/changes/89/248989/1
diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index ad34395..529beac 100755
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -349,7 +349,6 @@
$vars->setLazyLoadVar( "{$prefix}_recent_contributors",
'load-recent-authors',
array(
- 'cutoff' => wfTimestampNow(),
'title' => $title->getText(),
'namespace' => $title->getNamespace()
) );
diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php
index 1cb1888..6b17370 100644
--- a/AbuseFilterVariableHolder.php
+++ b/AbuseFilterVariableHolder.php
@@ -493,9 +493,7 @@
$result = StringUtils::delimiterReplace( '<',
'>', '', $html );
break;
case 'load-recent-authors':
- $cutOff = $parameters['cutoff'];
$title = Title::makeTitle(
$parameters['namespace'], $parameters['title'] );
-
if ( !$title->exists() ) {
$result = '';
break;
@@ -505,10 +503,7 @@
$sqlTmp = $dbr->selectSQLText(
'revision',
array( 'rev_user_text', 'rev_timestamp'
),
- array(
- 'rev_page' =>
$title->getArticleID(),
- 'rev_timestamp < ' .
$dbr->addQuotes( $dbr->timestamp( $cutOff ) )
- ),
+ array( 'rev_page' =>
$title->getArticleID() ),
__METHOD__,
// Some pages have < 10 authors but
many revisions (e.g. bot pages)
array( 'ORDER BY' => 'rev_timestamp
DESC', 'LIMIT' => 100 )
--
To view, visit https://gerrit.wikimedia.org/r/248989
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f84cff0ad4f65b6c2572a89a267cf42d4a96f94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits