3 // vim: expandtab sw=4 ts=4 sts=4:
7 * This file provides support for older config files.
13 * After having added a new directive to the config.inc.php 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';
22 * If the new directive is meant as a replacement for an old one, please use the
25 * if (!isset($myNewDirective)) {
26 * if (isset($myOldDirective)) {
27 * $myNewDirective = $myOldDirective;
28 * unset($myOldDirective);
30 * $myNewDirective = '';
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.php.
37 * After having done all this, search libraries/common.lib.php for the
38 * following paragraph (x and y are integers):
40 * if ($cfg['FileRevision'][0] < x || $cfg['FileRevision'][1] < y) {
41 * require_once('./libraries/config_import.lib.php');
44 * Finally, set x and y to the _new_ revision number of config.inc.php and
45 * you're done! x would be the major version, y the minor version number of the
46 * new revision, e.g. 2.34 becomes: x = 2, y = 34
49 if (!isset($cfg['PmaAbsoluteUri'])) {
50 if (isset($cfgPmaAbsoluteUri)) {
51 $cfg['PmaAbsoluteUri'] = $cfgPmaAbsoluteUri;
52 unset($cfgPmaAbsoluteUri);
54 $cfg['PmaAbsoluteUri'] = '';
58 if (!isset($cfg['PmaAbsoluteUri_DisableWarning'])) {
59 $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;
62 if (!isset($cfg['PmaNoRelation_DisableWarning'])) {
63 $cfg['PmaNoRelation_DisableWarning'] = FALSE;
66 // do not set a default value here!
67 if (!isset($cfg['blowfish_secret'])) {
68 $cfg['blowfish_secret'] = '';
71 if (!isset($cfg['Servers'])) {
72 if (isset($cfgServers)) {
73 $cfg['Servers'] = $cfgServers;
80 if (isset($cfg['Servers'])) {
81 for ($i=1; (!empty($cfg['Servers'][$i]['host']) ||
(isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++
) {
82 if (!isset($cfg['Servers'][$i]['host'])) {
83 $cfg['Servers'][$i]['host'] = '';
85 if (!isset($cfg['Servers'][$i]['port'])) {
86 $cfg['Servers'][$i]['port'] = '';
89 if (!isset($cfg['Servers'][$i]['socket'])) {
90 $cfg['Servers'][$i]['socket'] = '';
93 if (!isset($cfg['Servers'][$i]['connect_type'])) {
94 $cfg['Servers'][$i]['connect_type'] = 'tcp';
97 if (!isset($cfg['Servers'][$i]['extension'])) {
98 $cfg['Servers'][$i]['extension'] = 'mysql';
101 if (!isset($cfg['Servers'][$i]['controluser']) && isset($cfg['Servers'][$i]['stduser'])) {
102 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['stduser'];
103 $cfg['Servers'][$i]['controlpass'] = $cfg['Servers'][$i]['stdpass'];
104 unset($cfg['Servers'][$i]['stduser'], $cfg['Servers'][$i]['stdpass']);
105 } else if (!isset($cfg['Servers'][$i]['controluser'])) {
106 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['controlpass'] = '';
109 if (!isset($cfg['Servers'][$i]['auth_type'])) {
110 $cfg['Servers'][$i]['auth_type'] = (isset($cfg['Servers'][$i]['adv_auth']) && $cfg['Servers'][$i]['adv_auth'])
113 unset($cfg['Servers'][$i]['adv_auth']);
116 // for users who use the "first" blowfish mechanism
117 if (isset($cfg['Servers'][$i]['blowfish_secret'])) {
118 if (empty($cfg['blowfish_secret'])) {
119 $cfg['blowfish_secret'] = $cfg['Servers'][$i]['blowfish_secret'];
121 unset($cfg['Servers'][$i]['blowfish_secret']);
124 if (!isset($cfg['Servers'][$i]['compress'])) {
125 $cfg['Servers'][$i]['compress'] = FALSE;
128 if (!isset($cfg['Servers'][$i]['user'])) {
129 $cfg['Servers'][$i]['user'] = 'root';
132 if (!isset($cfg['Servers'][$i]['password'])) {
133 $cfg['Servers'][$i]['password'] = '';
136 if (!isset($cfg['Servers'][$i]['only_db'])) {
137 $cfg['Servers'][$i]['only_db'] = '';
140 if (!isset($cfg['Servers'][$i]['verbose'])) {
141 $cfg['Servers'][$i]['verbose'] = '';
144 if (!isset($cfg['Servers'][$i]['pmadb'])) {
145 if (isset($cfg['Servers'][$i]['bookmarkdb'])) {
146 $cfg['Servers'][$i]['pmadb'] = $cfg['Servers'][$i]['bookmarkdb'];
147 unset($cfg['Servers'][$i]['bookmarkdb']);
149 $cfg['Servers'][$i]['pmadb'] = '';
153 if (!isset($cfg['Servers'][$i]['bookmarktable'])) {
154 $cfg['Servers'][$i]['bookmarktable'] = '';
157 if (!isset($cfg['Servers'][$i]['relation'])) {
158 $cfg['Servers'][$i]['relation'] = '';
161 if (!isset($cfg['Servers'][$i]['table_info'])) {
162 $cfg['Servers'][$i]['table_info'] = '';
165 if (!isset($cfg['Servers'][$i]['table_coords'])) {
166 $cfg['Servers'][$i]['table_coords'] = '';
169 if (!isset($cfg['Servers'][$i]['column_info'])) {
170 if (isset($cfg['Servers'][$i]['column_comments'])) {
171 $cfg['Servers'][$i]['column_info'] = $cfg['Servers'][$i]['column_comments'];
172 unset($cfg['Servers'][$i]['column_comments']);
174 $cfg['Servers'][$i]['column_info'] = '';
178 if (!isset($cfg['Servers'][$i]['pdf_pages'])) {
179 $cfg['Servers'][$i]['pdf_pages'] = '';
182 if (!isset($cfg['Servers'][$i]['history'])) {
183 $cfg['Servers'][$i]['history'] = '';
186 if (!isset($cfg['Servers'][$i]['verbose_check'])) {
187 $cfg['Servers'][$i]['verbose_check'] = TRUE;
190 if (!isset($cfg['Servers'][$i]['AllowRoot'])) {
191 $cfg['Servers'][$i]['AllowRoot'] = TRUE;
194 if (!isset($cfg['Servers'][$i]['AllowDeny'])) {
195 $cfg['Servers'][$i]['AllowDeny'] = array ('order' => '',
201 if (!isset($cfg['ServerDefault'])) {
202 if (isset($cfgServerDefault)) {
203 $cfg['ServerDefault'] = $cfgServerDefault;
204 unset($cfgServerDefault);
206 $cfg['ServerDefault'] = 1;
210 if (!isset($cfg['OBGzip'])) {
211 if (isset($cfgOBGzip)) {
212 $cfg['OBGzip'] = $cfgOBGzip;
215 $cfg['OBGzip'] = 'auto';
219 if (!isset($cfg['PersistentConnections'])) {
220 if (isset($cfgPersistentConnections)) {
221 $cfg['PersistentConnections'] = $cfgPersistentConnections;
222 unset($cfgPersistentConnections);
224 $cfg['PersistentConnections'] = FALSE;
228 if (!isset($cfg['ExecTimeLimit'])) {
229 if (isset($cfgExecTimeLimit)) {
230 $cfg['ExecTimeLimit'] = $cfgExecTimeLimit;
231 unset($cfgExecTimeLimit);
233 $cfg['ExecTimeLimit'] = 300;
237 if (!isset($cfg['SkipLockedTables'])) {
238 if (isset($cfgSkipLockedTables)) {
239 $cfg['SkipLockedTables'] = $cfgSkipLockedTables;
240 unset($cfgSkipLockedTables);
242 $cfg['SkipLockedTables'] = FALSE;
246 if (!isset($cfg['ShowSQL'])) {
247 if (isset($cfgShowSQL)) {
248 $cfg['ShowSQL'] = $cfgShowSQL;
251 $cfg['ShowSQL'] = TRUE;
255 if (!isset($cfg['AllowUserDropDatabase'])) {
256 if (isset($cfgAllowUserDropDatabase)) {
257 $cfg['AllowUserDropDatabase'] = $cfgAllowUserDropDatabase;
258 unset($cfgAllowUserDropDatabase);
260 $cfg['AllowUserDropDatabase'] = FALSE;
264 if (!isset($cfg['Confirm'])) {
265 if (isset($cfgConfirm)) {
266 $cfg['Confirm'] = $cfgConfirm;
269 $cfg['Confirm'] = TRUE;
273 if (!isset($cfg['LoginCookieRecall'])) {
274 if (isset($cfgLoginCookieRecall)) {
275 $cfg['LoginCookieRecall'] = $cfgLoginCookieRecall;
276 unset($cfgLoginCookieRecall);
278 $cfg['LoginCookieRecall'] = TRUE;
282 if (!isset($cfg['LoginCookieValidity'])) {
283 $cfg['LoginCookieValidity'] = 1800;
286 if (!isset($cfg['UseDbSearch'])) {
287 $cfg['UseDbSearch'] = TRUE;
290 if (!isset($cfg['IgnoreMultiSubmitErrors'])) {
291 $cfg['IgnoreMultiSubmitErrors'] = FALSE;
294 if (!isset($cfg['VerboseMultiSubmit'])) {
295 $cfg['VerboseMultiSubmit'] = TRUE;
298 if (!isset($cfg['AllowArbitraryServer'])) {
299 $cfg['AllowArbitraryServer'] = FALSE;
302 if (!isset($cfg['LeftFrameLight'])) {
303 if (isset($cfgLeftFrameLight)) {
304 $cfg['LeftFrameLight'] = $cfgLeftFrameLight;
305 unset($cfgLeftFrameLight);
307 $cfg['LeftFrameLight'] = TRUE;
311 if (!isset($cfg['LeftFrameTableSeparator'])) {
312 $cfg['LeftFrameTableSeparator'] = '__';
315 if (!isset($cfg['LeftFrameTableLevel'])) {
316 $cfg['LeftFrameTableLevel'] = '1';
319 if (!isset($cfg['LightTabs'])) {
320 $cfg['LightTabs'] = FALSE;
323 if (!isset($cfg['PropertiesIconic'])) {
324 $cfg['PropertiesIconic'] = TRUE;
327 if (!isset($cfg['PropertiesNumColumns'])) {
328 $cfg['PropertiesNumColumns'] = 1;
331 if (!isset($cfg['ShowTooltip'])) {
332 if (isset($cfgShowTooltip)) {
333 $cfg['ShowTooltip'] = $cfgShowTooltip;
335 $cfg['ShowTooltip'] = TRUE;
339 if (!isset($cfg['LeftDisplayLogo'])) {
340 $cfg['LeftDisplayLogo'] = TRUE;
343 if (!isset($cfg['LeftDisplayServers'])) {
344 $cfg['LeftDisplayServers'] = FALSE;
347 if (!isset($cfg['DisplayServersList'])) {
348 if (isset($cfg['LeftisplayServersList'])) {
349 $cfg['DisplayServersList'] = $cfg['LeftDisplayServersList'];
351 $cfg['DisplayServersList'] = FALSE;
355 if (!isset($cfg['ShowStats'])) {
356 if (isset($cfgShowStats)) {
357 $cfg['ShowStats'] = $cfgShowStats;
358 unset($cfgShowStats);
360 $cfg['ShowStats'] = TRUE;
364 if (!isset($cfg['ShowMysqlInfo'])) {
365 if (isset($cfgShowMysqlInfo)) {
366 $cfg['ShowMysqlInfo'] = $cfgShowMysqlInfo;
367 unset($cfgShowMysqlInfo);
369 $cfg['ShowMysqlInfo'] = FALSE;
373 if (!isset($cfg['ShowMysqlVars'])) {
374 if (isset($cfgShowMysqlVars)) {
375 $cfg['ShowMysqlVars'] = $cfgShowMysqlVars;
376 unset($cfgShowMysqlVars);
378 $cfg['ShowMysqlVars'] = FALSE;
382 if (!isset($cfg['ShowPhpInfo'])) {
383 if (isset($cfgShowPhpInfo)) {
384 $cfg['ShowPhpInfo'] = $cfgShowPhpInfo;
385 unset($cfgShowPhpInfo);
387 $cfg['ShowPhpInfo'] = FALSE;
391 if (!isset($cfg['ShowChgPassword'])) {
392 if (isset($cfgShowChgPassword)) {
393 $cfg['ShowChgPassword'] = $cfgShowChgPassword;
394 unset($cfgShowChgPassword);
396 $cfg['ShowChgPassword'] = FALSE;
400 if (!isset($cfg['SuggestDBName'])) {
401 $cfg['SuggestDBName'] = TRUE;
404 if (!isset($cfg['ShowBlob'])) {
405 if (isset($cfgShowBlob)) {
406 $cfg['ShowBlob'] = $cfgShowBlob;
409 $cfg['ShowBlob'] = FALSE;
413 if (!isset($cfg['NavigationBarIconic'])) {
414 if (isset($cfgNavigationBarIconic)) {
415 $cfg['NavigationBarIconic'] = $cfgNavigationBarIconic;
416 unset($cfgNavigationBarIconic);
418 $cfg['NavigationBarIconic'] = TRUE;
422 if (!isset($cfg['ShowAll'])) {
423 if (isset($cfgShowAll)) {
424 $cfg['ShowAll'] = $cfgShowAll;
427 $cfg['ShowAll'] = FALSE;
431 if (!isset($cfg['MaxRows'])) {
432 if (isset($cfgMaxRows)) {
433 $cfg['MaxRows'] = $cfgMaxRows;
436 $cfg['MaxRows'] = 30;
440 if (!isset($cfg['Order'])) {
441 if (isset($cfgOrder)) {
442 $cfg['Order'] = $cfgOrder;
445 $cfg['Order'] = 'ASC';
449 if (!isset($cfg['ProtectBinary'])) {
450 if (isset($cfgProtectBinary)) {
451 $cfg['ProtectBinary'] = $cfgProtectBinary;
452 unset($cfgProtectBinary);
453 } else if (isset($cfg['ProtectBlob'])) {
454 $cfg['ProtectBinary'] = ($cfg['ProtectBlob'] ?
'blob' : FALSE);
455 unset($cfg['ProtectBlob']);
456 } else if (isset($cfgProtectBlob)) {
457 $cfg['ProtectBinary'] = ($cfgProtectBlob ?
'blob' : FALSE);
458 unset($cfgProtectBlob);
460 $cfg['ProtectBinary'] = 'blob';
464 if (!isset($cfg['ShowFunctionFields'])) {
465 if (isset($cfgShowFunctionFields)) {
466 $cfg['ShowFunctionFields'] = $cfgShowFunctionFields;
467 unset($cfgShowFunctionFields);
469 $cfg['ShowFunctionFields'] = TRUE;
473 if (!isset($cfg['CharEditing'])) {
474 $cfg['CharEditing'] = 'input';
477 if (!isset($cfg['InsertRows'])) {
478 $cfg['InsertRows'] = 2;
481 if (!isset($cfg['ZipDump'])) {
482 if (isset($cfgZipDump)) {
483 $cfg['ZipDump'] = $cfgZipDump;
486 $cfg['ZipDump'] = TRUE;
490 if (!isset($cfg['GZipDump'])) {
491 if (isset($cfgGZipDump)) {
492 $cfg['GZipDump'] = $cfgGZipDump;
495 $cfg['GZipDump'] = TRUE;
499 if (!isset($cfg['BZipDump'])) {
500 if (isset($cfgBZipDump)) {
501 $cfg['BZipDump'] = $cfgBZipDump;
504 $cfg['BZipDump'] = TRUE;
507 if (!isset($cfg['CompressOnFly'])) {
508 $cfg['CompressOnFly'] = TRUE;
511 if (!isset($cfg['DefaultTabServer'])) {
512 $cfg['DefaultTabServer'] = 'main.php';
515 if (!isset($cfg['DefaultTabDatabase'])
516 // rabus: config.inc.php rev. 1.112 had this default value.
517 ||
$cfg['DefaultTabDatabase'] == 'Structure') {
518 $cfg['DefaultTabDatabase'] = 'db_details_structure.php';
521 if (!isset($cfg['DefaultTabTable'])
522 // rabus: config.inc.php rev. 1.112 had this default value.
523 ||
$cfg['DefaultTabTable'] == 'Structure') {
524 $cfg['DefaultTabTable'] = 'tbl_properties_structure.php';
527 if (!isset($cfg['MySQLManualBase'])) {
528 if (isset($cfgManualBaseShort)) {
529 $cfg['MySQLManualBase'] = $cfgManualBaseShort;
530 $cfg['MySQLManualType'] = 'old';
531 unset($cfgManualBaseShort);
532 } else if (isset($cfg['ManualBaseShort'])) {
533 $cfg['MySQLManualBase'] = $cfg['ManualBaseShort'];
534 $cfg['MySQLManualType'] = 'old';
535 unset($cfg['ManualBaseShort']);
537 $cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/mysql/en';
538 $cfg['MySQLManualType'] = 'searchable';
542 if (!isset($cfg['MySQLManualType'])) {
543 $cfg['MySQLManualType'] = 'none';
546 if (!isset($cfg['DefaultLang'])) {
547 if (isset($cfgDefaultLang)) {
548 $cfg['DefaultLang'] = $cfgDefaultLang;
549 unset($cfgDefaultLang);
551 $cfg['DefaultLang'] = 'en-iso-8859-1';
555 if (!isset($cfg['DefaultCharset'])) {
556 $cfg['DefaultCharset'] = 'iso-8859-1';
559 if (!isset($cfg['AllowAnywhereRecoding'])) {
560 $cfg['AllowAnywhereRecoding'] = FALSE;
563 if (!isset($cfg['RecodingEngine'])) {
564 $cfg['RecodingEngine'] = 'auto';
567 if (!isset($cfg['IconvExtraParams'])) {
568 $cfg['IconvExtraParams'] = '';
571 if (!isset($cfg['Lang']) &&isset($cfgLang)) {
572 $cfg['Lang'] = $cfgLang;
576 if (!isset($cfg['LeftPointerEnable'])) {
577 $cfg['LeftPointerEnable'] = TRUE;
580 if (!isset($cfg['BrowsePointerEnable'])) {
581 $cfg['BrowsePointerEnable'] = TRUE;
585 if (!isset($cfg['BrowseMarkerEnable'])) {
586 $cfg['BrowseMarkerEnable'] = TRUE;
589 if (!isset($cfg['TextareaCols'])) {
590 if (isset($cfgTextareaCols)) {
591 $cfg['TextareaCols'] = $cfgTextareaCols;
592 unset($cfgTextareaCols);
594 $cfg['TextareaCols'] = 40;
598 if (!isset($cfg['LongtextDoubleTextarea'])) {
599 $cfg['LongtextDoubleTextarea'] = TRUE;
602 if (!isset($cfg['TextareaRows'])) {
603 if (isset($cfgTextareaRows)) {
604 $cfg['TextareaRows'] = $cfgTextareaRows;
605 unset($cfgTextareaRows);
607 $cfg['TextareaRows'] = 7;
611 if (!isset($cfg['TextareaAutoSelect'])) {
612 $cfg['TextareaAutoSelect'] = TRUE;
615 if (!isset($cfg['CharTextareaCols'])) {
616 $cfg['CharTextareaCols'] = 40;
619 if (!isset($cfg['CharTextareaRows'])) {
620 $cfg['CharTextareaRows'] = 2;
623 if (!isset($cfg['LimitChars'])) {
624 if (isset($cfgLimitChars)) {
625 $cfg['LimitChars'] = $cfgLimitChars;
626 unset($cfgLimitChars);
628 $cfg['LimitChars'] = 50;
632 if (!isset($cfg['ModifyDeleteAtLeft'])) {
633 if (isset($cfgModifyDeleteAtLeft)) {
634 $cfg['ModifyDeleteAtLeft'] = $cfgModifyDeleteAtLeft;
635 unset($cfgModifyDeleteAtLeft);
637 $cfg['ModifyDeleteAtLeft'] = TRUE;
641 if (!isset($cfg['ModifyDeleteAtRight'])) {
642 if (isset($cfgModifyDeleteAtRight)) {
643 $cfg['ModifyDeleteAtRight'] = $cfgModifyDeleteAtRight;
644 unset($cfgModifyDeleteAtRight);
646 $cfg['ModifyDeleteAtRight'] = FALSE;
650 if (!isset($cfg['DefaultDisplay'])) {
651 if (isset($cfgDefaultDisplay)) {
652 $cfg['DefaultDisplay'] = $cfgDefaultDisplay;
653 unset($cfgDefaultDisplay);
655 $cfg['DefaultDisplay'] = 'horizontal';
658 if (!isset($cfg['DefaultPropDisplay'])) {
659 $cfg['DefaultPropDisplay'] = 'horizontal';
662 if (!isset($cfg['RepeatCells'])) {
663 if (isset($cfgRepeatCells)) {
664 $cfg['RepeatCells'] = $cfgRepeatCells;
665 unset($cfgRepeatCells);
667 $cfg['RepeatCells'] = 100;
671 if (!isset($cfg['HeaderFlipType'])) {
672 $cfg['HeaderFlipType'] = 'css';
675 if (!isset($cfg['ShowBrowseComments'])) {
676 $cfg['ShowBrowseComments'] = TRUE;
679 if (!isset($cfg['ShowPropertyComments'])) {
680 $cfg['ShowPropertyComments'] = TRUE;
683 if (!isset($cfg['QueryFrame'])) {
684 $cfg['QueryFrame'] = TRUE;
687 if (!isset($cfg['QueryFrameJS'])) {
688 $cfg['QueryFrameJS'] = TRUE;
691 if (!isset($cfg['QueryWindowWidth'])) {
692 $cfg['QueryWindowWidth'] = 550;
695 if (!isset($cfg['QueryWindowHeight'])) {
696 $cfg['QueryWindowHeight'] = 310;
699 if (!isset($cfg['QueryHistoryMax'])) {
700 $cfg['QueryHistoryMax'] = 25;
703 if (!isset($cfg['QueryHistoryDB'])) {
704 $cfg['QueryHistoryDB'] = FALSE;
707 if (!isset($cfg['QueryWindowDefTab'])) {
708 $cfg['QueryWindowDefTab'] = 'sql';
711 if (!isset($cfg['BrowseMIME'])) {
712 $cfg['BrowseMIME'] = TRUE;
715 if (!isset($cfg['MaxExactCount'])) {
716 $cfg['MaxExactCount'] = 20000;
719 if (!isset($cfg['WYSIWYG-PDF'])) {
720 $cfg['WYSIWYG-PDF'] = TRUE;
723 if (!isset($cfg['NaturalOrder'])) {
724 $cfg['NaturalOrder'] = TRUE;
727 if (!isset($cfg['ShowHttpHostTitle'])) {
728 $cfg['ShowHttpHostTitle'] = FALSE;
731 if (!isset($cfg['SetHttpHostTitle'])) {
732 $cfg['SetHttpHostTitle'] = '';
735 if (!isset($cfg['ErrorIconic'])) {
736 $cfg['ErrorIconic'] = TRUE;
739 if (!isset($cfg['MainPageIconic'])) {
740 $cfg['MainPageIconic'] = TRUE;
743 if (!isset($cfg['ReplaceHelpImg'])) {
744 $cfg['ReplaceHelpImg'] = TRUE;
747 if (!isset($cfg['ThemePath'])) {
748 $cfg['ThemePath'] = './themes';
749 $cfg['ThemeDefault'] = 'original';
750 $cfg['ThemeManager'] = TRUE;
752 if (!isset($cfg['ThemeDefault'])){
753 $cfg['ThemeDefault'] = 'original';
755 if (!isset($cfg['ThemeManager'])){
756 $cfg['ThemeManager'] = TRUE;
760 if (!isset($cfg['DefaultQueryTable'])) {
761 $cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1';
764 if (!isset($cfg['DefaultQueryDatabase'])) {
765 $cfg['DefaultQueryDatabase']= '';
768 if (!isset($cfg['ShowTooltipAliasDB'])) {
769 $cfg['ShowTooltipAliasDB'] = FALSE;
772 if (!isset($cfg['ShowTooltipAliasTB'])) {
773 $cfg['ShowTooltipAliasTB'] = FALSE;
776 if (!isset($cfg['SQLQuery']['Edit'])) {
777 $cfg['SQLQuery']['Edit'] = TRUE;
780 if (!isset($cfg['SQLQuery']['Explain'])) {
781 $cfg['SQLQuery']['Explain'] = TRUE;
784 if (!isset($cfg['SQLQuery']['ShowAsPHP'])) {
785 $cfg['SQLQuery']['ShowAsPHP'] = TRUE;
788 if (!isset($cfg['SQLQuery']['Validate'])) {
789 $cfg['SQLQuery']['Validate'] = FALSE;
792 if (!isset($cfg['SQLQuery']['Refresh'])) {
793 $cfg['SQLQuery']['Refresh'] = TRUE;
796 if (!isset($cfg['UploadDir'])) {
797 $cfg['UploadDir'] = '';
800 if (!isset($cfg['SaveDir'])) {
801 $cfg['SaveDir'] = '';
804 if (!isset($cfg['docSQLDir'])) {
805 $cfg['docSQLDir'] = '';
808 if (!isset($cfg['TempDir'])) {
809 $cfg['TempDir'] = '';
813 if (!isset($cfg['SQLValidator']['use'])) {
814 $cfg['SQLValidator']['use'] = FALSE;
817 if (!isset($cfg['SQLValidator']['username'])) {
818 $cfg['SQLValidator']['username'] = '';
821 if (!isset($cfg['SQLValidator']['password'])) {
822 $cfg['SQLValidator']['password'] = '';
825 if (!isset($cfg['DBG']['enable'])) {
826 $cfg['DBG']['enable'] = FALSE;
829 if (!isset($cfg['DBG']['profile']['enable'])) {
830 $cfg['DBG']['profile']['enable'] = FALSE;
833 if (!isset($cfg['DBG']['profile']['threshold'])) {
834 $cfg['DBG']['profile']['threshold'] = 0.5;
837 if (!isset($cfg['SQP']['fmtType'])) {
838 $cfg['SQP']['fmtType'] = 'html';
841 if (!isset($cfg['SQP']['fmtInd'])) {
842 $cfg['SQP']['fmtInd'] = '1';
845 if (!isset($cfg['SQP']['fmtIndUnit'])) {
846 $cfg['SQP']['fmtIndUnit'] = 'em';
849 if (!isset($cfg['AvailableCharsets'])) {
850 $cfg['AvailableCharsets'] = array(
885 if (!isset($cfg['ColumnTypes'])) {
886 if (isset($cfgColumnTypes)) {
887 $cfg['ColumnTypes'] = $cfgColumnTypes;
888 unset($cfgColumnTypes);
890 $cfg['ColumnTypes'] = array(
920 if (!isset($cfg['AttributeTypes'])) {
921 if (isset($cfgAttributeTypes)) {
922 $cfg['AttributeTypes'] = $cfgAttributeTypes;
923 unset($cfgAttributeTypes);
925 $cfg['AttributeTypes'] = array(
934 if ($cfg['ShowFunctionFields']) {
935 if (!isset($cfg['Functions'])) {
936 if (isset($cfgFunctions)) {
937 $cfg['Functions'] = $cfgFunctions;
939 $cfg['Functions'] = array(
970 // Which column types will be mapped to which Group?
971 $cfg['RestrictColumnTypes'] = array(
972 'VARCHAR' => 'FUNC_CHAR',
973 'TINYINT' => 'FUNC_NUMBER',
974 'TEXT' => 'FUNC_CHAR',
975 'DATE' => 'FUNC_DATE',
976 'SMALLINT' => 'FUNC_NUMBER',
977 'MEDIUMINT' => 'FUNC_NUMBER',
978 'INT' => 'FUNC_NUMBER',
979 'BIGINT' => 'FUNC_NUMBER',
980 'FLOAT' => 'FUNC_NUMBER',
981 'DOUBLE' => 'FUNC_NUMBER',
982 'DECIMAL' => 'FUNC_NUMBER',
983 'DATETIME' => 'FUNC_DATE',
984 'TIMESTAMP' => 'FUNC_DATE',
985 'TIME' => 'FUNC_DATE',
986 'YEAR' => 'FUNC_DATE',
987 'CHAR' => 'FUNC_CHAR',
988 'TINYBLOB' => 'FUNC_CHAR',
989 'TINYTEXT' => 'FUNC_CHAR',
990 'BLOB' => 'FUNC_CHAR',
991 'MEDIUMBLOB' => 'FUNC_CHAR',
992 'MEDIUMTEXT' => 'FUNC_CHAR',
993 'LONGBLOB' => 'FUNC_CHAR',
994 'LONGTEXT' => 'FUNC_CHAR',
999 // Map above defined groups to any function
1000 $cfg['RestrictFunctions'] = array(
1001 'FUNC_CHAR' => array(
1017 'FUNC_DATE' => array(
1030 'FUNC_NUMBER' => array(
1046 if (!isset($cfg['DefaultFunctions'])) {
1047 $cfg['DefaultFunctions'] = array(
1050 'FUNC_NUMBER' => '',
1051 'first_timestamp' => 'NOW'
1056 if (!isset($cfg['NumOperators'])) {
1057 $cfg['NumOperators'] = array(
1069 if (!isset($cfg['TextOperators'])) {
1070 $cfg['TextOperators'] = array(
1081 if (!isset($cfg['EnumOperators'])) {
1082 $cfg['EnumOperators'] = array(
1088 if (!isset($cfg['NullOperators'])) {
1089 $cfg['NullOperators'] = array(
1095 if (!isset($cfg['UnaryOperators'])) {
1096 $cfg['UnaryOperators'] = array(
1102 if (!isset($cfg['GD2Available'])) {
1103 $cfg['GD2Available'] = 'auto';
1105 if (!isset($cfg['PDFPageSizes'])) {
1106 $cfg['PDFPageSizes'] = array('A3', 'A4', 'A5', 'letter', 'legal');
1108 if (!isset($cfg['PDFDefaultPageSize'])) {
1109 $cfg['PDFDefaultPageSize'] = 'A4';
1111 if (!isset($cfg['CtrlArrowsMoving'])) {
1112 $cfg['CtrlArrowsMoving'] = TRUE;
1115 if (!isset($cfg['Export'])) {
1116 $cfg['Export'] = array();
1119 if (!isset($cfg['Export']['format'])) {
1120 $cfg['Export']['format'] = 'sql';
1121 } // sql/latex/excel/csv/xml/xls/htmlexcel/htmlword
1122 if (!isset($cfg['Export']['compression'])) {
1123 $cfg['Export']['compression'] = 'none';
1124 } // none/zip/gzip/bzip2
1126 if (!isset($cfg['Export']['asfile'])) {
1127 $cfg['Export']['asfile'] = FALSE;
1129 if (!isset($cfg['Export']['onserver'])) {
1130 $cfg['Export']['onserver'] = FALSE;
1132 if (!isset($cfg['Export']['onserver_overwrite'])) {
1133 $cfg['Export']['onserver_overwrite'] = FALSE;
1135 if (!isset($cfg['Export']['remember_file_template'])) {
1136 $cfg['Export']['remember_file_template'] = TRUE;
1138 if (!isset($cfg['Export']['file_template_table'])) {
1139 $cfg['Export']['file_template_table'] = '__TABLE__';
1141 if (!isset($cfg['Export']['file_template_database'])) {
1142 $cfg['Export']['file_template_database'] = '__DB__';
1144 if (!isset($cfg['Export']['file_template_server'])) {
1145 $cfg['Export']['file_template_server'] = '__SERVER__';
1147 if (!isset($cfg['Export']['csv_null'])) {
1148 $cfg['Export']['csv_null'] = 'NULL';
1150 if (!isset($cfg['Export']['csv_columns'])) {
1151 $cfg['Export']['csv_columns'] = FALSE;
1153 if (!isset($cfg['Export']['htmlexcel_null'])) {
1154 $cfg['Export']['htmlexcel_null'] = 'NULL';
1156 if (!isset($cfg['Export']['htmlexcel_columns'])) {
1157 $cfg['Export']['htmlexcel_columns'] = FALSE;
1159 if (!isset($cfg['Export']['htmlword_structure'])) {
1160 $cfg['Export']['htmlword_structure'] = TRUE;
1162 if (!isset($cfg['Export']['htmlword_data'])) {
1163 $cfg['Export']['htmlword_data'] = TRUE;
1165 if (!isset($cfg['Export']['htmlword_null'])) {
1166 $cfg['Export']['htmlword_null'] = 'NULL';
1168 if (!isset($cfg['Export']['htmlword_columns'])) {
1169 $cfg['Export']['htmlword_columns'] = FALSE;
1171 if (!isset($cfg['Export']['xls_null'])) {
1172 $cfg['Export']['xls_null'] = 'NULL';
1174 if (!isset($cfg['Export']['xls_columns'])) {
1175 $cfg['Export']['xls_columns'] = FALSE;
1177 if (!isset($cfg['Export']['excel_null'])) {
1178 $cfg['Export']['excel_null'] = 'NULL';
1180 if (!isset($cfg['Export']['excel_columns'])) {
1181 $cfg['Export']['excel_columns'] = FALSE;
1183 if (!isset($cfg['Export']['excel_edition'])) {
1184 $cfg['Export']['excel_edition'] = 'win';
1186 if (!isset($cfg['Export']['latex_null'])) {
1187 $cfg['Export']['latex_null'] = '\textit{NULL}';
1189 if (!isset($cfg['Export']['csv_separator'])) {
1190 $cfg['Export']['csv_separator'] = ';';
1192 if (!isset($cfg['Export']['csv_enclosed'])) {
1193 $cfg['Export']['csv_enclosed'] = '"';
1195 if (!isset($cfg['Export']['csv_escaped'])) {
1196 $cfg['Export']['csv_escaped'] = '\\';
1198 if (!isset($cfg['Export']['csv_terminated'])) {
1199 $cfg['Export']['csv_terminated'] = 'AUTO';
1202 if (!isset($cfg['Export']['latex_structure'])) {
1203 $cfg['Export']['latex_structure'] = TRUE;
1205 if (!isset($cfg['Export']['latex_data'])) {
1206 $cfg['Export']['latex_data'] = TRUE;
1208 if (!isset($cfg['Export']['latex_columns'])) {
1209 $cfg['Export']['latex_columns'] = TRUE;
1211 if (!isset($cfg['Export']['latex_relation'])) {
1212 $cfg['Export']['latex_relation'] = TRUE;
1214 if (!isset($cfg['Export']['latex_comments'])) {
1215 $cfg['Export']['latex_comments'] = TRUE;
1217 if (!isset($cfg['Export']['latex_mime'])) {
1218 $cfg['Export']['latex_mime'] = TRUE;
1220 if (!isset($cfg['Export']['latex_caption'])) {
1221 $cfg['Export']['latex_caption'] = TRUE;
1223 if (!isset($cfg['Export']['latex_data_label'])) {
1224 $cfg['Export']['latex_data_label'] = 'tab:__TABLE__-data';
1226 if (!isset($cfg['Export']['latex_structure_label'])) {
1227 $cfg['Export']['latex_structure_label'] = 'tab:__TABLE__-structure';
1230 if (!isset($cfg['Export']['sql_drop_database'])) {
1231 $cfg['Export']['sql_drop_database'] = FALSE;
1233 if (!isset($cfg['Export']['sql_disable_fk'])) {
1234 $cfg['Export']['sql_disable_fk'] = FALSE;
1236 if (!isset($cfg['Export']['sql_use_transaction'])) {
1237 $cfg['Export']['sql_use_transaction'] = FALSE;
1239 if (!isset($cfg['Export']['sql_drop_table'])) {
1240 $cfg['Export']['sql_drop_table'] = FALSE;
1242 if (!isset($cfg['Export']['sql_if_not_exists'])) {
1243 $cfg['Export']['sql_if_not_exists'] = FALSE;
1245 if (!isset($cfg['Export']['sql_auto_increment'])) {
1246 $cfg['Export']['sql_auto_increment'] = TRUE;
1248 if (!isset($cfg['Export']['sql_structure'])) {
1249 $cfg['Export']['sql_structure'] = TRUE;
1251 if (!isset($cfg['Export']['sql_data'])) {
1252 $cfg['Export']['sql_data'] = TRUE;
1254 if (!isset($cfg['Export']['sql_compat'])) {
1255 $cfg['Export']['sql_compat'] = 'NONE';
1257 if (!isset($cfg['Export']['sql_backquotes'])) {
1258 $cfg['Export']['sql_backquotes'] = TRUE;
1260 if (!isset($cfg['Export']['sql_dates'])) {
1261 $cfg['Export']['sql_dates'] = FALSE;
1263 if (!isset($cfg['Export']['sql_relation'])) {
1264 $cfg['Export']['sql_relation'] = FALSE;
1266 if (!isset($cfg['Export']['sql_columns'])) {
1267 $cfg['Export']['sql_columns'] = FALSE;
1269 if (!isset($cfg['Export']['sql_delayed'])) {
1270 $cfg['Export']['sql_delayed'] = FALSE;
1272 if (!isset($cfg['Export']['sql_ignore'])) {
1273 $cfg['Export']['sql_ignore'] = FALSE;
1275 if (!isset($cfg['Export']['sql_hex_for_binary'])) {
1276 $cfg['Export']['sql_hex_for_binary'] = TRUE;
1278 if (!isset($cfg['Export']['sql_type'])) {
1279 $cfg['Export']['sql_type'] = 'insert';
1281 if (!isset($cfg['Export']['sql_extended'])) {
1282 $cfg['Export']['sql_extended'] = FALSE;
1284 if (!isset($cfg['Export']['sql_comments'])) {
1285 $cfg['Export']['sql_comments'] = FALSE;
1287 if (!isset($cfg['Export']['sql_mime'])) {
1288 $cfg['Export']['sql_mime'] = FALSE;
1290 if (!isset($cfg['Export']['sql_header_comment'])) {
1291 $cfg['Export']['sql_header_comment'] = '';