aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-11-16 10:11:46 +0100
committerMario Vavti <mario@mariovavti.com>2018-11-16 10:11:46 +0100
commitc69556f2ff9845b9ac1bce89be2431a7ac6d3fd7 (patch)
treefe411c26c6a7fea7b6d2b54449ec84d0dbe51033 /Zotlabs/Lib
parentca4e7f9b4fab7035e511582a0755d58e9e4fa2f0 (diff)
parentb0689614bff4272f90b0c3f064ca91b16cb392e0 (diff)
downloadvolse-hubzilla-c69556f2ff9845b9ac1bce89be2431a7ac6d3fd7.tar.gz
volse-hubzilla-c69556f2ff9845b9ac1bce89be2431a7ac6d3fd7.tar.bz2
volse-hubzilla-c69556f2ff9845b9ac1bce89be2431a7ac6d3fd7.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Libzot.php2
-rw-r--r--Zotlabs/Lib/NativeWiki.php17
2 files changed, 5 insertions, 14 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 010735487..70f013eb7 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1006,7 +1006,7 @@ logger('4');
dbesc($xx['recipient']),
dbesc($xx['name']),
dbesc($xx['status']),
- dbesc(datetime_convert($xx['date'])),
+ dbesc(datetime_convert('UTC','UTC',$xx['date'])),
dbesc($xx['sender'])
);
}
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index cdabbc3e9..e2bd07c0d 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -40,26 +40,17 @@ class NativeWiki {
function create_wiki($channel, $observer_hash, $wiki, $acl) {
- // Generate unique resource_id using the same method as item_message_id()
- do {
- $dups = false;
- $resource_id = random_string();
- $r = q("SELECT mid FROM item WHERE resource_id = '%s' AND resource_type = '%s' AND uid = %d LIMIT 1",
- dbesc($resource_id),
- dbesc(NWIKI_ITEM_RESOURCE_TYPE),
- intval($channel['channel_id'])
- );
- if($r)
- $dups = true;
- } while($dups == true);
+ $resource_id = new_uuid();
+ $uuid = new_uuid();
$ac = $acl->get();
- $mid = item_message_id();
+ $mid = z_root() . '/item/' . $uuid;
$arr = array(); // Initialize the array of parameters for the post
$item_hidden = ((intval($wiki['postVisible']) === 0) ? 1 : 0);
$wiki_url = z_root() . '/wiki/' . $channel['channel_address'] . '/' . $wiki['urlName'];
$arr['aid'] = $channel['channel_account_id'];
+ $arr['uuid'] = $uuid;
$arr['uid'] = $channel['channel_id'];
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;