aboutsummaryrefslogtreecommitdiffstats
path: root/include/externals.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/externals.php')
-rw-r--r--include/externals.php25
1 files changed, 3 insertions, 22 deletions
diff --git a/include/externals.php b/include/externals.php
index b0f853dc6..18c034bb2 100644
--- a/include/externals.php
+++ b/include/externals.php
@@ -28,9 +28,10 @@ function externals_run($argv, $argc){
}
else {
$randfunc = db_getfunc('RAND');
- $r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d order by $randfunc limit 1",
+ $r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d order by $randfunc limit 1",
dbesc(z_root()),
- intval(DIRECTORY_MODE_STANDALONE)
+ intval(DIRECTORY_MODE_STANDALONE),
+ intval(SITE_TYPE_ZOT)
);
if($r)
$url = $r[0]['site_url'];
@@ -93,26 +94,6 @@ function externals_run($argv, $argc){
$results = process_delivery(array('hash' => 'undefined'), get_item_elements($message),
array(array('hash' => $sys['xchan_hash'])), false, true);
$total ++;
-// $z = q("select id from item where mid = '%s' and uid = %d limit 1",
-// dbesc($message['message_id']),
-// intval($sys['channel_id'])
-// );
-$z = null;
- if($z) {
- $flag_bits = ITEM_WALL|ITEM_ORIGIN|ITEM_UPLINK;
- // preserve the source
-
- $r = q("update item set source_xchan = owner_xchan where id = %d",
- intval($z[0]['id'])
- );
-
- $r = q("update item set item_flags = ( item_flags | %d ), owner_xchan = '%s'
- where id = %d",
- intval($flag_bits),
- dbesc($sys['xchan_hash']),
- intval($z[0]['id'])
- );
- }
}
logger('externals: import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG);
}