dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1572841
)
Replaced some !count() with explicit and more efficient check
author
jeroendedauw
<jeroendedauw@gmail.com>
Fri, 5 Oct 2012 14:14:18 +0000
(16:14 +0200)
committer
jeroendedauw
<jeroendedauw@gmail.com>
Sun, 7 Oct 2012 21:56:38 +0000
(23:56 +0200)
Change-Id: I004dbeb6fd00147979ca048d2b3f9f8adc04988a
includes/SqlDataUpdate.php
patch
|
blob
|
history
diff --git
a/includes/SqlDataUpdate.php
b/includes/SqlDataUpdate.php
index
256e8f7
..
660421e
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;
}