summaryrefslogtreecommitdiff
path: root/maintenance/sql.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
committerPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
commitb9b85843572bf283f48285001e276ba7e61b63f6 (patch)
tree4c6f4571552ada9ccfb4030481dcf77308f8b254 /maintenance/sql.php
parentd9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff)
updated to MediaWiki 1.14.0
Diffstat (limited to 'maintenance/sql.php')
-rw-r--r--maintenance/sql.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/maintenance/sql.php b/maintenance/sql.php
index 38c995ac..ab6546b9 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -53,15 +53,15 @@ class SqlPromptPrinter {
}
}
-function sqlPrintResult( $res ) {
+function sqlPrintResult( $res, $db ) {
if ( !$res ) {
// Do nothing
- } elseif ( $res->numRows() ) {
+ } elseif ( is_object( $res ) && $res->numRows() ) {
while ( $row = $res->fetchObject() ) {
print_r( $row );
}
} else {
- $affected = $res->db->affectedRows();
+ $affected = $db->affectedRows();
echo "Query OK, $affected row(s) affected\n";
}
}