projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6498e0d
)
replace load with loadXML()
author
Jitendra Purohit
<jitendra@fuzion.co.nz>
Tue, 2 May 2017 12:39:34 +0000
(18:09 +0530)
committer
Jitendra Purohit
<jitendra@fuzion.co.nz>
Wed, 3 May 2017 15:10:17 +0000
(20:40 +0530)
CRM/Case/Audit/AuditConfig.php
patch
|
blob
|
blame
|
history
CRM/Case/XMLRepository.php
patch
|
blob
|
blame
|
history
CRM/Core/CodeGen/Util/Xml.php
patch
|
blob
|
blame
|
history
CRM/Utils/Migrate/Import.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Case/Audit/AuditConfig.php
b/CRM/Case/Audit/AuditConfig.php
index 3fedba067845af59017d0881c31b8e2b75b4d84b..5065cca44b793881e9b95907214283bee368d843 100644
(file)
--- a/
CRM/Case/Audit/AuditConfig.php
+++ b/
CRM/Case/Audit/AuditConfig.php
@@
-61,9
+61,8
@@
class CRM_Case_Audit_AuditConfig {
$this->includeRules = array();
$doc = new DOMDocument();
$this->includeRules = array();
$doc = new DOMDocument();
- $oldValue = libxml_disable_entity_loader(FALSE);
- $load = $doc->load(dirname(__FILE__) . '/' . $this->filename);
- libxml_disable_entity_loader($oldValue);
+ $xmlString = file_get_contents(dirname(__FILE__) . '/' . $this->filename);
+ $load = $doc->loadXML($xmlString);
if ($load) {
$regions = $doc->getElementsByTagName("region");
foreach ($regions as $region) {
if ($load) {
$regions = $doc->getElementsByTagName("region");
foreach ($regions as $region) {
diff --git
a/CRM/Case/XMLRepository.php
b/CRM/Case/XMLRepository.php
index 34fc42da55dbfbff823c43ed5e018fac3e42b028..bf6e2c210b3aeb686e2c46b5771370b82c94eb95 100644
(file)
--- a/
CRM/Case/XMLRepository.php
+++ b/
CRM/Case/XMLRepository.php
@@
-136,9
+136,9
@@
class CRM_Case_XMLRepository {
if ($fileName && file_exists($fileName)) {
// read xml file
$dom = new DomDocument();
if ($fileName && file_exists($fileName)) {
// read xml file
$dom = new DomDocument();
- $
oldValue = libxml_disable_entity_loader(FALSE
);
- $dom->load
($fileName
);
-
libxml_disable_entity_loader($oldValue)
;
+ $
xmlString = file_get_contents($fileName
);
+ $dom->load
XML($xmlString
);
+
$dom->documentURI = $fileName
;
$dom->xinclude();
$fileXml = simplexml_import_dom($dom);
}
$dom->xinclude();
$fileXml = simplexml_import_dom($dom);
}
diff --git
a/CRM/Core/CodeGen/Util/Xml.php
b/CRM/Core/CodeGen/Util/Xml.php
index aa3335581e9796ac51923192946606dc13d32da8..96f94477e9a6acba81037d2fd3bc19381449861d 100644
(file)
--- a/
CRM/Core/CodeGen/Util/Xml.php
+++ b/
CRM/Core/CodeGen/Util/Xml.php
@@
-11,10
+11,10
@@
class CRM_Core_CodeGen_Util_Xml {
* @return SimpleXMLElement|bool
*/
public static function parse($file) {
* @return SimpleXMLElement|bool
*/
public static function parse($file) {
- $oldValue = libxml_disable_entity_loader(FALSE);
$dom = new DomDocument();
$dom = new DomDocument();
- $dom->load($file);
- libxml_disable_entity_loader($oldValue);
+ $xmlString = file_get_contents($file);
+ $dom->loadXML($xmlString);
+ $dom->documentURI = $file;
$dom->xinclude();
$xml = simplexml_import_dom($dom);
return $xml;
$dom->xinclude();
$xml = simplexml_import_dom($dom);
return $xml;
diff --git
a/CRM/Utils/Migrate/Import.php
b/CRM/Utils/Migrate/Import.php
index 29397a960fb43532bd338016b84b834776c6a497..d7905959015150413b68bdba19ad2473410d10b7 100644
(file)
--- a/
CRM/Utils/Migrate/Import.php
+++ b/
CRM/Utils/Migrate/Import.php
@@
-48,9
+48,8
@@
class CRM_Utils_Migrate_Import {
public function run($file) {
// read xml file
$dom = new DomDocument();
public function run($file) {
// read xml file
$dom = new DomDocument();
- $oldValue = libxml_disable_entity_loader(FALSE);
- $load = $dom->load($file);
- libxml_disable_entity_loader($oldValue);
+ $xmlString = file_get_contents($file);
+ $load = $dom->loadXML($xmlString);
if (!$load) {
throw new CRM_Core_Exception("Failed to parse XML file \"$file\"");
}
if (!$load) {
throw new CRM_Core_Exception("Failed to parse XML file \"$file\"");
}