aboutsummaryrefslogtreecommitdiffstats
path: root/mod/webpages.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-28 01:08:42 -0700
committerfriendica <info@friendica.com>2014-08-28 01:08:42 -0700
commited4896def1f90d903919311312fee974384540d7 (patch)
treeeecbd6f92877ee922005ab7b8f30a4f962ea630f /mod/webpages.php
parenta4f734e37c2092b91d3915b5f4bb90eba6a4b605 (diff)
downloadvolse-hubzilla-ed4896def1f90d903919311312fee974384540d7.tar.gz
volse-hubzilla-ed4896def1f90d903919311312fee974384540d7.tar.bz2
volse-hubzilla-ed4896def1f90d903919311312fee974384540d7.zip
make blocks, webpages, and layouts postable (pre-filled forms if supplied from elsewhere). The only serious issue is with ordering - you have to process and save a named layout before you can save a webpage that uses that layout name. Otherwise it will get unset during the save.
Diffstat (limited to 'mod/webpages.php')
-rw-r--r--mod/webpages.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/mod/webpages.php b/mod/webpages.php
index 431caa628..bfa2ebd7d 100644
--- a/mod/webpages.php
+++ b/mod/webpages.php
@@ -46,11 +46,11 @@ function webpages_content(&$a) {
// }
- $mimetype = get_config('system','page_mimetype');
+ $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_config('system','page_mimetype'));
if(! $mimetype)
$mimetype = 'choose';
- $layout = get_config('system','page_layout');
+ $layout = (($_REQUEST['layout']) ? $_REQUEST['layout'] : get_config('system','page_layout'));
if(! $layout)
$layout = 'choose';
@@ -91,6 +91,13 @@ function webpages_content(&$a) {
'layout' => $layout,
);
+ if($_REQUEST['title'])
+ $x['title'] = $_REQUEST['title'];
+ if($_REQUEST['body'])
+ $x['body'] = $_REQUEST['body'];
+ if($_REQUEST['pagetitle'])
+ $x['pagetitle'] = $_REQUEST['pagetitle'];
+
$o .= status_editor($a,$x);