aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-24 20:14:58 -0800
committerzotlabs <mike@macgirvin.com>2017-01-24 20:14:58 -0800
commit9e70d54300e93353cfa3660a0a562a7a4dc66b8e (patch)
treeb9d213e776046e7d07a01e9c4da8f65c873ae1ca /Zotlabs/Lib
parent33aa373b3f864867e36f78095c3a4fdc89c26ad5 (diff)
downloadvolse-hubzilla-9e70d54300e93353cfa3660a0a562a7a4dc66b8e.tar.gz
volse-hubzilla-9e70d54300e93353cfa3660a0a562a7a4dc66b8e.tar.bz2
volse-hubzilla-9e70d54300e93353cfa3660a0a562a7a4dc66b8e.zip
always sync parent wiki when syncing pages, just in case the original wiki creation wasn't synced.
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/NativeWiki.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index f4089d8a2..3dc914772 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -100,10 +100,14 @@ class NativeWiki {
}
}
- static public function sync_a_wiki_item($uid,$id) {
- $r = q("select * from item where id = %d and uid = %d",
+ static public function sync_a_wiki_item($uid,$id,$resource_id) {
+
+
+ $r = q("SELECT * from item WHERE uid = %d AND ( id = %d OR ( resource_type = '%s and resource_id = %d )) ",
+ intval($uid),
intval($id),
- intval($uid)
+ dbesc(NWIKI_ITEM_RESOURCE_TYPE)
+ intval($resource_id)
);
if($r) {
xchan_query($r);