no disabling of the parser
[phpmyadmin/crack.git] / libraries / config_import.lib.php3
blobeee209d14b800337a89f65e9e4ea723001692e1c
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * This file provides support for older config files.
8 */
10 /**
11 * U S A G E
13 * After having added a new directive to the config.inc.php3 file, you need to
14 * put some backwards compatibility code into this file.
16 * This usually looks like this:
18 * if (!isset($myNewDirective)) {
19 * $myNewDirective = 'my default value';
20 * }
22 * If the new directive is meant as a replacement for an old one, please use the
23 * following layout:
25 * if (!isset($myNewDirective)) {
26 * if (isset($myOldDirective)) {
27 * $myNewDirective = $myOldDirective;
28 * unset($myOldDirective);
29 * } else {
30 * $myNewDirective = '';
31 * }
32 * }
34 * In order to make this file readable for other developers, please try to use
35 * the same order of directives here as you do in config.inc.php3.
37 * After having done all this, search libraries/common.lib.php3 for the
38 * following paragraph (x is an integer):
40 * if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < x) {
41 * include('./libraries/config_import.lib.php3');
42 * }
44 * Finally, set x to the _new_ revision number of config.inc.php3
45 * (without '1.': 234 instead of 1.234) and you're done!
48 if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) {
49 define('PMA_CONFIG_IMPORT_LIB_INCLUDED', 1);
51 if (!isset($cfg['PmaAbsoluteUri'])) {
52 if (isset($cfgPmaAbsoluteUri)) {
53 $cfg['PmaAbsoluteUri'] = $cfgPmaAbsoluteUri;
54 unset($cfgPmaAbsoluteUri);
55 } else {
56 $cfg['PmaAbsoluteUri'] = '';
60 if (!isset($cfg['Servers'])) {
61 if (isset($cfgServers)) {
62 $cfg['Servers'] = $cfgServers;
63 unset($cfgServers);
64 } else {
65 $server = 0;
69 if (isset($cfg['Servers'])) {
70 for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) {
71 if (!isset($cfg['Servers'][$i]['host'])) {
72 $cfg['Servers'][$i]['host'] = '';
74 if (!isset($cfg['Servers'][$i]['port'])) {
75 $cfg['Servers'][$i]['port'] = '';
78 if (!isset($cfg['Servers'][$i]['socket'])) {
79 $cfg['Servers'][$i]['socket'] = '';
82 if (!isset($cfg['Servers'][$i]['connect_type'])) {
83 $cfg['Servers'][$i]['connect_type'] = 'tcp';
86 if (!isset($cfg['Servers'][$i]['controluser']) && isset($cfg['Servers'][$i]['stduser'])) {
87 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['stduser'];
88 $cfg['Servers'][$i]['controlpass'] = $cfg['Servers'][$i]['stdpass'];
89 unset($cfg['Servers'][$i]['stduser']);
90 unset($cfg['Servers'][$i]['stdpass']);
91 } else if (!isset($cfg['Servers'][$i]['controluser'])) {
92 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['controlpass'] = '';
95 if (!isset($cfg['Servers'][$i]['auth_type'])) {
96 $cfg['Servers'][$i]['auth_type'] = (isset($cfg['Servers'][$i]['adv_auth']) && $cfg['Servers'][$i]['adv_auth'])
97 ? 'http'
98 : 'config';
99 unset($cfg['Servers'][$i]['adv_auth']);
102 if (!isset($cfg['Servers'][$i]['compress'])) {
103 $cfg['Servers'][$i]['compress'] = FALSE;
106 if (!isset($cfg['Servers'][$i]['user'])) {
107 $cfg['Servers'][$i]['user'] = 'root';
110 if (!isset($cfg['Servers'][$i]['password'])) {
111 $cfg['Servers'][$i]['password'] = '';
114 if (!isset($cfg['Servers'][$i]['only_db'])) {
115 $cfg['Servers'][$i]['only_db'] = '';
118 if (!isset($cfg['Servers'][$i]['verbose'])) {
119 $cfg['Servers'][$i]['verbose'] = '';
122 if (!isset($cfg['Servers'][$i]['pmadb'])) {
123 if (isset($cfg['Servers'][$i]['bookmarkdb'])) {
124 $cfg['Servers'][$i]['pmadb'] = $cfg['Servers'][$i]['bookmarkdb'];
125 unset($cfg['Servers'][$i]['bookmarkdb']);
126 } else {
127 $cfg['Servers'][$i]['pmadb'] = '';
131 if (!isset($cfg['Servers'][$i]['bookmarktable'])) {
132 $cfg['Servers'][$i]['bookmarktable'] = '';
135 if (!isset($cfg['Servers'][$i]['relation'])) {
136 $cfg['Servers'][$i]['relation'] = '';
139 if (!isset($cfg['Servers'][$i]['table_info'])) {
140 $cfg['Servers'][$i]['table_info'] = '';
143 if (!isset($cfg['Servers'][$i]['table_coords'])) {
144 $cfg['Servers'][$i]['table_coords'] = '';
147 if (!isset($cfg['Servers'][$i]['column_info'])) {
148 if (isset($cfg['Servers'][$i]['column_comments'])) {
149 $cfg['Servers'][$i]['column_info'] = $cfg['Servers'][$i]['column_comments'];
150 unset($cfg['Servers'][$i]['column_comments']);
151 } else {
152 $cfg['Servers'][$i]['column_info'] = '';
156 if (!isset($cfg['Servers'][$i]['pdf_pages'])) {
157 $cfg['Servers'][$i]['pdf_pages'] = '';
160 if (!isset($cfg['Servers'][$i]['history'])) {
161 $cfg['Servers'][$i]['history'] = '';
164 if (!isset($cfg['Servers'][$i]['verbose_check'])) {
165 $cfg['Servers'][$i]['verbose_check'] = TRUE;
168 if (!isset($cfg['Servers'][$i]['AllowDeny'])) {
169 $cfg['Servers'][$i]['AllowDeny'] = array ('order' => '',
170 'rules' => array());
175 if (!isset($cfg['ServerDefault'])) {
176 if (isset($cfgServerDefault)) {
177 $cfg['ServerDefault'] = $cfgServerDefault;
178 unset($cfgServerDefault);
179 } else {
180 $cfg['ServerDefault'] = 1;
184 if (!isset($cfg['OBGzip'])) {
185 if (isset($cfgOBGzip)) {
186 $cfg['OBGzip'] = $cfgOBGzip;
187 unset($cfgOBGzip);
188 } else {
189 $cfg['OBGzip'] = TRUE;
193 if (!isset($cfg['PersistentConnections'])) {
194 if (isset($cfgPersistentConnections)) {
195 $cfg['PersistentConnections'] = $cfgPersistentConnections;
196 unset($cfgPersistentConnections);
197 } else {
198 $cfg['PersistentConnections'] = FALSE;
202 if (!isset($cfg['ExecTimeLimit'])) {
203 if (isset($cfgExecTimeLimit)) {
204 $cfg['ExecTimeLimit'] = $cfgExecTimeLimit;
205 unset($cfgExecTimeLimit);
206 } else {
207 $cfg['ExecTimeLimit'] = 300;
211 if (!isset($cfg['SkipLockedTables'])) {
212 if (isset($cfgSkipLockedTables)) {
213 $cfg['SkipLockedTables'] = $cfgSkipLockedTables;
214 unset($cfgSkipLockedTables);
215 } else {
216 $cfg['SkipLockedTables'] = FALSE;
220 if (!isset($cfg['ShowSQL'])) {
221 if (isset($cfgShowSQL)) {
222 $cfg['ShowSQL'] = $cfgShowSQL;
223 unset($cfgShowSQL);
224 } else {
225 $cfg['ShowSQL'] = TRUE;
229 if (!isset($cfg['AllowUserDropDatabase'])) {
230 if (isset($cfgAllowUserDropDatabase)) {
231 $cfg['AllowUserDropDatabase'] = $cfgAllowUserDropDatabase;
232 unset($cfgAllowUserDropDatabase);
233 } else {
234 $cfg['AllowUserDropDatabase'] = FALSE;
238 if (!isset($cfg['Confirm'])) {
239 if (isset($cfgConfirm)) {
240 $cfg['Confirm'] = $cfgConfirm;
241 unset($cfgConfirm);
242 } else {
243 $cfg['Confirm'] = TRUE;
247 if (!isset($cfg['LoginCookieRecall'])) {
248 if (isset($cfgLoginCookieRecall)) {
249 $cfg['LoginCookieRecall'] = $cfgLoginCookieRecall;
250 unset($cfgLoginCookieRecall);
251 } else {
252 $cfg['LoginCookieRecall'] = TRUE;
256 if (!isset($cfg['UseDbSearch'])) {
257 $cfg['UseDbSearch'] = TRUE;
260 if (!isset($cfg['LeftFrameLight'])) {
261 if (isset($cfgLeftFrameLight)) {
262 $cfg['LeftFrameLight'] = $cfgLeftFrameLight;
263 unset($cfgLeftFrameLight);
264 } else {
265 $cfg['LeftFrameLight'] = TRUE;
269 if (!isset($cfg['LightTabs'])) {
270 $cfg['LightTabs'] = FALSE;
273 if (!isset($cfg['ShowTooltip'])) {
274 if (isset($cfgShowTooltip)) {
275 $cfg['ShowTooltip'] = $cfgShowTooltip;
276 } else {
277 $cfg['ShowTooltip'] = TRUE;
281 if (!isset($cfg['LeftDisplayLogo'])) {
282 $cfg['LeftDisplayLogo'] = TRUE;
285 if (!isset($cfg['ShowStats'])) {
286 if (isset($cfgShowStats)) {
287 $cfg['ShowStats'] = $cfgShowStats;
288 unset($cfgShowStats);
289 } else {
290 $cfg['ShowStats'] = TRUE;
294 if (!isset($cfg['ShowMysqlInfo'])) {
295 if (isset($cfgShowMysqlInfo)) {
296 $cfg['ShowMysqlInfo'] = $cfgShowMysqlInfo;
297 unset($cfgShowMysqlInfo);
298 } else {
299 $cfg['ShowMysqlInfo'] = FALSE;
303 if (!isset($cfg['ShowMysqlVars'])) {
304 if (isset($cfgShowMysqlVars)) {
305 $cfg['ShowMysqlVars'] = $cfgShowMysqlVars;
306 unset($cfgShowMysqlVars);
307 } else {
308 $cfg['ShowMysqlVars'] = FALSE;
312 if (!isset($cfg['ShowPhpInfo'])) {
313 if (isset($cfgShowPhpInfo)) {
314 $cfg['ShowPhpInfo'] = $cfgShowPhpInfo;
315 unset($cfgShowPhpInfo);
316 } else {
317 $cfg['ShowPhpInfo'] = FALSE;
321 if (!isset($cfg['ShowChgPassword'])) {
322 if (isset($cfgShowChgPassword)) {
323 $cfg['ShowChgPassword'] = $cfgShowChgPassword;
324 unset($cfgShowChgPassword);
325 } else {
326 $cfg['ShowChgPassword'] = FALSE;
330 if (!isset($cfg['SuggestDBName'])) {
331 $cfg['SuggestDBName'] = TRUE;
334 if (!isset($cfg['ShowBlob'])) {
335 if (isset($cfgShowBlob)) {
336 $cfg['ShowBlob'] = $cfgShowBlob;
337 unset($cfgShowBlob);
338 } else {
339 $cfg['ShowBlob'] = FALSE;
343 if (!isset($cfg['NavigationBarIconic'])) {
344 if (isset($cfgNavigationBarIconic)) {
345 $cfg['NavigationBarIconic'] = $cfgNavigationBarIconic;
346 unset($cfgNavigationBarIconic);
347 } else {
348 $cfg['NavigationBarIconic'] = TRUE;
352 if (!isset($cfg['ShowAll'])) {
353 if (isset($cfgShowAll)) {
354 $cfg['ShowAll'] = $cfgShowAll;
355 unset($cfgShowAll);
356 } else {
357 $cfg['ShowAll'] = FALSE;
361 if (!isset($cfg['MaxRows'])) {
362 if (isset($cfgMaxRows)) {
363 $cfg['MaxRows'] = $cfgMaxRows;
364 unset($cfgMaxRows);
365 } else {
366 $cfg['MaxRows'] = 30;
370 if (!isset($cfg['Order'])) {
371 if (isset($cfgOrder)) {
372 $cfg['Order'] = $cfgOrder;
373 unset($cfgOrder);
374 } else {
375 $cfg['Order'] = 'ASC';
379 if (!isset($cfg['ProtectBinary'])) {
380 if (isset($cfgProtectBinary)) {
381 $cfg['ProtectBinary'] = $cfgProtectBinary;
382 unset($cfgProtectBinary);
383 } else if (isset($cfg['ProtectBlob'])) {
384 $cfg['ProtectBinary'] = ($cfg['ProtectBlob'] ? 'blob' : FALSE);
385 unset($cfg['ProtectBlob']);
386 } else if (isset($cfgProtectBlob)) {
387 $cfg['ProtectBinary'] = ($cfgProtectBlob ? 'blob' : FALSE);
388 unset($cfgProtectBlob);
389 } else {
390 $cfg['ProtectBinary'] = 'blob';
394 if (!isset($cfg['ShowFunctionFields'])) {
395 if (isset($cfgShowFunctionFields)) {
396 $cfg['ShowFunctionFields'] = $cfgShowFunctionFields;
397 unset($cfgShowFunctionFields);
398 } else {
399 $cfg['ShowFunctionFields'] = TRUE;
403 if (!isset($cfg['CharEditing'])) {
404 $cfg['CharEditing'] = 'input';
407 if (!isset($cfg['ZipDump'])) {
408 if (isset($cfgZipDump)) {
409 $cfg['ZipDump'] = $cfgZipDump;
410 unset($cfgZipDump);
411 } else {
412 $cfg['ZipDump'] = TRUE;
416 if (!isset($cfg['GZipDump'])) {
417 if (isset($cfgGZipDump)) {
418 $cfg['GZipDump'] = $cfgGZipDump;
419 unset($cfgGZipDump);
420 } else {
421 $cfg['GZipDump'] = TRUE;
425 if (!isset($cfg['BZipDump'])) {
426 if (isset($cfgBZipDump)) {
427 $cfg['BZipDump'] = $cfgBZipDump;
428 unset($cfgBZipDump);
429 } else {
430 $cfg['BZipDump'] = TRUE;
434 if (!isset($cfg['DefaultTabServer'])) {
435 $cfg['DefaultTabServer'] = 'main.php3';
438 if (!isset($cfg['DefaultTabDatabase'])
439 // rabus: config.inc.php3 rev. 1.112 had this default value.
440 || $cfg['DefaultTabDatabase'] == 'Structure') {
441 $cfg['DefaultTabDatabase'] = 'db_details_structure.php3';
444 if (!isset($cfg['DefaultTabTable'])
445 // rabus: config.inc.php3 rev. 1.112 had this default value.
446 || $cfg['DefaultTabTable'] == 'Structure') {
447 $cfg['DefaultTabTable'] = 'tbl_properties_structure.php3';
450 if (!isset($cfg['ManualBase'])) {
451 if (isset($cfgManualBaseShort)) {
452 $cfg['ManualBase'] = $cfgManualBaseShort;
453 $cfg['MySQLManualType'] = 'old';
454 unset($cfgManualBaseShort);
455 } else if (isset($cfg['ManualBaseShort'])) {
456 $cfg['ManualBase'] = $cfg['ManualBaseShort'];
457 $cfg['MySQLManualType'] = 'old';
458 unset($cfg['ManualBaseShort']);
459 } else {
460 $cfg['ManualBase'] = 'http://www.mysql.com/doc/en';
461 $cfg['MySQLManualType'] = 'searchable';
465 if (!isset($cfg['MySQLManualType'])) {
466 $cfg['MySQLManualType'] = 'none';
469 if (!isset($cfg['DefaultLang'])) {
470 if (isset($cfgDefaultLang)) {
471 $cfg['DefaultLang'] = $cfgDefaultLang;
472 unset($cfgDefaultLang);
473 } else {
474 $cfg['DefaultLang'] = 'en-iso-8859-1';
478 if (!isset($cfg['DefaultCharset'])) {
479 $cfg['DefaultCharset'] = 'iso-8859-1';
482 if (!isset($cfg['AllowAnywhereRecoding'])) {
483 $cfg['AllowAnywhereRecoding'] = FALSE;
486 if (!isset($cfg['Lang']) &&isset($cfgLang)) {
487 $cfg['Lang'] = $cfgLang;
488 unset($cfgLang);
491 if (!isset($cfg['LeftWidth'])) {
492 if (isset($cfgLeftWidth)) {
493 $cfg['LeftWidth'] = $cfgLeftWidth;
494 unset($cfgLeftWidth);
495 } else {
496 $cfg['LeftWidth'] = 150;
500 if (!isset($cfg['LeftBgColor'])) {
501 if (isset($cfgLeftBgColor)) {
502 $cfg['LeftBgColor'] = $cfgLeftBgColor;
503 unset($cfgLeftBgColor);
504 } else {
505 $cfg['LeftBgColor'] = '#D0DCE0';
509 if (!isset($cfg['LeftPointerColor'])) {
510 if (isset($cfgLeftPointerColor)) {
511 $cfg['LeftPointerColor'] = $cfgLeftPointerColor;
512 unset($cfgLeftPointerColor);
513 } else {
514 $cfg['LeftPointerColor'] = '#CCFFCC';
518 if (!isset($cfg['RightBgColor'])) {
519 if (isset($cfgRightBgColor)) {
520 $cfg['RightBgColor'] = $cfgRightBgColor;
521 unset($cfgRightBgColor);
522 } else {
523 $cfg['RightBgColor'] = '#F5F5F5';
527 if (!isset($cfg['RightBgImage'])) {
528 $cfg['RightBgImage'] = '';
531 if (!isset($cfg['Border'])) {
532 if (isset($cfgBorder)) {
533 $cfg['Border'] = $cfgBorder;
534 unset($cfgBorder);
535 } else {
536 $cfg['Border'] = 0;
540 if (!isset($cfg['ThBgcolor'])) {
541 if (isset($cfgThBgcolor)) {
542 $cfg['ThBgcolor'] = $cfgThBgcolor;
543 unset($cfgThBgcolor);
544 } else {
545 $cfg['ThBgcolor'] = '#D3DCE3';
549 if (!isset($cfg['BgcolorOne'])) {
550 if (isset($cfgBgcolorOne)) {
551 $cfg['BgcolorOne'] = $cfgBgcolorOne;
552 unset($cfgBgcolorOne);
553 } else {
554 $cfg['BgcolorOne'] = '#CCCCCC';
558 if (!isset($cfg['BgcolorTwo'])) {
559 if (isset($cfgBgcolorTwo)) {
560 $cfg['BgcolorTwo'] = $cfgBgcolorTwo;
561 unset($cfgBgcolorTwo);
562 } else {
563 $cfg['BgcolorTwo'] = '#DDDDDD';
567 if (!isset($cfg['BrowsePointerColor'])) {
568 if (isset($cfgBrowsePointerColor)) {
569 $cfg['BrowsePointerColor'] = $cfgBrowsePointerColor;
570 unset($cfgBrowsePointerColor);
571 } else {
572 $cfg['BrowsePointerColor'] = '#CCFFCC';
576 if (!isset($cfg['BrowseMarkerColor'])) {
577 if (isset($cfgBrowseMarkerColor)) {
578 $cfg['BrowseMarkerColor'] = $cfgBrowseMarkerColor;
579 unset($cfgBrowseMarkerColor);
580 } else if (isset($cfg['BrowseMarkRow'])) {
581 $cfg['BrowseMarkerColor'] = (!empty($cfg['BrowsePointerColor']) && !empty($cfg['BrowseMarkRow']))
582 ? '#FFCC99'
583 : '';
584 unset($cfg['BrowseMarkRow']);
585 } else if (isset($cfgBrowseMarkRow)) {
586 $cfg['BrowseMarkerColor'] = (!empty($cfg['BrowsePointerColor']) && !empty($cfgBrowseMarkRow))
587 ? '#FFCC99'
588 : '';
589 unset($cfgBrowseMarkRow);
590 } else {
591 $cfg['BrowseMarkerColor'] = '#FFCC99';
595 if (!isset($cfg['TextareaCols'])) {
596 if (isset($cfgTextareaCols)) {
597 $cfg['TextareaCols'] = $cfgTextareaCols;
598 unset($cfgTextareaCols);
599 } else {
600 $cfg['TextareaCols'] = 40;
604 if (!isset($cfg['TextareaRows'])) {
605 if (isset($cfgTextareaRows)) {
606 $cfg['TextareaRows'] = $cfgTextareaRows;
607 unset($cfgTextareaRows);
608 } else {
609 $cfg['TextareaRows'] = 7;
613 if (!isset($cfg['TextareaAutoSelect'])) {
614 $cfg['TextareaAutoSelect'] = TRUE;
617 if (!isset($cfg['CharTextareaCols'])) {
618 $cfg['CharTextareaCols'] = 40;
621 if (!isset($cfg['CharTextareaRows'])) {
622 $cfg['CharTextareaRows'] = 2;
625 if (!isset($cfg['LimitChars'])) {
626 if (isset($cfgLimitChars)) {
627 $cfg['LimitChars'] = $cfgLimitChars;
628 unset($cfgLimitChars);
629 } else {
630 $cfg['LimitChars'] = 50;
634 if (!isset($cfg['ModifyDeleteAtLeft'])) {
635 if (isset($cfgModifyDeleteAtLeft)) {
636 $cfg['ModifyDeleteAtLeft'] = $cfgModifyDeleteAtLeft;
637 unset($cfgModifyDeleteAtLeft);
638 } else {
639 $cfg['ModifyDeleteAtLeft'] = TRUE;
643 if (!isset($cfg['ModifyDeleteAtRight'])) {
644 if (isset($cfgModifyDeleteAtRight)) {
645 $cfg['ModifyDeleteAtRight'] = $cfgModifyDeleteAtRight;
646 unset($cfgModifyDeleteAtRight);
647 } else {
648 $cfg['ModifyDeleteAtRight'] = FALSE;
652 if (!isset($cfg['DefaultDisplay'])) {
653 if (isset($cfgDefaultDisplay)) {
654 $cfg['DefaultDisplay'] = $cfgDefaultDisplay;
655 unset($cfgDefaultDisplay);
656 } else {
657 $cfg['DefaultDisplay'] = 'horizontal';
660 if (!isset($cfg['DefaultPropDisplay'])) {
661 $cfg['DefaultPropDisplay'] = 'horizontal';
664 if (!isset($cfg['RepeatCells'])) {
665 if (isset($cfgRepeatCells)) {
666 $cfg['RepeatCells'] = $cfgRepeatCells;
667 unset($cfgRepeatCells);
668 } else {
669 $cfg['RepeatCells'] = 100;
673 if (!isset($cfg['HeaderFlipType'])) {
674 $cfg['HeaderFlipType'] = 'css';
677 if (!isset($cfg['ShowBrowseComments'])) {
678 $cfg['ShowBrowseComments'] = TRUE;
681 if (!isset($cfg['ShowPropertyComments'])) {
682 $cfg['ShowPropertyComments'] = TRUE;
685 if (!isset($cfg['QueryFrame'])) {
686 $cfg['QueryFrame'] = TRUE;
689 if (!isset($cfg['QueryFrameJS'])) {
690 $cfg['QueryFrameJS'] = TRUE;
693 if (!isset($cfg['QueryFrameDebug'])) {
694 $cfg['QueryFrameDebug'] = FALSE;
697 if (!isset($cfg['QueryWindowWidth'])) {
698 $cfg['QueryWindowWidth'] = 550;
701 if (!isset($cfg['QueryWindowHeight'])) {
702 $cfg['QueryWindowHeight'] = 310;
705 if (!isset($cfg['QueryHistoryMax'])) {
706 $cfg['QueryHistoryMax'] = 25;
709 if (!isset($cfg['QueryHistoryDB'])) {
710 $cfg['QueryHistoryDB'] = FALSE;
713 if (!isset($cfg['QueryWindowDefTab'])) {
714 $cfg['QueryWindowDefTab'] = 'sql';
717 if (!isset($cfg['BrowseMIME'])) {
718 $cfg['BrowseMIME'] = TRUE;
721 if (!isset($cfg['ShowTooltipAliasDB'])) {
722 $cfg['ShowTooltipAliasDB'] = FALSE;
725 if (!isset($cfg['ShowTooltipAliasTB'])) {
726 $cfg['ShowTooltipAliasTB'] = FALSE;
729 if (!isset($cfg['SQLQuery']['Edit'])) {
730 $cfg['SQLQuery']['Edit'] = TRUE;
733 if (!isset($cfg['SQLQuery']['Explain'])) {
734 $cfg['SQLQuery']['Explain'] = TRUE;
737 if (!isset($cfg['SQLQuery']['ShowAsPHP'])) {
738 $cfg['SQLQuery']['ShowAsPHP'] = TRUE;
741 if (!isset($cfg['SQLQuery']['Validate'])) {
742 $cfg['SQLQuery']['Validate'] = FALSE;
745 if (!isset($cfg['UploadDir'])) {
746 $cfg['UploadDir'] = '';
749 if (!isset($cfg['SQLValidator']['use'])) {
750 $cfg['SQLValidator']['use'] = FALSE;
753 if (!isset($cfg['SQLValidator']['username'])) {
754 $cfg['SQLValidator']['username'] = '';
757 if (!isset($cfg['SQLValidator']['password'])) {
758 $cfg['SQLValidator']['password'] = '';
761 if (!isset($cfg['DBG']['enable'])) {
762 $cfg['DBG']['enable'] = FALSE;
765 if (!isset($cfg['DBG']['profile']['enable'])) {
766 $cfg['DBG']['profile']['enable'] = FALSE;
769 if (!isset($cfg['DBG']['profile']['threshold'])) {
770 $cfg['DBG']['profile']['threshold'] = 0.5;
773 if (!isset($cfg['SQP']['fmtType'])) {
774 $cfg['SQP']['fmtType'] = 'html';
777 if (!isset($cfg['SQP']['fmtInd'])) {
778 $cfg['SQP']['fmtInd'] = '1';
781 if (!isset($cfg['SQP']['fmtIndUnit'])) {
782 $cfg['SQP']['fmtIndUnit'] = 'em';
785 if (!isset($cfg['SQP']['fmtColor']['comment'])) {
786 $cfg['SQP']['fmtColor']['comment'] = '#808000';
789 if (!isset($cfg['SQP']['fmtColor']['digit'])) {
790 $cfg['SQP']['fmtColor']['digit'] = '';
793 if (!isset($cfg['SQP']['fmtColor']['digit_hex'])) {
794 $cfg['SQP']['fmtColor']['digit_hex'] = 'teal';
797 if (!isset($cfg['SQP']['fmtColor']['digit_integer'])) {
798 $cfg['SQP']['fmtColor']['digit_integer'] = 'teal';
801 if (!isset($cfg['SQP']['fmtColor']['digit_float'])) {
802 $cfg['SQP']['fmtColor']['digit_float'] = 'aqua';
805 if (!isset($cfg['SQP']['fmtColor']['punct'])) {
806 $cfg['SQP']['fmtColor']['punct'] = 'fuchsia';
809 if (!isset($cfg['SQP']['fmtColor']['alpha'])) {
810 $cfg['SQP']['fmtColor']['alpha'] = '';
813 if (!isset($cfg['SQP']['fmtColor']['alpha_columnType'])) {
814 $cfg['SQP']['fmtColor']['alpha_columnType'] = '#FF9900';
817 if (!isset($cfg['SQP']['fmtColor']['alpha_columnAttrib'])) {
818 $cfg['SQP']['fmtColor']['alpha_columnAttrib'] = '#0000FF';
821 if (!isset($cfg['SQP']['fmtColor']['alpha_reservedWord'])) {
822 $cfg['SQP']['fmtColor']['alpha_reservedWord'] = '#990099';
825 if (!isset($cfg['SQP']['fmtColor']['alpha_functionName'])) {
826 $cfg['SQP']['fmtColor']['alpha_functionName'] = '#FF0000';
829 if (!isset($cfg['SQP']['fmtColor']['alpha_identifier'])) {
830 $cfg['SQP']['fmtColor']['alpha_identifier'] = 'black';
833 if (!isset($cfg['SQP']['fmtColor']['alpha_variable'])) {
834 $cfg['SQP']['fmtColor']['alpha_variable'] = '#800000';
837 if (!isset($cfg['SQP']['fmtColor']['quote'])) {
838 $cfg['SQP']['fmtColor']['quote'] = '#008000';
841 if (!isset($cfg['SQP']['fmtColor']['quote_double'])) {
842 $cfg['SQP']['fmtColor']['quote_double'] = '';
845 if (!isset($cfg['SQP']['fmtColor']['quote_single'])) {
846 $cfg['SQP']['fmtColor']['quote_single'] = '';
849 if (!isset($cfg['SQP']['fmtColor']['quote_backtick'])) {
850 $cfg['SQP']['fmtColor']['quote_backtick'] = '';
853 if (!isset($cfg['AvailableCharsets'])) {
854 $cfg['AvailableCharsets'] = array(
855 'iso-8859-1',
856 'iso-8859-2',
857 'iso-8859-3',
858 'iso-8859-4',
859 'iso-8859-5',
860 'iso-8859-6',
861 'iso-8859-7',
862 'iso-8859-8',
863 'iso-8859-9',
864 'iso-8859-10',
865 'iso-8859-11',
866 'iso-8859-12',
867 'iso-8859-13',
868 'iso-8859-14',
869 'iso-8859-15',
870 'windows-1250',
871 'windows-1251',
872 'windows-1252',
873 'windows-1257',
874 'koi8-r',
875 'big5',
876 'gb2312',
877 'utf-8',
878 'utf-7',
879 'x-user-defined',
880 'euc-jp',
881 'ks_c_5601-1987',
882 'tis-620',
883 'SHIFT_JIS'
887 if (!isset($cfg['ColumnTypes'])) {
888 if (isset($cfgColumnTypes)) {
889 $cfg['ColumnTypes'] = $cfgColumnTypes;
890 unset($cfgColumnTypes);
891 } else {
892 $cfg['ColumnTypes'] = array(
893 'VARCHAR',
894 'TINYINT',
895 'TEXT',
896 'DATE',
897 'SMALLINT',
898 'MEDIUMINT',
899 'INT',
900 'BIGINT',
901 'FLOAT',
902 'DOUBLE',
903 'DECIMAL',
904 'DATETIME',
905 'TIMESTAMP',
906 'TIME',
907 'YEAR',
908 'CHAR',
909 'TINYBLOB',
910 'TINYTEXT',
911 'BLOB',
912 'MEDIUMBLOB',
913 'MEDIUMTEXT',
914 'LONGBLOB',
915 'LONGTEXT',
916 'ENUM',
917 'SET'
922 if (!isset($cfg['AttributeTypes'])) {
923 if (isset($cfgAttributeTypes)) {
924 $cfg['AttributeTypes'] = $cfgAttributeTypes;
925 unset($cfgAttributeTypes);
926 } else {
927 $cfg['AttributeTypes'] = array(
929 'BINARY',
930 'UNSIGNED',
931 'UNSIGNED ZEROFILL'
936 if (!isset($cfg['Functions']) && $cfg['ShowFunctionFields']) {
937 if (isset($cfgFunctions)) {
938 $cfg['Functions'] = $cfgFunctions;
939 } else {
940 $cfg['Functions'] = array(
941 'ASCII',
942 'CHAR',
943 'SOUNDEX',
944 'LCASE',
945 'UCASE',
946 'NOW',
947 'PASSWORD',
948 'MD5',
949 'ENCRYPT',
950 'RAND',
951 'LAST_INSERT_ID',
952 'COUNT',
953 'AVG',
954 'SUM',
955 'CURDATE',
956 'CURTIME',
957 'FROM_DAYS',
958 'FROM_UNIXTIME',
959 'PERIOD_ADD',
960 'PERIOD_DIFF',
961 'TO_DAYS',
962 'UNIX_TIMESTAMP',
963 'USER',
964 'WEEKDAY',
965 'CONCAT'
969 // Which column types will be mapped to which Group?
970 $cfg['RestrictColumnTypes'] = array(
971 'VARCHAR' => 'FUNC_CHAR',
972 'TINYINT' => 'FUNC_NUMBER',
973 'TEXT' => 'FUNC_CHAR',
974 'DATE' => 'FUNC_DATE',
975 'SMALLINT' => 'FUNC_NUMBER',
976 'MEDIUMINT' => 'FUNC_NUMBER',
977 'INT' => 'FUNC_NUMBER',
978 'BIGINT' => 'FUNC_NUMBER',
979 'FLOAT' => 'FUNC_NUMBER',
980 'DOUBLE' => 'FUNC_NUMBER',
981 'DECIMAL' => 'FUNC_NUMBER',
982 'DATETIME' => 'FUNC_DATE',
983 'TIMESTAMP' => 'FUNC_DATE',
984 'TIME' => 'FUNC_DATE',
985 'YEAR' => 'FUNC_DATE',
986 'CHAR' => 'FUNC_CHAR',
987 'TINYBLOB' => 'FUNC_CHAR',
988 'TINYTEXT' => 'FUNC_CHAR',
989 'BLOB' => 'FUNC_CHAR',
990 'MEDIUMBLOB' => 'FUNC_CHAR',
991 'MEDIUMTEXT' => 'FUNC_CHAR',
992 'LONGBLOB' => 'FUNC_CHAR',
993 'LONGTEXT' => 'FUNC_CHAR',
994 'ENUM' => '',
995 'SET' => ''
998 // Map above defined groups to any function
999 $cfg['RestrictFunctions'] = array(
1000 'FUNC_CHAR' => array(
1001 'ASCII',
1002 'CHAR',
1003 'SOUNDEX',
1004 'LCASE',
1005 'UCASE',
1006 'PASSWORD',
1007 'MD5',
1008 'ENCRYPT',
1009 'LAST_INSERT_ID',
1010 'USER',
1011 'CONCAT'
1014 'FUNC_DATE' => array(
1015 'NOW',
1016 'CURDATE',
1017 'CURTIME',
1018 'FROM_DAYS',
1019 'FROM_UNIXTIME',
1020 'PERIOD_ADD',
1021 'PERIOD_DIFF',
1022 'TO_DAYS',
1023 'UNIX_TIMESTAMP',
1024 'WEEKDAY'
1027 'FUNC_NUMBER' => array(
1028 'ASCII',
1029 'CHAR',
1030 'MD5',
1031 'ENCRYPT',
1032 'RAND',
1033 'LAST_INSERT_ID',
1034 'COUNT',
1035 'AVG',
1036 'SUM'
1041 if (!isset($cfg['PmaAbsoluteUri_DisableWarning'])) {
1042 $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;
1044 if (!isset($cfg['PmaNoRelation_DisableWarning'])) {
1045 $cfg['PmaNoRelation_DisableWarning'] = FALSE;
1047 } // $__PMA_CONFIG_IMPORT_LIB__