Cenarium has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/336828 )
Change subject: Put fileSearchOptions() modification back to where it belongs
......................................................................
Put fileSearchOptions() modification back to where it belongs
The fileSearchOptions() modification that happens when the stable
versions of files is retrieved during autoreview is put back to
where it belongs, i.e. inside the closing braces above it.
This didn't result in any visible change to end-users, the only
effect was to run queries that were only necessary to be run on
projects using full FlaggedRevs like dewiki, which however were
completely unecessary on projects like enwiki.
Change-Id: I2bd8eccfdc7ac1e74b048ad9a272c1952d454dec
---
M backend/FlaggedRevs.class.php
1 file changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs
refs/changes/28/336828/1
diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
index ff630a3..b13dfc8 100644
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -1003,16 +1003,16 @@
}
}
}
- }
- foreach ( $poutput->getFileSearchOptions() as $dbKey => $info )
{
- if ( !isset( $fVersions[$dbKey] ) ) {
- $srev = FlaggedRevision::newFromStable(
Title::makeTitle( NS_FILE, $dbKey ) );
- if ( $srev && $srev->getFileTimestamp() ) { //
use stable
- $fVersions[$dbKey]['time'] =
$srev->getFileTimestamp();
- $fVersions[$dbKey]['sha1'] =
$srev->getFileSha1();
- } else { // use current
- $fVersions[$dbKey]['time'] =
$info['time'];
- $fVersions[$dbKey]['sha1'] =
$info['sha1'];
+ foreach ( $poutput->getFileSearchOptions() as $dbKey =>
$info ) {
+ if ( !isset( $fVersions[$dbKey] ) ) {
+ $srev = FlaggedRevision::newFromStable(
Title::makeTitle( NS_FILE, $dbKey ) );
+ if ( $srev && $srev->getFileTimestamp()
) { // use stable
+ $fVersions[$dbKey]['time'] =
$srev->getFileTimestamp();
+ $fVersions[$dbKey]['sha1'] =
$srev->getFileSha1();
+ } else { // use current
+ $fVersions[$dbKey]['time'] =
$info['time'];
+ $fVersions[$dbKey]['sha1'] =
$info['sha1'];
+ }
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/336828
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bd8eccfdc7ac1e74b048ad9a272c1952d454dec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Cenarium <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits