move iconfig functions to include/config.php with all the rest of the configs, fix an issue with singleton discovery and start work on singleton delivery

This commit is contained in:
redmatrix
2016-04-26 16:12:31 -07:00
parent e508ad37c1
commit f99daf8ff9
5 changed files with 179 additions and 160 deletions

View File

@@ -482,7 +482,7 @@ function sync_chatrooms($channel,$chatrooms) {
function import_items($channel,$items) {
function import_items($channel,$items,$sync = false) {
if($channel && $items) {
$allow_code = false;
@@ -520,13 +520,16 @@ function import_items($channel,$items) {
$item['uid'] = $channel['channel_id'];
$item_result = item_store($item,$allow_code,$deliver);
}
if($sync) {
// deliver singletons if we have any
}
}
}
}
function sync_items($channel,$items) {
import_items($channel,$items);
import_items($channel,$items,true);
}