diff options
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/comanche.php b/include/comanche.php index eb0de96c7..f1dd0e521 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -1,7 +1,7 @@ <?php /** @file */ require_once('include/security.php'); - +require_once('include/menu.php'); // When editing a webpage - a dropdown is needed to select a page layout // On submit, the pdl_select value (which is the mid of an item with item_restrict = ITEM_PDL) is stored in // the webpage's resource_id, with resource_type 'pdl'. @@ -74,7 +74,7 @@ function comanche_parser(&$a,$s) { function comanche_menu($name) { $a = get_app(); $m = menu_fetch($name,$a->profile['profile_uid'],get_observer_hash()); - return render_menu($m); + return menu_render($m); } function comanche_replace_region($match) { @@ -85,9 +85,10 @@ function comanche_replace_region($match) { } function comanche_block($name) { + $o = ''; - $r = q("select * from item left 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", - intval($a->profile['profile_uid']), + $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", + intval(get_app()->profile['profile_uid']), dbesc($name) ); if($r) { |