aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Wiki.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-10-20 21:35:42 +0200
committerMario Vavti <mario@mariovavti.com>2021-10-20 21:35:42 +0200
commit2c741bd24d0473012785e05d1eea59f9048c2b9b (patch)
tree60da18ce1ac3e30b020144762c4513a44c4432ea /Zotlabs/Module/Wiki.php
parent3f72a3beb6bd2d011fd210e24613cc7f2af04181 (diff)
downloadvolse-hubzilla-2c741bd24d0473012785e05d1eea59f9048c2b9b.tar.gz
volse-hubzilla-2c741bd24d0473012785e05d1eea59f9048c2b9b.tar.bz2
volse-hubzilla-2c741bd24d0473012785e05d1eea59f9048c2b9b.zip
fix for issue #1640 - use item_store() instead of post_activity_item() which is checking for post_comment permission which we might not have in this case. item_store() requires slightly more data but basically does the same. Also some minor improvements and whitespace changes.
Diffstat (limited to 'Zotlabs/Module/Wiki.php')
-rw-r--r--Zotlabs/Module/Wiki.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index a06119506..3d0c07492 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -500,7 +500,7 @@ class Wiki extends Controller {
$r = NativeWiki::create_wiki($owner, $observer_hash, $wiki, $acl);
if($r['success']) {
NativeWiki::sync_a_wiki_item($owner['channel_id'],$r['item_id'],$r['item']['resource_id']);
- $homePage = NativeWikiPage::create_page($owner['channel_id'],$observer_hash,'Home', $r['item']['resource_id'], $wiki['mimeType']);
+ $homePage = NativeWikiPage::create_page($owner, $observer_hash, 'Home', $r['item']['resource_id'], $wiki['mimeType']);
if(! $homePage['success']) {
notice( t('Wiki created, but error creating Home page.'));
goaway(z_root() . '/wiki/' . $nick . '/' . NativeWiki::name_encode($wiki['urlName']));
@@ -606,7 +606,7 @@ class Wiki extends Controller {
json_return_and_die(array('message' => 'Error creating page. Invalid name (' . print_r($_POST,true) . ').', 'success' => false));
}
- $page = NativeWikiPage::create_page($owner['channel_id'],$observer_hash, $name, $resource_id, $mimetype);
+ $page = NativeWikiPage::create_page($owner, $observer_hash, $name, $resource_id, $mimetype);
if($page['item_id']) {
$commit = NativeWikiPage::commit([