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.

This commit is contained in:
redmatrix
2016-06-13 19:58:24 -07:00
parent 6d4188f05e
commit 1e68d4fb75
24 changed files with 172 additions and 145 deletions

View File

@@ -85,11 +85,11 @@ class Editblock extends \Zotlabs\Web\Controller {
intval($owner)
);
if($itm) {
$item_id = q("select * from item_id where service = 'BUILDBLOCK' and iid = %d limit 1",
$item_id = q("select * from iconfig where cat = 'system' and k = 'BUILDBLOCK' and iid = %d limit 1",
intval($itm[0]['id'])
);
if($item_id)
$block_title = $item_id[0]['sid'];
$block_title = $item_id[0]['v'];
}
else {
notice( t('Item not found') . EOL);