aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-01-12 00:49:23 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-01-12 00:49:23 +0100
commit5fd3ca36f8e7b34845e96c779279d64e98be84ed (patch)
tree9e98b8875f19c8e5a4bf18d2c07233caa97574dd
parent0ce3e7235af16f13ab3101a09ae39006aa64cb7e (diff)
downloadvolse-hubzilla-5fd3ca36f8e7b34845e96c779279d64e98be84ed.tar.gz
volse-hubzilla-5fd3ca36f8e7b34845e96c779279d64e98be84ed.tar.bz2
volse-hubzilla-5fd3ca36f8e7b34845e96c779279d64e98be84ed.zip
Fix page layout selector
-rwxr-xr-xinclude/text.php3
-rw-r--r--mod/editwebpage.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index f5c440e4a..587514fb5 100755
--- a/include/text.php
+++ b/include/text.php
@@ -1422,7 +1422,10 @@ function layout_select($channel_id, $current = '') {
$o .= '<select name="layout_mid" id="select-layout_mid" >';
$empty_selected = (($current === '') ? ' selected="selected" ' : '');
$o .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>';
+ logger('current'.$current);
foreach($r as $rr) {
+ logger('current'.$current);
+ logger('mid'.$rr['mid']);
$selected = (($rr['mid'] == $current) ? ' selected="selected" ' : '');
$o .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['sid'] . '</option>';
}
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index e1de09e37..f11210eea 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -99,8 +99,8 @@ function editwebpage_content(&$a) {
if($layout)
$layoutselect = '<input type="hidden" name="layout_mid" value="' . $layout . '" />';
else
- $layoutselect = layout_select($itm[0]['uid']);
-
+ $layoutselect = layout_select($itm[0]['uid'],$itm[0]['layout_mid']);
+
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
'$title' => t('Edit Webpage')