From 0f571fe7a217851335586fc7a8ca2cdb7fa58fb5 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 Jul 2016 12:01:07 -0600 Subject: [PATCH] Fix resource categories to work when first added from search results --- resources/inc/class.resources_bo.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index 08b47bd725..1b3d3e0af2 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -550,15 +550,19 @@ class resources_bo // Edit dialog sends exec as an option, don't add categories if(count($resources) && !$options['exec']) { + $_resources = array_map( + function($id) { return 'r'.$id;}, + array_keys($resources) + ); $list['cat-'.$cat_id] = array( 'label' => $cat, - 'resources' => $resources, + 'resources' => $_resources, ); } else if ($resources && $options['exec']) { array_map( - function($id,$name) use (&$list) { $list[''+$id] = $name;}, + function($id,$name) use (&$list) { $list[''.$id] = $name;}, array_keys($resources), $resources ); }