aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue_fn.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-14 20:49:12 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-14 20:49:12 -0800
commit76816de3aae832d68be6d8f2b32ff7b910792002 (patch)
tree7c77e6958b1de08f1fe099233d7e3f7059a76210 /include/queue_fn.php
parent49108c230b4d3a4aac74f2139ccc23019be23e38 (diff)
downloadvolse-hubzilla-76816de3aae832d68be6d8f2b32ff7b910792002.tar.gz
volse-hubzilla-76816de3aae832d68be6d8f2b32ff7b910792002.tar.bz2
volse-hubzilla-76816de3aae832d68be6d8f2b32ff7b910792002.zip
simplify queue insertion for normal items
Diffstat (limited to 'include/queue_fn.php')
-rw-r--r--include/queue_fn.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 22580bc48..41001bb19 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -16,3 +16,22 @@ function remove_queue_item($id) {
}
+function queue_insert($arr) {
+
+ $x = q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_created,
+ outq_updated, outq_notify, outq_msg ) values ( '%s', %d, %d, '%s', '%s', %d, '%s', '%s', '%s', '%s' )",
+ dbesc($arr['hash']),
+ intval($arr['account_id']),
+ intval($arr['channel_id']),
+ dbesc(($arr['driver']) ? $arr['driver'] : 'zot'),
+ dbesc($arr['posturl']),
+ intval(1),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc($arr['notify']),
+ dbesc(($arr['msg']) ? $arr['msg'] : '')
+ );
+ return $x;
+
+}
+