From 24c1dc528dd981fc73baab8dc47840439e81f3b7 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 9 May 2016 11:56:42 +0200 Subject: make editwebpage use status_editor() and fix storing of layout on webpage creation --- Zotlabs/Module/Webpages.php | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'Zotlabs/Module/Webpages.php') diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php index 18dd57473..d8adb55b2 100644 --- a/Zotlabs/Module/Webpages.php +++ b/Zotlabs/Module/Webpages.php @@ -77,13 +77,7 @@ class Webpages extends \Zotlabs\Web\Controller { $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); - if(! $mimetype) { - $mimetype = 'choose'; - } - $layout = (($_REQUEST['layout']) ? $_REQUEST['layout'] : get_pconfig($owner,'system','page_layout')); - if(! $layout) - $layout = 'choose'; // Create a status editor (for now - we'll need a WYSIWYG eventually) to create pages // Nickname is set to the observers xchan, and profile_uid to the owner's. @@ -107,18 +101,21 @@ class Webpages extends \Zotlabs\Web\Controller { $o = profile_tabs($a, $is_owner, \App::$profile['channel_address']); $x = array( - 'webpage' => ITEM_TYPE_WEBPAGE, - 'is_owner' => true, - 'nickname' => \App::$profile['channel_address'], - 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), - 'bang' => '', - 'acl' => (($is_owner) ? populate_acl($channel_acl,false, \PermissionDescription::fromGlobalPermission('view_pages')) : ''), - 'showacl' => (($is_owner) ? true : false), - 'visitor' => true, + 'webpage' => ITEM_TYPE_WEBPAGE, + 'is_owner' => true, + 'nickname' => \App::$profile['channel_address'], + 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), + 'acl' => (($is_owner) ? populate_acl($channel_acl,false, \PermissionDescription::fromGlobalPermission('view_pages')) : ''), + 'showacl' => (($is_owner) ? true : false), + 'visitor' => true, + 'hide_location' => true, + 'hide_voting' => true, 'profile_uid' => intval($owner), - 'mimetype' => $mimetype, - 'layout' => $layout, - 'expanded' => true, + 'mimetype' => $mimetype, + 'mimeselect' => true, + 'layout' => $layout, + 'layoutselect' => true, + 'expanded' => true, 'novoting'=> true, 'bbco_autocomplete' => 'bbcode', 'bbcode' => true -- cgit v1.2.3