<? - to <?php

anooshh wrote on Tuesday, April 21, 2009:

I was running openEMR (experimenting) I found a number of places were <?php missing, (<? instead of <?php). This caused server errors. The platform was RHEL5.2 (Centos) php 5.2.9, apache 2.2.11. I am not sure if I have caught all of them but here is a list:

diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/patient_file/summary/demographics.php ./interface/patient_file/summary/demographics.php
41c41
<  var mypcc = ‘<? echo $GLOBALS[‘phone_country_code’] ?>’;

>  var mypcc = ‘<?php echo $GLOBALS[‘phone_country_code’] ?>’;
diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/patient_file/summary/demographics_save_dutch.php ./interface/patient_file/summary/demographics_save_dutch.php
1c1
< <?

> <?php
diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/patient_file/summary/patient_picture.php ./interface/patient_file/summary/patient_picture.php
1c1
< <?

> <?php

diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/reports/index.php ./interface/reports/index.php
1c1
< <?

> <?php
diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/usergroup/admin_frameset.php ./interface/usergroup/admin_frameset.php
14c14
< <? if (acl_check(‘admin’, ‘users’)) { ?>

> <?php if (acl_check(‘admin’, ‘users’)) { ?>
16c16
< <? } else if (acl_check(‘admin’, ‘forms’)) { ?>

> <?php } else if (acl_check(‘admin’, ‘forms’)) { ?>
18c18
< <? } else if (acl_check(‘admin’, ‘practice’)) { ?>

> <?php } else if (acl_check(‘admin’, ‘practice’)) { ?>
20c20
< <? } else if (acl_check(‘admin’, ‘calendar’)) { ?>

> <?php } else if (acl_check(‘admin’, ‘calendar’)) { ?>
22c22
< <? } else if (acl_check(‘admin’, ‘database’)) { ?>

> <?php } else if (acl_check(‘admin’, ‘database’)) { ?>
24c24
< <? } else { ?>

> <?php } else { ?>
26c26
< <? } ?>

> <?php } ?>

diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/library/calendar.inc ./library/calendar.inc
1c1
< <?

> <?php
diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/library/classes/Controller.class.php ./library/classes/Controller.class.php
90c90
<                if ( ($GLOBALS[‘dutchpc’]) && ($c_name == “Prescription”) ) $c_name .= ‘dutch’;

>                if ( (LANGUAGE == ‘5’) && ($c_name == “Prescription”) ) $c_name .= ‘dutch’;
diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/library/classes/NumberToText.class.php ./library/classes/NumberToText.class.php
1c1
< <?

> <?php
226c226
< ?>
\ No newline at end of file

> ?>

diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/library/pid.inc ./library/pid.inc
1c1
< <?

> <?php

bradymiller wrote on Friday, April 24, 2009:

hey,

Thanks for the submission.  Your changes are now in cvs (except for the LANGUAGE one - see below for reason).  Let me know how cvs version works now on your machine.

Regarding the openemr/library/classes/Controller.class.php change, lots of translation development going on, and we have removed all hard coding of the LANGUAGE constants.  Also, separating the language from the function (for example some dutch users want their language but not the dutch_PC customization.  I’d suggest setting the $GLOBALS[‘dutchpc’] variable in openemr/interface/globals.php to true to get what you want.

thanks again and looking forward to more submissions,
-brady

anooshh wrote on Sunday, April 26, 2009:

One more I forgot

diff -r --exclude=Entries --exclude=.svn --exclude=Entries.Log /usr/src/openEMRCVS/openemr/interface/reports/receipts_by_method_report.php ./interface/reports/receipts_by_method_report.php
143d142
< $form_cptcode   = trim($_POST[‘form_cptcode’]);
186,189d184
<    <?php if (!$GLOBALS[‘simplified_demographics’]) echo ‘&nbsp;’ . xl(‘CPT’) . ‘:’; ?>
<    <input type=‘text’ name=‘form_cptcode’ size=‘5’ value=’<? echo $form_cptcode; ?>’
<     title=’<?php xl(‘Optional procedure code’,‘e’); ?>’
<     <?php if ($GLOBALS[‘simplified_demographics’]) echo “style=‘display:none’”; ?> />
191c186
<    <input type=‘checkbox’ name=‘form_details’ value=‘1’<?php if ($_POST[‘form_details’]) echo " checked"; ?> /><?xl(‘Details’,‘e’)?>

>    <input type=‘checkbox’ name=‘form_details’ value=‘1’<? if ($_POST[‘form_details’]) echo " checked"; ?>><?xl(‘Details’,‘e’)?>

bradymiller wrote on Monday, April 27, 2009:

thanks,
It’s now in cvs.
-brady