diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-14 09:42:43 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-14 09:42:43 +0200 |
commit | 5c458e9111d8853891a0545d63fe7f55ee0f5a41 (patch) | |
tree | 01f80be918dd76a58cc1102166c53048631aed8a /include/text.php | |
parent | b6d425838f9025d8faf6dbfe90fce091d94b3cd7 (diff) | |
parent | 0ef2622621867fa197988974b47eff85f20a80e7 (diff) | |
download | volse-hubzilla-5c458e9111d8853891a0545d63fe7f55ee0f5a41.tar.gz volse-hubzilla-5c458e9111d8853891a0545d63fe7f55ee0f5a41.tar.bz2 volse-hubzilla-5c458e9111d8853891a0545d63fe7f55ee0f5a41.zip |
Merge branch 'dev' into sabre32
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php index 1bc19da34..bd59aa732 100644 --- a/include/text.php +++ b/include/text.php @@ -1743,7 +1743,8 @@ function unamp($s) { } function layout_select($channel_id, $current = '') { - $r = q("select mid,sid from item left join item_id on iid = item.id where service = 'PDL' and item.uid = item_id.uid and item_id.uid = %d and item_type = %d ", + $r = q("select mid, v from item left join iconfig on iconfig.iid = item.id + where iconfig.cat = 'system' and iconfig.k = 'PDL' and item.uid = %d and item_type = %d ", intval($channel_id), intval(ITEM_TYPE_PDL) ); @@ -1753,7 +1754,7 @@ function layout_select($channel_id, $current = '') { $options .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>'; foreach($r as $rr) { $selected = (($rr['mid'] == $current) ? ' selected="selected" ' : ''); - $options .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['sid'] . '</option>'; + $options .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['v'] . '</option>'; } } @@ -2821,13 +2822,16 @@ function expand_acl($s) { // If it has a pdl we'll load it as we know the mid and pass the body through comanche_parser() which will generate the // page layout from the given description +// @FIXME - there is apparently a very similar function called layout_select; this one should probably take precedence +// and the other should be checked for compatibility and removed function pdl_selector($uid, $current="") { $o = ''; $sql_extra = item_permissions_sql($uid); - $r = q("select item_id.*, mid from item_id left join item on iid = item.id where item_id.uid = %d and item_id.uid = item.uid and service = 'PDL' $sql_extra order by sid asc", + $r = q("select iconfig.*, mid from item_id left join item on iconfig.iid = item.id + where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'PDL' $sql_extra order by v asc", intval($uid) ); @@ -2841,7 +2845,7 @@ function pdl_selector($uid, $current="") { $entries[] = array('title' => t('Default'), 'mid' => ''); foreach($entries as $selection) { $selected = (($selection == $current) ? ' selected="selected" ' : ''); - $o .= "<option value=\"{$selection['mid']}\" $selected >{$selection['sid']}</option>"; + $o .= "<option value=\"{$selection['mid']}\" $selected >{$selection['v']}</option>"; } $o .= '</select>'; |