forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check for empty array before looking for offsite document (opene…
…mr#7391) * fix: check for empty array before looking for offsite document * silence php warning * Changed up event logic,fixed bugs Instead of having the url splitting and parsing in the document class, I pass the file path into the PatientRetrieveOffsiteDocument event and let the module writer be responsible for parsing the url. This ensures that we handle any kind of url variety that is needed. Fixed up the event dispatcher throwing an error because it wasn't even set in the class... Fixed the setter in the event and exposed the URL property. No idea how this was even working in the module. * Bug fix prevent firing events if empty file Made it so that if the filename is empty that the event will not be fired. Changed up the URL so you can get the entire URL schema (which is what I thought was originally happening but apparently it wasn't). This means schemas such as s3:// ftp:// webdav:// etc can be handled by the class properly. Also changed up the event so you can get the entire saved document as an object if additional meta information is needed by the offsite document event handler. --------- Co-authored-by: Stephen Nielson <[email protected]>
- Loading branch information
1 parent
899ffee
commit a7a58d3
Showing
3 changed files
with
66 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters