diff options
Diffstat (limited to 'Zotlabs/Module/Wiki.php')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index bef831de8..1c3add38f 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -145,7 +145,7 @@ class Wiki extends \Zotlabs\Web\Controller { '$cancel' => t('Cancel') ) ); - + $o .= replace_macros(get_markup_template('wiki.tpl'),array( '$wikiheaderName' => $wikiheaderName, '$wikiheaderPage' => $wikiheaderPage, @@ -170,7 +170,17 @@ class Wiki extends \Zotlabs\Web\Controller { '$pageHistory' => $pageHistory['history'], '$wikiModal' => $wikiModal, '$wikiModalID' => $wikiModalID, - '$commit' => 'HEAD' + '$commit' => 'HEAD', + '$embedPhotos' => t('Embed image from photo albums'), + '$embedPhotosModalTitle' => t('Embed an image from your albums'), + '$embedPhotosModalCancel' => t('Cancel'), + '$embedPhotosModalOK' => t('OK'), + '$modalchooseimages' => t('Choose images to embed'), + '$modalchoosealbum' => t('Choose an album'), + '$modaldiffalbum' => t('Choose a different album...'), + '$modalerrorlist' => t('Error getting album list'), + '$modalerrorlink' => t('Error getting photo link'), + '$modalerroralbum' => t('Error getting album'), )); head_add_js('library/ace/ace.js'); // Ace Code Editor return $o; @@ -202,6 +212,7 @@ class Wiki extends \Zotlabs\Web\Controller { } $wiki = array(); // Generate new wiki info from input name + $wiki['postVisible'] = ((intval($_POST['postVisible']) === 0) ? 0 : 1); $wiki['rawName'] = $_POST['wikiName']; $wiki['htmlName'] = escape_tags($_POST['wikiName']); $wiki['urlName'] = urlencode($_POST['wikiName']); @@ -235,20 +246,7 @@ class Wiki extends \Zotlabs\Web\Controller { if (local_channel() !== intval($channel['channel_id'])) { logger('Wiki delete permission denied.' . EOL); json_return_and_die(array('message' => 'Wiki delete permission denied.', 'success' => false)); - } else { - /* - $channel = get_channel_by_nick($nick); - $observer_hash = get_observer_hash(); - // Figure out who the page owner is. - $perms = get_all_perms(intval($channel['channel_id']), $observer_hash); - // TODO: Create a new permission setting for wiki analogous to webpages. Until - // then, use webpage permissions - if (!$perms['write_pages']) { - logger('Wiki delete permission denied.' . EOL); - json_return_and_die(array('success' => false)); - } - */ - } + } $resource_id = $_POST['resource_id']; $deleted = wiki_delete_wiki($resource_id); if ($deleted['success']) { @@ -482,7 +480,6 @@ class Wiki extends \Zotlabs\Web\Controller { } } $renamed = wiki_rename_page(array('resource_id' => $resource_id, 'pageUrlName' => $pageUrlName, 'pageNewName' => $pageNewName)); - logger('$renamed: ' . json_encode($renamed)); if($renamed['success']) { $ob = \App::get_observer(); $commit = wiki_git_commit(array( |