summaryrefslogtreecommitdiffstats
path: root/etc/inc/xmlparse.inc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-03-16 22:12:47 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-03-16 22:12:47 -0600
commit441e6007989f3f9a835fd40ee606785edf300b2c (patch)
treec45389e936c3a6b4d1beaa702e4b96303f044b3a /etc/inc/xmlparse.inc
parent2843a3ec5d4a160646e496f3922266415151902a (diff)
downloadpfsense-441e6007989f3f9a835fd40ee606785edf300b2c.zip
pfsense-441e6007989f3f9a835fd40ee606785edf300b2c.tar.gz
Needs a little more testing; revert attribute support in xmlparse.inc for now.
This reverts commit 2843a3ec5d4a160646e496f3922266415151902a.
Diffstat (limited to 'etc/inc/xmlparse.inc')
-rw-r--r--etc/inc/xmlparse.inc36
1 files changed, 1 insertions, 35 deletions
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index f8a90c1..7c5a554 100644
--- a/etc/inc/xmlparse.inc
+++ b/etc/inc/xmlparse.inc
@@ -59,28 +59,14 @@ function listtags_pkg() {
return $ret;
}
-/* The following items will be treated as arrays in regdomain.xml */
-function listtags_rd() {
- $ret = explode(" ",
- "band country flags freqband netband rd "
- );
- return $ret;
-}
-
function startElement($parser, $name, $attrs) {
- global $parsedcfg, $depth, $curpath, $havedata, $listtags, $parsedattrs, $parsingattrs;
+ global $parsedcfg, $depth, $curpath, $havedata, $listtags;
array_push($curpath, strtolower($name));
$ptr =& $parsedcfg;
- if (isset($parsingattrs) && !empty($attrs)) {
- $attrptr =& $parsedattrs;
- $writeattrs = true;
- }
foreach ($curpath as $path) {
$ptr =& $ptr[$path];
- if (isset($writeattrs))
- $attrptr =& $attrptr[$path];
}
/* is it an element that belongs to a list? */
@@ -94,19 +80,11 @@ function startElement($parser, $name, $attrs) {
array_push($curpath, count($ptr));
- if (isset($writeattrs)) {
- if (!is_array($attrptr))
- $attrptr = array();
- $attrptr[count($ptr)] = $attrs;
- }
-
} else if (isset($ptr)) {
/* multiple entries not allowed for this element, bail out */
die(sprintf("XML error: %s at line %d cannot occur more than once\n",
$name,
xml_get_current_line_number($parser)));
- } else if (isset($writeattrs)) {
- $attrptr = $attrs;
}
$depth++;
@@ -176,18 +154,6 @@ function parse_xml_config_pkg($cffile, $rootobj, $isstring = "false") {
return parse_xml_config_raw($cffile, $rootobj, $isstring);
}
-function parse_xml_regdomain(&$rdattributes, $rdfile = '/etc/regdomain.xml', $rootobj = 'regulatory-data') {
- global $listtags, $parsedattrs, $parsingattrs;
- $listtags = listtags_rd();
- $parsedattrs = array();
- $parsingattrs = true;
- $ret = parse_xml_config_raw($rdfile, $rootobj);
- $rdattributes = $parsedattrs[$rootobj];
- unset($parsedattrs);
- unset($parsingattrs);
- return $ret;
-}
-
function parse_xml_config_raw($cffile, $rootobj, $isstring = "false") {
global $depth, $curpath, $parsedcfg, $havedata, $listtags;
OpenPOWER on IntegriCloud