aboutsummaryrefslogtreecommitdiffstats
path: root/mod/layouts.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /mod/layouts.php
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'mod/layouts.php')
-rw-r--r--mod/layouts.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/mod/layouts.php b/mod/layouts.php
index 3ce891d85..b2be39802 100644
--- a/mod/layouts.php
+++ b/mod/layouts.php
@@ -33,6 +33,8 @@ function layouts_content(&$a) {
$which = argv(1);
+ $_SESSION['return_url'] = $a->query_string;
+
$uid = local_channel();
$owner = 0;
$channel = null;
@@ -98,7 +100,6 @@ function layouts_content(&$a) {
header('Content-disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
echo json_encode($r);
killme();
-
}
}
@@ -111,7 +112,7 @@ function layouts_content(&$a) {
'id' => 'layout-help-tab',
));
- $o .= replace_macros(get_markup_template('common_tabs.tpl'),array('$tabs' => $tabs));
+ //$o .= replace_macros(get_markup_template('common_tabs.tpl'),array('$tabs' => $tabs));
// Create a status editor (for now - we'll need a WYSIWYG eventually) to create pages
@@ -122,13 +123,15 @@ function layouts_content(&$a) {
'webpage' => ITEM_TYPE_PDL,
'is_owner' => true,
'nickname' => $a->profile['channel_address'],
- 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
+ //do we need that at this place?
+ //'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'bang' => '',
'showacl' => false,
'visitor' => false,
'nopreview' => 1,
'ptlabel' => t('Layout Name'),
'profile_uid' => intval($owner),
+ 'expanded' => true
);
if($_REQUEST['title'])
@@ -139,7 +142,7 @@ function layouts_content(&$a) {
$x['pagetitle'] = $_REQUEST['pagetitle'];
- $o .= status_editor($a,$x);
+ $editor = status_editor($a,$x);
$r = q("select iid, sid, mid from item_id left join item on item.id = item_id.iid
where item_id.uid = %d and service = 'PDL' order by sid asc",
@@ -156,23 +159,24 @@ function layouts_content(&$a) {
'title' => $rr['sid'],
'mid' => $rr['mid']
);
- }
+ }
}
//Build the base URL for edit links
$url = z_root() . '/editlayout/' . $which;
$o .= replace_macros(get_markup_template('layoutlist.tpl'), array(
+ '$title' => t('Layouts'),
+ '$create' => t('Create'),
+ '$help' => array('text' => t('Help'), 'url' => 'help/Comanche', 'title' => t('Comanche page description language help')),
+ '$editor' => $editor,
'$baseurl' => $url,
'$edit' => t('Edit'),
'$share' => t('Share'),
'$pages' => $pages,
'$channel' => $which,
'$view' => t('View'),
- '$preview' => '1',
-
));
-
- return $o;
+ return $o;
}