dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
a1f1af7
)
Merge "Replaced some !count() with explicit and more efficient check"
author
Daniel Kinzler
<daniel.kinzler@wikimedia.de>
Wed, 17 Oct 2012 18:02:58 +0000
(18:02 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Wed, 17 Oct 2012 18:02:58 +0000
(18:02 +0000)
includes/SqlDataUpdate.php
patch
|
blob
|
history
diff --git
a/includes/SqlDataUpdate.php
b/includes/SqlDataUpdate.php
index
13bb361
..
d0ead9a
100644
(file)
--- a/
includes/SqlDataUpdate.php
+++ b/
includes/SqlDataUpdate.php
@@
-109,7
+109,7
@@
abstract class SqlDataUpdate extends DataUpdate {
* @param $dbkeys Array
*/
protected function invalidatePages( $namespace, array $dbkeys ) {
- if (
!count( $dbkeys
) ) {
+ if (
$dbkeys === array(
) ) {
return;
}
@@
-127,10
+127,12
@@
abstract class SqlDataUpdate extends DataUpdate {
'page_touched < ' . $this->mDb->addQuotes( $now )
), __METHOD__
);
+
foreach ( $res as $row ) {
$ids[] = $row->page_id;
}
- if ( !count( $ids ) ) {
+
+ if ( $ids === array() ) {
return;
}