From 77578fd93220d0e0e40d427fc526867b807a69dc Mon Sep 17 00:00:00 2001
From: Marco Scalone <marco.scalone@imm.gub.uy>
Date: Mon, 5 Nov 2012 11:32:12 -0200
Subject: [PATCH] Issue #1832250 by mscalone: Fixed bug rowcount on
 postgresql.

---
 htmlpurifier.install |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/htmlpurifier.install b/htmlpurifier.install
index 936574a..c13d824 100644
--- a/htmlpurifier.install
+++ b/htmlpurifier.install
@@ -275,7 +275,8 @@ function htmlpurifier_update_7000() {
     // Drop d6 migration table if it is empty
     $query = db_select($d6_table)
       ->fields($d6_table, array('fid'));
-    if (mysql_num_rows($query) == 0) {
+    $count = $query->countQuery()->execute()->fetchField();
+    if ($count == 0) {    
       db_drop_table($d6_table);
     }
   }
-- 
1.7.9.5

