aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/Directory.php')
-rw-r--r--Zotlabs/Daemon/Directory.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/Zotlabs/Daemon/Directory.php b/Zotlabs/Daemon/Directory.php
index c8cdafdf5..c698995c2 100644
--- a/Zotlabs/Daemon/Directory.php
+++ b/Zotlabs/Daemon/Directory.php
@@ -2,10 +2,9 @@
namespace Zotlabs\Daemon;
-require_once('include/zot.php');
-require_once('include/dir_fns.php');
-require_once('include/queue_fn.php');
-
+use Zotlabs\Lib\Libzot;
+use Zotlabs\Lib\Libzotdir;
+use Zotlabs\Lib\Queue;
class Directory {
@@ -42,7 +41,7 @@ class Directory {
// this is an in-memory update and we don't need to send a network packet.
- local_dir_update($argv[1],$force);
+ Libzotdir::local_dir_update($argv[1],$force);
q("update channel set channel_dirdate = '%s' where channel_id = %d",
dbesc(datetime_convert()),
@@ -58,13 +57,15 @@ class Directory {
// otherwise send the changes upstream
- $directory = find_upstream_directory($dirmode);
+ $directory = Libzotdir::find_upstream_directory($dirmode);
$url = $directory['url'] . '/post';
// ensure the upstream directory is updated
- $packet = zot_build_packet($channel,(($force) ? 'force_refresh' : 'refresh'));
- $z = zot_zot($url,$packet);
+
+ $packet = Libzot::build_packet($channel,(($force) ? 'force_refresh' : 'refresh'));
+ $z = Libzot::zot($url,$packet,$channel);
+
// re-queue if unsuccessful
@@ -76,7 +77,7 @@ class Directory {
$hash = random_string();
- queue_insert(array(
+ Queue::insert(array(
'hash' => $hash,
'account_id' => $channel['channel_account_id'],
'channel_id' => $channel['channel_id'],