From 22b398be764a73813f083ef4f95b9d7ce78947f1 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Wed, 25 May 2005 20:57:04 +0000 Subject: [PATCH] Make PEAR DB decide whether the backend wants TRUE or 1 for boolean fields. --- lib/subscriptions/SubscriptionManager.inc | 2 +- presentation/lookAndFeel/knowledgeTree/dashboardUI.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/subscriptions/SubscriptionManager.inc b/lib/subscriptions/SubscriptionManager.inc index 9b8f09b..073a67d 100644 --- a/lib/subscriptions/SubscriptionManager.inc +++ b/lib/subscriptions/SubscriptionManager.inc @@ -186,7 +186,7 @@ class SubscriptionManager { $sql = $default->db; if ($sql->query(array("SELECT id FROM " . Subscription::getTableName($iSubscriptionType) . " " ./*ok*/ "WHERE user_id = ? " . - "AND is_alerted = 1", $iUserID))) { + "AND is_alerted = ?", array($iUserID, true)))) { $aSubscriptions = array(); while ($sql->next_record()) { $aSubscriptions[] = & Subscription::get($sql->f("id"), $iSubscriptionType); diff --git a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc index 4649409..5e55635 100644 --- a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc @@ -226,7 +226,7 @@ function renderDashboardNews() { global $default; // retrieve all news items - $aDashboardNews = DashboardNews::getList("active=1 ORDER BY rank");/*ok*/ + $aDashboardNews = DashboardNews::getList(array("active=? ORDER BY rank", array(true)));/*ok*/ $sToRender = ""; -- libgit2 0.21.4