bug #1233349 db search in MySQL 5.0.x on fields without a charset
[phpmyadmin/crack.git] / libraries / db_config.lib.php
blob3976d62f4c5c6d40eb50ed685afd8bff24bf6115
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 /**
6 * Database based configuration system
7 * Robin Johnson <robbat2@users.sourceforge.net>
8 * May 19, 2002
9 */
11 /**
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
21 * @access public
23 function obj2xml($v, $indent = '') {
24 $attr = '';
25 foreach ($v AS $key => $val) {
26 if (is_string($key) && ($key == '__attr')) {
27 continue;
30 // Check for __attr
31 if (is_object($val->__attr)) {
32 foreach ($val->__attr AS $key2 => $val2) {
33 $attr .= " $key2=\"$val2\"";
35 } else {
36 $attr = '';
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";
46 } else {
47 if (is_string($val) && ($val == '')) {
48 echo "$indent<$key$attr />\n";
49 } else {
50 echo "$indent<$key$attr>$val</$key>\n";
53 } // end while
54 } // end of the "obj2xml()" function
57 $cfg['DBConfig']['AllowUserOverride'] = array(
58 'Servers/*/bookmarkdb',
59 'Servers/*/bookmarktable',
60 'Servers/*/relation',
61 'Servers/*/pdf_table_position',
62 'ShowSQL',
63 'Confirm',
64 'LeftFrameLight',
65 'ShowTooltip',
66 'ShowBlob',
67 'NavigationBarIconic',
68 'ShowAll',
69 'MaxRows',
70 'Order',
71 'ProtectBinary',
72 'ShowFunctionFields',
73 'LeftWidth',
74 'LeftBgColor',
75 'LeftPointerColor',
76 'RightBgColor',
77 'Border',
78 'ThBgcolor',
79 'BgcolorOne',
80 'BgcolorTwo',
81 'BrowsePointerColor',
82 'BrowseMarkerColor',
83 'TextareaCols',
84 'TextareaRows',
85 'LimitChars',
86 'ModifyDeleteAtLeft',
87 'ModifyDeleteAtRight',
88 'DefaultDisplay',
89 'RepeatCells'