]> git.wh0rd.org - tt-rss.git/commitdiff
check PHP version before trying to use DOMDocument
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 5 Jun 2007 10:32:53 +0000 (11:32 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 5 Jun 2007 10:32:53 +0000 (11:32 +0100)
opml.php

index 701d8396b55f8a7a582e42b999d01daa1580aa33..8d3f8d62bcba2cca06a15e6a3246a1b3876a237c 100644 (file)
--- a/opml.php
+++ b/opml.php
                        print "<p>".__("Importing OPML (using DOMXML extension)...")."</p>";
                        require_once "modules/opml_domxml.php";
                        opml_import_domxml($link, $owner_uid);
-               } else {
+               } else if (PHP_VERSION >= 5) {
                        print "<p>".__("Importing OPML (using DOMDocument extension)...")."</p>";
                        require_once "modules/opml_domdoc.php";
                        opml_import_domdoc($link, $owner_uid);
+               } else {
+                       print_error(__("DOMXML extension is not found. It is required for PHP versions below 5."));
                }
 
                print "<br><form method=\"GET\" action=\"prefs.php\">