3 // vim: expandtab sw=4 ts=4 sts=4:
6 * Database based configuration system
7 * Robin Johnson <robbat2@users.sourceforge.net>
12 * Converts attributes of an object to xml code
14 * Original obj2xml() function by <jgettys@gnuvox.com>
15 * as found on http://www.php.net/manual/en/function.get-defined-vars.php
16 * Fixed and improved by Robin Johnson <robbat2@users.sourceforge.net>
18 * @param object the source
19 * @param string identication
23 function obj2xml($v, $indent = '') {
25 foreach ($v AS $key => $val) {
26 if (is_string($key) && ($key == '__attr')) {
31 if (is_object($val->__attr
)) {
32 foreach ($val->__attr
AS $key2 => $val2) {
33 $attr .= " $key2=\"$val2\"";
39 // Preserve data type information
40 $attr .= ' type="' . gettype($val) . '"';
42 if (is_array($val) ||
is_object($val)) {
43 echo "$indent<$key$attr>\n";
44 obj2xml($val, $indent . ' ');
45 echo "$indent</$key>\n";
47 if (is_string($val) && ($val == '')) {
48 echo "$indent<$key$attr />\n";
50 echo "$indent<$key$attr>$val</$key>\n";
54 } // end of the "obj2xml()" function
57 $cfg['DBConfig']['AllowUserOverride'] = array(
58 'Servers/*/bookmarkdb',
59 'Servers/*/bookmarktable',
61 'Servers/*/pdf_table_position',
67 'NavigationBarIconic',
87 'ModifyDeleteAtRight',