aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2016-01-03 09:52:37 +0100
committermrjive <mrjive@mrjive.it>2016-01-03 09:52:37 +0100
commit07f5bdde60f55e3b217aee9e33c3175e90a5f0f1 (patch)
tree2b5988c7661c9a5a67f5da8797ca57381e2aad7a /include/directory.php
parent051346325609f5f2e78ef0deaf182c65d7823bbc (diff)
parent5b0a17359d6b5b3e27219c9e56117f1017996175 (diff)
downloadvolse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.tar.gz
volse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.tar.bz2
volse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.zip
Merge pull request #10 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/directory.php')
-rw-r--r--include/directory.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/include/directory.php b/include/directory.php
index 9ab1d805b..8792a15e1 100644
--- a/include/directory.php
+++ b/include/directory.php
@@ -8,6 +8,7 @@ require_once('boot.php');
require_once('include/zot.php');
require_once('include/cli_startup.php');
require_once('include/dir_fns.php');
+require_once('include/queue_fn.php');
/**
* @brief
@@ -83,20 +84,17 @@ function directory_run($argv, $argc){
*/
$hash = random_string();
- 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($hash),
- intval($channel['channel_account_id']),
- intval($channel['channel_id']),
- dbesc('zot'),
- dbesc($url),
- intval(1),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($packet),
- dbesc('')
- );
- } else {
+
+ queue_insert(array(
+ 'hash' => $hash,
+ 'account_id' => $channel['channel_account_id'],
+ 'channel_id' => $channel['channel_id'],
+ 'posturl' => $url,
+ 'notify' => $packet,
+ ));
+
+ }
+ else {
q("update channel set channel_dirdate = '%s' where channel_id = %d",
dbesc(datetime_convert()),
intval($channel['channel_id'])