aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-09 14:17:14 -0800
committerzotlabs <mike@macgirvin.com>2017-03-09 14:17:14 -0800
commit15d422db80234d220f0ead0b5554f82f50e571e7 (patch)
treefff7e2fb2d4a4bd05f9e91e7a7328b71e6d3e755 /Zotlabs/Lib
parentb6477cd38b532ebe69a480460e7b883964ec6627 (diff)
parent15ab331b6b5793d04979e204af92084e8d5bb03c (diff)
downloadvolse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.tar.gz
volse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.tar.bz2
volse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.zip
Merge branch 'dspr' into red
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/NativeWiki.php2
-rw-r--r--Zotlabs/Lib/NativeWikiPage.php4
2 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php
index 519102d24..7786ec25a 100644
--- a/Zotlabs/Lib/NativeWiki.php
+++ b/Zotlabs/Lib/NativeWiki.php
@@ -75,6 +75,8 @@ class NativeWiki {
$arr['obj_type'] = ACTIVITY_OBJ_WIKI;
$arr['body'] = '[table][tr][td][h1]New Wiki[/h1][/td][/tr][tr][td][zrl=' . $wiki_url . ']' . $wiki['htmlName'] . '[/zrl][/td][/tr][/table]';
+ $arr['public_policy'] = map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'view_wiki'),true);
+
// Save the wiki name information using iconfig. This is shareable.
if(! set_iconfig($arr, 'wiki', 'rawName', $wiki['rawName'], true)) {
return array('item' => null, 'success' => false);
diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php
index 25e454cb7..941ade90c 100644
--- a/Zotlabs/Lib/NativeWikiPage.php
+++ b/Zotlabs/Lib/NativeWikiPage.php
@@ -64,6 +64,8 @@ class NativeWikiPage {
$arr['deny_cid'] = $w['wiki']['deny_cid'];
$arr['deny_gid'] = $w['wiki']['deny_gid'];
+ $arr['public_policy'] = map_scope(\Zotlabs\Access\PermissionLimits::Get($channel_id,'view_wiki'),true);
+
// We may wish to change this some day.
$arr['item_unpublished'] = 1;
@@ -233,6 +235,7 @@ class NativeWikiPage {
}
$sql_extra = item_permissions_sql($channel_id,$observer_hash);
+
if($revision == (-1))
$sql_extra .= " order by revision desc ";
elseif($revision)
@@ -285,6 +288,7 @@ class NativeWikiPage {
}
$sql_extra = item_permissions_sql($channel_id,$observer_hash);
+
$sql_extra .= " order by revision desc ";
$r = null;