From 1e68d4fb75b9831ed763328b7982e44d1d4cdc5b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 13 Jun 2016 19:58:24 -0700 Subject: 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. --- Zotlabs/Render/Comanche.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Render/Comanche.php') diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index 1017ec6aa..820897ee9 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -179,7 +179,8 @@ class Comanche { $channel_id = $this->get_channel_id(); if($channel_id) { - $r = q("select * from item inner join item_id on iid = item.id and item_id.uid = item.uid and item.uid = %d and service = 'BUILDBLOCK' and sid = '%s' limit 1", + $r = q("select * from item inner join iconfig on iconfig.iid = item.id and item.uid = %d + and iconfig.cat = 'system' and iconfig.k = 'BUILDBLOCK' and iconfig.v = '%s' limit 1", intval($channel_id), dbesc($name) ); @@ -282,12 +283,12 @@ class Comanche { /** - * Widgets will have to get any operational arguments from the session, the - * global app environment, or config storage until we implement argument passing + * Render a widget * * @param string $name * @param string $text */ + function widget($name, $text) { $vars = array(); $matches = array(); @@ -314,7 +315,7 @@ class Comanche { require_once(theme_include($theme_widget)); } - if (function_exists($func)) + if(function_exists($func)) return $func($vars); } -- cgit v1.2.3