Commit 22b398be764a73813f083ef4f95b9d7ce78947f1

Authored by Neil Blakey-Milner
1 parent ff04a852

Make PEAR DB decide whether the backend wants TRUE or 1 for boolean fields.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3303 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/subscriptions/SubscriptionManager.inc
@@ -186,7 +186,7 @@ class SubscriptionManager { @@ -186,7 +186,7 @@ class SubscriptionManager {
186 $sql = $default->db; 186 $sql = $default->db;
187 if ($sql->query(array("SELECT id FROM " . Subscription::getTableName($iSubscriptionType) . " " ./*ok*/ 187 if ($sql->query(array("SELECT id FROM " . Subscription::getTableName($iSubscriptionType) . " " ./*ok*/
188 "WHERE user_id = ? " . 188 "WHERE user_id = ? " .
189 - "AND is_alerted = 1", $iUserID))) { 189 + "AND is_alerted = ?", array($iUserID, true)))) {
190 $aSubscriptions = array(); 190 $aSubscriptions = array();
191 while ($sql->next_record()) { 191 while ($sql->next_record()) {
192 $aSubscriptions[] = & Subscription::get($sql->f("id"), $iSubscriptionType); 192 $aSubscriptions[] = & Subscription::get($sql->f("id"), $iSubscriptionType);
presentation/lookAndFeel/knowledgeTree/dashboardUI.inc
@@ -226,7 +226,7 @@ function renderDashboardNews() { @@ -226,7 +226,7 @@ function renderDashboardNews() {
226 global $default; 226 global $default;
227 227
228 // retrieve all news items 228 // retrieve all news items
229 - $aDashboardNews = DashboardNews::getList("active=1 ORDER BY rank");/*ok*/ 229 + $aDashboardNews = DashboardNews::getList(array("active=? ORDER BY rank", array(true)));/*ok*/
230 230
231 $sToRender = ""; 231 $sToRender = "";
232 232