Przeglądaj źródła

#680 Setup failing to display the check report when DOM extension not enabled (php-xml not installed on redhat distributions)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2623 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 lat temu
rodzic
commit
99c4e3b212
1 zmienionych plików z 16 dodań i 0 usunięć
  1. 16 0
      setup/modelfactory.class.inc.php

+ 16 - 0
setup/modelfactory.class.inc.php

@@ -1295,6 +1295,14 @@ EOF;
 
 
 
 
 /**
 /**
+ * Allow the setup page to load and perform its checks (including the check about the required extensions)
+ */
+if (!class_exists('DOMElement'))
+{
+class DOMElement {function __construct(){throw new Exception('The dom extension is not enabled');}}
+}
+
+/**
  * MFElement: helper to read/change the DOM
  * MFElement: helper to read/change the DOM
  * @package ModelFactory
  * @package ModelFactory
  */
  */
@@ -1780,6 +1788,14 @@ class MFElement extends DOMElement
 }
 }
 
 
 /**
 /**
+ * Allow the setup page to load and perform its checks (including the check about the required extensions)
+ */
+if (!class_exists('DOMDocument'))
+{
+class DOMDocument {function __construct(){throw new Exception('The dom extension is not enabled');}}
+}
+
+/**
  * MFDocument - formating rules for XML input/output
  * MFDocument - formating rules for XML input/output
  * @package ModelFactory
  * @package ModelFactory
  */
  */