From 985ba79b4ab5e65415fd74f2cf5567154d8b511d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 4 Jul 2008 01:22:40 -0400 Subject: [PATCH] a couple of things to make queue items work darcs-hash:20080704052240-34904-c6458bbd6842cd8a86929bba60fb0d4408b56345.gz --- lib/common.php | 1 + lib/util.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/common.php b/lib/common.php index 0b5b4ab5cc..d3d9fc87f1 100644 --- a/lib/common.php +++ b/lib/common.php @@ -97,5 +97,6 @@ require_once(INSTALLDIR.'/classes/Subscription.php'); require_once(INSTALLDIR.'/classes/User.php'); require_once(INSTALLDIR.'/classes/Confirm_address.php'); require_once(INSTALLDIR.'/classes/Remember_me.php'); +require_once(INSTALLDIR.'/classes/Queue_item.php'); require_once('markdown.php'); diff --git a/lib/util.php b/lib/util.php index 03d549334a..8e8860b417 100644 --- a/lib/util.php +++ b/lib/util.php @@ -820,9 +820,11 @@ function common_broadcast_notice($notice, $remote=false) { function common_enqueue_notice($notice) { $qi = new Queue_item(); + $qi->query('BEGIN'); $qi->notice_id = $notice->id; $qi->created = DB_DataObject_Cast::dateTime(); $result = $qi->insert(); + $qi->query('COMMIT'); return $result; }