summaryrefslogtreecommitdiffstats
path: root/etc/inc/xmlparse.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-03-12 16:34:38 +0000
committerErmal <eri@pfsense.org>2014-03-12 16:34:38 +0000
commit72a8c829fd5bacea4b93f4d511e34a7d5661ce97 (patch)
tree601f6b892cdf9858a59b0f1edc0d66c81555e602 /etc/inc/xmlparse.inc
parentb79ea46a959c6f9900d4e92d9c3427bc75cc5526 (diff)
downloadpfsense-72a8c829fd5bacea4b93f4d511e34a7d5661ce97.zip
pfsense-72a8c829fd5bacea4b93f4d511e34a7d5661ce97.tar.gz
Be more efficient, and ordered about thae tags and also syncrhonize tags with xmlreader
Diffstat (limited to 'etc/inc/xmlparse.inc')
-rw-r--r--etc/inc/xmlparse.inc46
1 files changed, 27 insertions, 19 deletions
diff --git a/etc/inc/xmlparse.inc b/etc/inc/xmlparse.inc
index a8effb0..96d5f60 100644
--- a/etc/inc/xmlparse.inc
+++ b/etc/inc/xmlparse.inc
@@ -32,29 +32,37 @@
/* The following items will be treated as arrays in config.xml */
function listtags() {
- /* Please keep this list alpha sorted and no longer than 80 characters
- * I know it's a pain, but it's a pain to find stuff too if it's not
- */
- $ret = explode(" ",
- "acls alias aliasurl allowedip allowedhostname authserver bridged ca cacert cert crl ".
- "clone config container columnitem build_port_path depends_on_package disk dnsserver ".
- "dnsupdate domainoverrides dyndns earlyshellcmd element encryption-algorithm-option ".
- "field fieldname hash-algorithm-option gateway_item gateway_group gif gre ".
- "group hosts member ifgroupentry igmpentry interface_array item key lagg " .
- "lbaction lbpool l7rules lbprotocol ".
- "member menu tab mobilekey monitor_type mount ntpserver onetoone ".
- "openvpn-server openvpn-client openvpn-csc " .
- "option package passthrumac phase1 phase2 ppp pppoe priv proxyarpnet qinqentry queue ".
- "pages pipe radnsserver roll route row rrddatafile rule schedule service servernat servers ".
- "serversdisabled earlyshellcmd shellcmd staticmap subqueue timerange ".
- "tunnel user vip virtual_server vlan winsserver wolentry widget npt pool"
- );
- return $ret;
+ /*
+ * Please keep this list alpha sorted and no longer than 80 characters
+ * I know it's a pain, but it's a pain to find stuff too if it's not
+ */
+ $ret = array(
+ 'acls', 'alias', 'aliasurl', 'allowedip', 'allowedhostname', 'authserver',
+ 'bridged', 'build_port_path',
+ 'ca', 'cacert', 'cert', 'crl', 'clone', 'config', 'container', 'columnitem',
+ 'depends_on_package', 'disk', 'dnsserver', 'dnsupdate', 'domainoverrides', 'dyndns',
+ 'earlyshellcmd', 'element', 'encryption-algorithm-option',
+ 'field', 'fieldname',
+ 'gateway_item', 'gateway_group', 'gif', 'gre', 'group',
+ 'hash-algorithm-option', 'hosts', 'member', 'ifgroupentry', 'igmpentry', 'interface_array', 'item', 'key',
+ 'lagg', 'lbaction', 'lbpool', 'l7rules', 'lbprotocol',
+ 'member', 'menu', 'tab', 'mobilekey', 'monitor_type', 'mount',
+ 'npt', 'ntpserver',
+ 'onetoone', 'openvpn-server', 'openvpn-client', 'openvpn-csc', 'option',
+ 'package', 'passthrumac', 'phase1', 'phase2', 'ppp', 'pppoe', 'priv', 'proxyarpnet', 'pool',
+ 'qinqentry', 'queue',
+ 'pages', 'pipe', 'radnsserver', 'roll', 'route', 'row', 'rrddatafile', 'rule',
+ 'schedule', 'service', 'servernat', 'servers',
+ 'serversdisabled', 'shellcmd', 'staticmap', 'subqueue',
+ 'timerange', 'tunnel', 'user', 'vip', 'virtual_server', 'vlan',
+ 'winsserver', 'wolentry', 'widget'
+ );
+ return array_flip($ret);
}
/* Package XML tags that should be treat as a list not as a traditional array */
function listtags_pkg() {
- $ret = array("build_port_path", "depends_on_package", "onetoone", "queue", "rule", "servernat", "alias", "additional_files_needed", "tab", "template", "menu", "rowhelperfield", "service", "step", "package", "columnitem", "option", "item", "field", "package", "file");
+ $ret = array('build_port_path', 'depends_on_package', 'onetoone', 'queue', 'rule', 'servernat', 'alias', 'additional_files_needed', 'tab', 'template', 'menu', 'rowhelperfield', 'service', 'step', 'package', 'columnitem', 'option', 'item', 'field', 'package', 'file');
return $ret;
}
OpenPOWER on IntegriCloud