New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add missing use statement in facility admin script #7428
Conversation
@@ -12,26 +12,32 @@ | |||
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 | |||
*/ | |||
|
|||
use OpenEMR\Common\Acl\AclMain; | |||
use OpenEMR\Common\Session\SessionUtil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work on the portal, but would make sure it works on the portal.
|
||
if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite_two'])) { | ||
$pid = $_SESSION['pid']; | ||
$ignoreAuth = true; | ||
global $ignoreAuth; | ||
} else { | ||
OpenEMR\Common\Session\SessionUtil::portalSessionCookieDestroy(); | ||
SessionUtil::portalSessionCookieDestroy(); | ||
header('Location: ' . $landingpage . '?w'); | ||
exit; | ||
} | ||
} else { | ||
// Check authorization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a weird else block (try best to never include globals.php twice). Would just have this block set up a flag such as notPatientPortal = true
Then use that flag to run the auth after the includes below (so will then be below the globals.php below)
ccr/createCCR.php
Outdated
use OpenEMR\Common\Acl\AclMain; | ||
use OpenEMR\Common\Session\SessionUtil; | ||
use OpenEMR\Common\Twig\TwigContainer; | ||
use PHPMailer\PHPMailer\PHPMailer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also generally try to do the use block after globals.php is brought to avoid ever messing up things in that core script. in this case could just put the use for SessionUtil here and the put the other after globals.php is brought in below
ccr/createCCRActor.php
Outdated
@@ -141,7 +141,7 @@ | |||
$e_InformationSystem = $ccr->createElement('InformationSystem'); | |||
$e_Actor->appendChild($e_InformationSystem); | |||
|
|||
$e_Name = $ccr->createElement('Name', $row1['facility']); | |||
$e_Name = $ccr->createElement('Name', htmlentities($row1['facility'] ?? '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @stephenwaite , Just checking why the htmlentities() function call is being used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The facility has an & in its name :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will text() function get what you need? Been avoiding htmlentities since I don't understand it :)
…_last * 'master' of https://github.com/openemr/openemr: fix: add missing use statement in facility admin script (openemr#7428)
* fix: add missing use statement in facility admin script * add missing use statement in facility add script * fix use statement in create ccr * better placement of use statements per review plus warns fixed * use text() instead
* fix: add missing use statement in facility admin script (#7428) * fix: add missing use statement in facility admin script * add missing use statement in facility add script * fix use statement in create ccr * better placement of use statements per review plus warns fixed * use text() instead * fix: bug (#7435) * fix: bug * else die * fix: bug (#7434) * fix: billing manager To Encounter button to load proper person (#7420) * fix: fix billing manager To Encounter button to load proper person * better to edit the person so it loads the dashboard tab if missing * change button name
Fixes #7427
Short description of what this resolves:
Changes proposed in this pull request: