aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue_fn.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-15 17:42:49 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-15 17:42:49 -0800
commit20dcf37976ee269adcb2c004c5f612d8509b7f11 (patch)
treee7beba9e4639e5815d43820bec2549eb48951145 /include/queue_fn.php
parent38d513181d4d28fa2c525fac9ac53ba23649b17e (diff)
downloadvolse-hubzilla-20dcf37976ee269adcb2c004c5f612d8509b7f11.tar.gz
volse-hubzilla-20dcf37976ee269adcb2c004c5f612d8509b7f11.tar.bz2
volse-hubzilla-20dcf37976ee269adcb2c004c5f612d8509b7f11.zip
issue #221
Diffstat (limited to 'include/queue_fn.php')
-rw-r--r--include/queue_fn.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 5c6570f66..8449c1d72 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -1,6 +1,6 @@
<?php /** @file */
-function update_queue_time($id, $add_priority = 0) {
+function update_queue_item($id, $add_priority = 0) {
logger('queue: requeue item ' . $id,LOGGER_DEBUG);
q("UPDATE outq SET outq_updated = '%s', outq_priority = outq_priority + %d WHERE outq_hash = '%s'",
dbesc(datetime_convert()),
@@ -18,6 +18,17 @@ function remove_queue_item($id,$channel_id = 0) {
);
}
+
+function remove_queue_by_posturl($posturl) {
+ logger('queue: remove queue posturl ' . $posturl,LOGGER_DEBUG);
+
+ q("DELETE FROM outq WHERE outq_posturl = '%s' ",
+ dbesc($posturl)
+ );
+}
+
+
+
function queue_set_delivered($id,$channel = 0) {
logger('queue: set delivered ' . $id,LOGGER_DEBUG);
$sql_extra = (($channel_id) ? " and outq_channel = " . intval($channel_id) . " " : '');
@@ -29,16 +40,19 @@ function queue_set_delivered($id,$channel = 0) {
}
+
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' )",
+ $x = q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_priority,
+ outq_created, outq_updated, outq_notify, outq_msg )
+ values ( '%s', %d, %d, '%s', '%s', %d, %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),
+ intval(($arr['priority']) ? $arr['priority'] : 0),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($arr['notify']),