aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-13 19:58:24 -0700
committerredmatrix <git@macgirvin.com>2016-06-13 19:58:24 -0700
commit1e68d4fb75b9831ed763328b7982e44d1d4cdc5b (patch)
tree5379f5803f4aa3ec8b5bced6b3151cd08cf89d0f /include/text.php
parent6d4188f05e2a8e92508b1d38e4b7ef5156ba6c42 (diff)
downloadvolse-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.php5
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>';
}
}