From: Rod Roark Date: Wed, 10 Apr 2013 21:39:32 +0000 (-0700) Subject: Fixed bug with missing categories in the dropdown of preferred categories in the... X-Git-Tag: whats-been-changed~354 X-Git-Url: https://repo.or.cz/w/openemr.git/commitdiff_plain/af3d3042cb6ab64e1475cf38729510e741a1582c Fixed bug with missing categories in the dropdown of preferred categories in the event editor. --- 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 .= "