aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Wiki.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-25 11:47:51 -0800
committerzotlabs <mike@macgirvin.com>2017-01-25 11:47:51 -0800
commit45a9eca792b349984ca11ab9a65e87e65625a718 (patch)
tree0de41dbc744cc79e4b61808b7d8cb1cedce59929 /Zotlabs/Module/Wiki.php
parent7804ae6a7889baab8af87d518fb5a61b30cb20ff (diff)
parentc916906716528648d8559608216ca353507c23df (diff)
downloadvolse-hubzilla-45a9eca792b349984ca11ab9a65e87e65625a718.tar.gz
volse-hubzilla-45a9eca792b349984ca11ab9a65e87e65625a718.tar.bz2
volse-hubzilla-45a9eca792b349984ca11ab9a65e87e65625a718.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Wiki.php')
-rw-r--r--Zotlabs/Module/Wiki.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 222c10155..d694a28ae 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -416,7 +416,7 @@ class Wiki extends \Zotlabs\Web\Controller {
}
$page = Zlib\NativeWikiPage::create_page($owner['channel_id'],$observer_hash, $name, $resource_id);
- if($page['success']) {
+ if($page['item_id']) {
$ob = \App::get_observer();
$commit = Zlib\NativeWikiPage::commit(array(
'commit_msg' => t('New page created'),
@@ -547,20 +547,8 @@ class Wiki extends \Zotlabs\Web\Controller {
$deleted = Zlib\NativeWikiPage::delete_page(array('channel_id' => $owner['channel_id'], 'observer_hash' => $observer_hash, 'resource_id' => $resource_id, 'pageUrlName' => $pageUrlName));
if($deleted['success']) {
- $ob = \App::get_observer();
- $commit = Zlib\NativeWikiPage::git_commit(array(
- 'commit_msg' => 'Deleted ' . $pageUrlName,
- 'resource_id' => $resource_id,
- 'observer' => $ob,
- 'files' => null
- ));
- if($commit['success']) {
- Zlib\NativeWiki::sync_a_wiki_item($owner['channel_id'],$commit['item_id'],$resource_id);
- json_return_and_die(array('message' => 'Wiki git repo commit made', 'success' => true));
- }
- else {
- json_return_and_die(array('message' => 'Error making git commit','success' => false));
- }
+ Zlib\NativeWiki::sync_a_wiki_item($owner['channel_id'],$commit['item_id'],$resource_id);
+ json_return_and_die(array('message' => 'Wiki git repo commit made', 'success' => true));
}
else {
json_return_and_die(array('message' => 'Error deleting page', 'success' => false));