3 // vim: expandtab sw=4 ts=4 sts=4:
6 * Database based configuration system
7 * Robin Johnson <robbat2@users.sourceforge.net>
11 if (!defined('PMA_DB_CONFIG_LIB_INCLUDED')) {
12 define('PMA_DB_CONFIG_LIB_INCLUDED', 1);
15 * Converts attributes of an object to xml code
17 * Original obj2xml() function by <jgettys@gnuvox.com>
18 * as found on http://www.php.net/manual/en/function.get-defined-vars.php
19 * Fixed and improved by Robin Johnson <robbat2@users.sourceforge.net>
21 * @param object the source
22 * @param string identication
26 function obj2xml($v, $indent = '') {
28 while (list($key, $val) = each($v)) {
29 if (is_string($key) && ($key == '__attr')) {
34 if (is_object($val->__attr
)) {
35 while (list($key2, $val2) = each($val->__attr
)) {
36 $attr .= " $key2=\"$val2\"";
42 // Preserve data type information
43 $attr .= ' type="' . gettype($val) . '"';
45 if (is_array($val) ||
is_object($val)) {
46 echo "$indent<$key$attr>\n";
47 obj2xml($val, $indent . ' ');
48 echo "$indent</$key>\n";
50 if (is_string($val) && ($val == '')) {
51 echo "$indent<$key$attr />\n";
53 echo "$indent<$key$attr>$val</$key>\n";
57 } // end of the "obj2xml()" function
60 $cfg['DBConfig']['AllowUserOverride'] = array(
61 'Servers/*/bookmarkdb',
62 'Servers/*/bookmarktable',
64 'Servers/*/pdf_table_position',
70 'NavigationBarIconic',
90 'ModifyDeleteAtRight',
95 } // $__PMA_DB_CONFIG_LIB__