Possible facilities bug

bradymiller wrote on Monday, July 20, 2009:

hey,

Noted this in the php log of the cvs demo. Sorry, don’t know what caused it, but i’m guessing related ot recent submission of mutli-facility stuff.

PHP Fatal error:  Call to undefined function getUserFacilities() in /var/www/html/openemr/interface/main/calendar/add_edit_event.php on line 1316, referer: http://opensourceemr.com:2089/openemr/interface/patient_file/summary/demographics.php?set_pid=1&is_new=1

-brady

whimmel wrote on Monday, July 20, 2009:

This function should appear in calendar.inc. It was part of my earlier patch.

Index: library/calendar.inc

RCS file: /cvsroot/openemr/openemr/library/calendar.inc,v
retrieving revision 1.3
diff -r1.3 calendar.inc
77a78,91
> //    returns an array of facility id and names
> function getUserFacilities($uID) {
>       $rez = sqlStatement("
>               select uf.facility_id as id, f.name
>                 from users_facility uf
>                 left join facility f on (uf.facility_id = f.id)
>                where uf.tablename=‘users’
>                  and uf.table_id = ‘$uID’
>       ");
>       $returnVal = array();
>       while ($row = sqlFetchArray($rez))
>               $returnVal[] = $row;
>       return $returnVal;
> }

sunsetsystems wrote on Monday, July 20, 2009:

The function is there.  Perhaps an include of calendar.inc is missing?

Rod
www.sunsetsystems.com

bradymiller wrote on Tuesday, July 28, 2009:

bug fixed.

refer to:
https://sourceforge.net/forum/forum.php?thread_id=3347250&forum_id=202506