sphule/openemr — comment on commit df7cfcd7fcba9ca91c6fb739a4b4eea23f9671fe
File: library/ajax/addlistitem.php line 45
By devendersingh:

HI Kevin,
Thanks for your suggestion,I have made the required changes and also used the updated fork and committed the code in https://github.com/sphule/openemr/commits/mmfsystems-add-button-demographics-updated ,could you please check so as I could commit other bugs with the same updated fork.

Regards
Devender

----- Original Message -----
From: "Kevin Yeh"
To: "Devender"
Sent: Friday, January 6, 2012 7:57:44 PM
Subject: Re: [openemr] Committed changes in addlistitem.php as suggestion made by adding xl() function and addslashes funtion for code optimization (df7cfcd)

You should consider using json_encode
http://php.net/manual/en/function.json-encode.php
I think it would be less error prone than concating string and syntactically simpler, especially if you have more than one parameter. It's easy to mess up the quotes and slashes
So this becomes
echo json_encode(array("error"=> xl('Record already exist') );

---
Reply to this email directly or view it on GitHub:
https://github.com/sphule/openemr/commit/df7cfcd7fcba9ca91c6fb739a4b4eea23f9671fe#commitcomment-843795