From af3d3042cb6ab64e1475cf38729510e741a1582c Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Wed, 10 Apr 2013 14:39:32 -0700 Subject: [PATCH] Fixed bug with missing categories in the dropdown of preferred categories in the event editor. --- interface/main/calendar/add_edit_event.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/interface/main/calendar/add_edit_event.php b/interface/main/calendar/add_edit_event.php index b8e86f175..bbb5adaea 100644 --- a/interface/main/calendar/add_edit_event.php +++ b/interface/main/calendar/add_edit_event.php @@ -815,8 +815,9 @@ td { font-size:0.8em; } if($_GET['prov']==true){ $cattype=1; } - $cres = sqlStatement("SELECT pc_catid, pc_catname, pc_recurrtype, pc_duration, pc_end_all_day " . - "FROM openemr_postcalendar_categories WHERE pc_cattype=? ORDER BY pc_catname", array($cattype) ); + $cres = sqlStatement("SELECT pc_catid, pc_cattype, pc_catname, " . + "pc_recurrtype, pc_duration, pc_end_all_day " . + "FROM openemr_postcalendar_categories ORDER BY pc_catname"); $catoptions = ""; $prefcat_options = " \n"; $thisduration = 0; @@ -826,6 +827,18 @@ td { font-size:0.8em; } while ($crow = sqlFetchArray($cres)) { $duration = round($crow['pc_duration'] / 60); if ($crow['pc_end_all_day']) $duration = 1440; + + // This section is to build the list of preferred categories: + if ($duration) { + $prefcat_options .= "