diff options
author | redmatrix <git@macgirvin.com> | 2016-06-13 19:58:24 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-13 19:58:24 -0700 |
commit | 1e68d4fb75b9831ed763328b7982e44d1d4cdc5b (patch) | |
tree | 5379f5803f4aa3ec8b5bced6b3151cd08cf89d0f /include/text.php | |
parent | 6d4188f05e2a8e92508b1d38e4b7ef5156ba6c42 (diff) | |
download | volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.gz volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.tar.bz2 volse-hubzilla-1e68d4fb75b9831ed763328b7982e44d1d4cdc5b.zip |
deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication.
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 1bc19da34..aca980203 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_id.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>'; } } |