Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: config_import.lib.php,v 2.5 2004/01/04 11:36:17 rabus Exp $ */ 00003 // vim: expandtab sw=4 ts=4 sts=4: 00004 00005 00049 if (!isset($cfg['PmaAbsoluteUri'])) { 00050 if (isset($cfgPmaAbsoluteUri)) { 00051 $cfg['PmaAbsoluteUri'] = $cfgPmaAbsoluteUri; 00052 unset($cfgPmaAbsoluteUri); 00053 } else { 00054 $cfg['PmaAbsoluteUri'] = ''; 00055 } 00056 } 00057 00058 if (!isset($cfg['PmaAbsoluteUri_DisableWarning'])) { 00059 $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE; 00060 } 00061 00062 if (!isset($cfg['PmaNoRelation_DisableWarning'])) { 00063 $cfg['PmaNoRelation_DisableWarning'] = FALSE; 00064 } 00065 00066 // do not set a default value here! 00067 if (!isset($cfg['blowfish_secret'])) { 00068 $cfg['blowfish_secret'] = ''; 00069 } 00070 00071 if (!isset($cfg['Servers'])) { 00072 if (isset($cfgServers)) { 00073 $cfg['Servers'] = $cfgServers; 00074 unset($cfgServers); 00075 } else { 00076 $server = 0; 00077 } 00078 } 00079 00080 if (isset($cfg['Servers'])) { 00081 for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) { 00082 if (!isset($cfg['Servers'][$i]['host'])) { 00083 $cfg['Servers'][$i]['host'] = ''; 00084 } 00085 if (!isset($cfg['Servers'][$i]['port'])) { 00086 $cfg['Servers'][$i]['port'] = ''; 00087 } 00088 00089 if (!isset($cfg['Servers'][$i]['socket'])) { 00090 $cfg['Servers'][$i]['socket'] = ''; 00091 } 00092 00093 if (!isset($cfg['Servers'][$i]['connect_type'])) { 00094 $cfg['Servers'][$i]['connect_type'] = 'tcp'; 00095 } 00096 00097 if (!isset($cfg['Servers'][$i]['controluser']) && isset($cfg['Servers'][$i]['stduser'])) { 00098 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['stduser']; 00099 $cfg['Servers'][$i]['controlpass'] = $cfg['Servers'][$i]['stdpass']; 00100 unset($cfg['Servers'][$i]['stduser'], $cfg['Servers'][$i]['stdpass']); 00101 } else if (!isset($cfg['Servers'][$i]['controluser'])) { 00102 $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['controlpass'] = ''; 00103 } 00104 00105 if (!isset($cfg['Servers'][$i]['auth_type'])) { 00106 $cfg['Servers'][$i]['auth_type'] = (isset($cfg['Servers'][$i]['adv_auth']) && $cfg['Servers'][$i]['adv_auth']) 00107 ? 'http' 00108 : 'config'; 00109 unset($cfg['Servers'][$i]['adv_auth']); 00110 } 00111 00112 // for users who use the "first" blowfish mechanism 00113 if (isset($cfg['Servers'][$i]['blowfish_secret'])) { 00114 if (empty($cfg['blowfish_secret'])) { 00115 $cfg['blowfish_secret'] = $cfg['Servers'][$i]['blowfish_secret']; 00116 } 00117 unset($cfg['Servers'][$i]['blowfish_secret']); 00118 } 00119 00120 if (!isset($cfg['Servers'][$i]['compress'])) { 00121 $cfg['Servers'][$i]['compress'] = FALSE; 00122 } 00123 00124 if (!isset($cfg['Servers'][$i]['user'])) { 00125 $cfg['Servers'][$i]['user'] = 'root'; 00126 } 00127 00128 if (!isset($cfg['Servers'][$i]['password'])) { 00129 $cfg['Servers'][$i]['password'] = ''; 00130 } 00131 00132 if (!isset($cfg['Servers'][$i]['only_db'])) { 00133 $cfg['Servers'][$i]['only_db'] = ''; 00134 } 00135 00136 if (!isset($cfg['Servers'][$i]['verbose'])) { 00137 $cfg['Servers'][$i]['verbose'] = ''; 00138 } 00139 00140 if (!isset($cfg['Servers'][$i]['pmadb'])) { 00141 if (isset($cfg['Servers'][$i]['bookmarkdb'])) { 00142 $cfg['Servers'][$i]['pmadb'] = $cfg['Servers'][$i]['bookmarkdb']; 00143 unset($cfg['Servers'][$i]['bookmarkdb']); 00144 } else { 00145 $cfg['Servers'][$i]['pmadb'] = ''; 00146 } 00147 } 00148 00149 if (!isset($cfg['Servers'][$i]['bookmarktable'])) { 00150 $cfg['Servers'][$i]['bookmarktable'] = ''; 00151 } 00152 00153 if (!isset($cfg['Servers'][$i]['relation'])) { 00154 $cfg['Servers'][$i]['relation'] = ''; 00155 } 00156 00157 if (!isset($cfg['Servers'][$i]['table_info'])) { 00158 $cfg['Servers'][$i]['table_info'] = ''; 00159 } 00160 00161 if (!isset($cfg['Servers'][$i]['table_coords'])) { 00162 $cfg['Servers'][$i]['table_coords'] = ''; 00163 } 00164 00165 if (!isset($cfg['Servers'][$i]['column_info'])) { 00166 if (isset($cfg['Servers'][$i]['column_comments'])) { 00167 $cfg['Servers'][$i]['column_info'] = $cfg['Servers'][$i]['column_comments']; 00168 unset($cfg['Servers'][$i]['column_comments']); 00169 } else { 00170 $cfg['Servers'][$i]['column_info'] = ''; 00171 } 00172 } 00173 00174 if (!isset($cfg['Servers'][$i]['pdf_pages'])) { 00175 $cfg['Servers'][$i]['pdf_pages'] = ''; 00176 } 00177 00178 if (!isset($cfg['Servers'][$i]['history'])) { 00179 $cfg['Servers'][$i]['history'] = ''; 00180 } 00181 00182 if (!isset($cfg['Servers'][$i]['verbose_check'])) { 00183 $cfg['Servers'][$i]['verbose_check'] = TRUE; 00184 } 00185 00186 if (!isset($cfg['Servers'][$i]['AllowDeny'])) { 00187 $cfg['Servers'][$i]['AllowDeny'] = array ('order' => '', 00188 'rules' => array()); 00189 } 00190 } 00191 } 00192 00193 if (!isset($cfg['ServerDefault'])) { 00194 if (isset($cfgServerDefault)) { 00195 $cfg['ServerDefault'] = $cfgServerDefault; 00196 unset($cfgServerDefault); 00197 } else { 00198 $cfg['ServerDefault'] = 1; 00199 } 00200 } 00201 00202 if (!isset($cfg['OBGzip'])) { 00203 if (isset($cfgOBGzip)) { 00204 $cfg['OBGzip'] = $cfgOBGzip; 00205 unset($cfgOBGzip); 00206 } else { 00207 $cfg['OBGzip'] = 'auto'; 00208 } 00209 } 00210 00211 if (!isset($cfg['PersistentConnections'])) { 00212 if (isset($cfgPersistentConnections)) { 00213 $cfg['PersistentConnections'] = $cfgPersistentConnections; 00214 unset($cfgPersistentConnections); 00215 } else { 00216 $cfg['PersistentConnections'] = FALSE; 00217 } 00218 } 00219 00220 if (!isset($cfg['ExecTimeLimit'])) { 00221 if (isset($cfgExecTimeLimit)) { 00222 $cfg['ExecTimeLimit'] = $cfgExecTimeLimit; 00223 unset($cfgExecTimeLimit); 00224 } else { 00225 $cfg['ExecTimeLimit'] = 300; 00226 } 00227 } 00228 00229 if (!isset($cfg['SkipLockedTables'])) { 00230 if (isset($cfgSkipLockedTables)) { 00231 $cfg['SkipLockedTables'] = $cfgSkipLockedTables; 00232 unset($cfgSkipLockedTables); 00233 } else { 00234 $cfg['SkipLockedTables'] = FALSE; 00235 } 00236 } 00237 00238 if (!isset($cfg['ShowSQL'])) { 00239 if (isset($cfgShowSQL)) { 00240 $cfg['ShowSQL'] = $cfgShowSQL; 00241 unset($cfgShowSQL); 00242 } else { 00243 $cfg['ShowSQL'] = TRUE; 00244 } 00245 } 00246 00247 if (!isset($cfg['AllowUserDropDatabase'])) { 00248 if (isset($cfgAllowUserDropDatabase)) { 00249 $cfg['AllowUserDropDatabase'] = $cfgAllowUserDropDatabase; 00250 unset($cfgAllowUserDropDatabase); 00251 } else { 00252 $cfg['AllowUserDropDatabase'] = FALSE; 00253 } 00254 } 00255 00256 if (!isset($cfg['Confirm'])) { 00257 if (isset($cfgConfirm)) { 00258 $cfg['Confirm'] = $cfgConfirm; 00259 unset($cfgConfirm); 00260 } else { 00261 $cfg['Confirm'] = TRUE; 00262 } 00263 } 00264 00265 if (!isset($cfg['LoginCookieRecall'])) { 00266 if (isset($cfgLoginCookieRecall)) { 00267 $cfg['LoginCookieRecall'] = $cfgLoginCookieRecall; 00268 unset($cfgLoginCookieRecall); 00269 } else { 00270 $cfg['LoginCookieRecall'] = TRUE; 00271 } 00272 } 00273 00274 if (!isset($cfg['UseDbSearch'])) { 00275 $cfg['UseDbSearch'] = TRUE; 00276 } 00277 00278 if (!isset($cfg['IgnoreMultiSubmitErrors'])) { 00279 $cfg['IgnoreMultiSubmitErrors'] = FALSE; 00280 } 00281 00282 if (!isset($cfg['VerboseMultiSubmit'])) { 00283 $cfg['VerboseMultiSubmit'] = TRUE; 00284 } 00285 00286 if (!isset($cfg['AllowArbitraryServer'])) { 00287 $cfg['AllowArbitraryServer'] = FALSE; 00288 } 00289 00290 if (!isset($cfg['LeftFrameLight'])) { 00291 if (isset($cfgLeftFrameLight)) { 00292 $cfg['LeftFrameLight'] = $cfgLeftFrameLight; 00293 unset($cfgLeftFrameLight); 00294 } else { 00295 $cfg['LeftFrameLight'] = TRUE; 00296 } 00297 } 00298 00299 if (!isset($cfg['LeftFrameTableSeparator'])) { 00300 $cfg['LeftFrameTableSeparator'] = '__'; 00301 } 00302 00303 if (!isset($cfg['LeftFrameTableLevel'])) { 00304 $cfg['LeftFrameTableLevel'] = '1'; 00305 } 00306 00307 if (!isset($cfg['LightTabs'])) { 00308 $cfg['LightTabs'] = FALSE; 00309 } 00310 00311 if (!isset($cfg['PropertiesIconic'])) { 00312 $cfg['PropertiesIconic'] = TRUE; 00313 } 00314 00315 if (!isset($cfg['PropertiesNumColumns'])) { 00316 $cfg['PropertiesNumColumns'] = 1; 00317 } 00318 00319 if (!isset($cfg['ShowTooltip'])) { 00320 if (isset($cfgShowTooltip)) { 00321 $cfg['ShowTooltip'] = $cfgShowTooltip; 00322 } else { 00323 $cfg['ShowTooltip'] = TRUE; 00324 } 00325 } 00326 00327 if (!isset($cfg['LeftDisplayLogo'])) { 00328 $cfg['LeftDisplayLogo'] = TRUE; 00329 } 00330 00331 if (!isset($cfg['LeftDisplayServers'])) { 00332 $cfg['LeftDisplayServers'] = FALSE; 00333 } 00334 00335 if (!isset($cfg['ShowStats'])) { 00336 if (isset($cfgShowStats)) { 00337 $cfg['ShowStats'] = $cfgShowStats; 00338 unset($cfgShowStats); 00339 } else { 00340 $cfg['ShowStats'] = TRUE; 00341 } 00342 } 00343 00344 if (!isset($cfg['ShowMysqlInfo'])) { 00345 if (isset($cfgShowMysqlInfo)) { 00346 $cfg['ShowMysqlInfo'] = $cfgShowMysqlInfo; 00347 unset($cfgShowMysqlInfo); 00348 } else { 00349 $cfg['ShowMysqlInfo'] = FALSE; 00350 } 00351 } 00352 00353 if (!isset($cfg['ShowMysqlVars'])) { 00354 if (isset($cfgShowMysqlVars)) { 00355 $cfg['ShowMysqlVars'] = $cfgShowMysqlVars; 00356 unset($cfgShowMysqlVars); 00357 } else { 00358 $cfg['ShowMysqlVars'] = FALSE; 00359 } 00360 } 00361 00362 if (!isset($cfg['ShowPhpInfo'])) { 00363 if (isset($cfgShowPhpInfo)) { 00364 $cfg['ShowPhpInfo'] = $cfgShowPhpInfo; 00365 unset($cfgShowPhpInfo); 00366 } else { 00367 $cfg['ShowPhpInfo'] = FALSE; 00368 } 00369 } 00370 00371 if (!isset($cfg['ShowChgPassword'])) { 00372 if (isset($cfgShowChgPassword)) { 00373 $cfg['ShowChgPassword'] = $cfgShowChgPassword; 00374 unset($cfgShowChgPassword); 00375 } else { 00376 $cfg['ShowChgPassword'] = FALSE; 00377 } 00378 } 00379 00380 if (!isset($cfg['SuggestDBName'])) { 00381 $cfg['SuggestDBName'] = TRUE; 00382 } 00383 00384 if (!isset($cfg['ShowBlob'])) { 00385 if (isset($cfgShowBlob)) { 00386 $cfg['ShowBlob'] = $cfgShowBlob; 00387 unset($cfgShowBlob); 00388 } else { 00389 $cfg['ShowBlob'] = FALSE; 00390 } 00391 } 00392 00393 if (!isset($cfg['NavigationBarIconic'])) { 00394 if (isset($cfgNavigationBarIconic)) { 00395 $cfg['NavigationBarIconic'] = $cfgNavigationBarIconic; 00396 unset($cfgNavigationBarIconic); 00397 } else { 00398 $cfg['NavigationBarIconic'] = TRUE; 00399 } 00400 } 00401 00402 if (!isset($cfg['ShowAll'])) { 00403 if (isset($cfgShowAll)) { 00404 $cfg['ShowAll'] = $cfgShowAll; 00405 unset($cfgShowAll); 00406 } else { 00407 $cfg['ShowAll'] = FALSE; 00408 } 00409 } 00410 00411 if (!isset($cfg['MaxRows'])) { 00412 if (isset($cfgMaxRows)) { 00413 $cfg['MaxRows'] = $cfgMaxRows; 00414 unset($cfgMaxRows); 00415 } else { 00416 $cfg['MaxRows'] = 30; 00417 } 00418 } 00419 00420 if (!isset($cfg['Order'])) { 00421 if (isset($cfgOrder)) { 00422 $cfg['Order'] = $cfgOrder; 00423 unset($cfgOrder); 00424 } else { 00425 $cfg['Order'] = 'ASC'; 00426 } 00427 } 00428 00429 if (!isset($cfg['ProtectBinary'])) { 00430 if (isset($cfgProtectBinary)) { 00431 $cfg['ProtectBinary'] = $cfgProtectBinary; 00432 unset($cfgProtectBinary); 00433 } else if (isset($cfg['ProtectBlob'])) { 00434 $cfg['ProtectBinary'] = ($cfg['ProtectBlob'] ? 'blob' : FALSE); 00435 unset($cfg['ProtectBlob']); 00436 } else if (isset($cfgProtectBlob)) { 00437 $cfg['ProtectBinary'] = ($cfgProtectBlob ? 'blob' : FALSE); 00438 unset($cfgProtectBlob); 00439 } else { 00440 $cfg['ProtectBinary'] = 'blob'; 00441 } 00442 } 00443 00444 if (!isset($cfg['ShowFunctionFields'])) { 00445 if (isset($cfgShowFunctionFields)) { 00446 $cfg['ShowFunctionFields'] = $cfgShowFunctionFields; 00447 unset($cfgShowFunctionFields); 00448 } else { 00449 $cfg['ShowFunctionFields'] = TRUE; 00450 } 00451 } 00452 00453 if (!isset($cfg['CharEditing'])) { 00454 $cfg['CharEditing'] = 'input'; 00455 } 00456 00457 if (!isset($cfg['ZipDump'])) { 00458 if (isset($cfgZipDump)) { 00459 $cfg['ZipDump'] = $cfgZipDump; 00460 unset($cfgZipDump); 00461 } else { 00462 $cfg['ZipDump'] = TRUE; 00463 } 00464 } 00465 00466 if (!isset($cfg['GZipDump'])) { 00467 if (isset($cfgGZipDump)) { 00468 $cfg['GZipDump'] = $cfgGZipDump; 00469 unset($cfgGZipDump); 00470 } else { 00471 $cfg['GZipDump'] = TRUE; 00472 } 00473 } 00474 00475 if (!isset($cfg['BZipDump'])) { 00476 if (isset($cfgBZipDump)) { 00477 $cfg['BZipDump'] = $cfgBZipDump; 00478 unset($cfgBZipDump); 00479 } else { 00480 $cfg['BZipDump'] = TRUE; 00481 } 00482 } 00483 if (!isset($cfg['CompressOnFly'])) { 00484 $cfg['CompressOnFly'] = TRUE; 00485 } 00486 00487 if (!isset($cfg['DefaultTabServer'])) { 00488 $cfg['DefaultTabServer'] = 'main.php'; 00489 } 00490 00491 if (!isset($cfg['DefaultTabDatabase']) 00492 // rabus: config.inc.php rev. 1.112 had this default value. 00493 || $cfg['DefaultTabDatabase'] == 'Structure') { 00494 $cfg['DefaultTabDatabase'] = 'db_details_structure.php'; 00495 } 00496 00497 if (!isset($cfg['DefaultTabTable']) 00498 // rabus: config.inc.php rev. 1.112 had this default value. 00499 || $cfg['DefaultTabTable'] == 'Structure') { 00500 $cfg['DefaultTabTable'] = 'tbl_properties_structure.php'; 00501 } 00502 00503 if (!isset($cfg['MySQLManualBase'])) { 00504 if (isset($cfgManualBaseShort)) { 00505 $cfg['MySQLManualBase'] = $cfgManualBaseShort; 00506 $cfg['MySQLManualType'] = 'old'; 00507 unset($cfgManualBaseShort); 00508 } else if (isset($cfg['ManualBaseShort'])) { 00509 $cfg['MySQLManualBase'] = $cfg['ManualBaseShort']; 00510 $cfg['MySQLManualType'] = 'old'; 00511 unset($cfg['ManualBaseShort']); 00512 } else { 00513 $cfg['MySQLManualBase'] = 'http://www.mysql.com/doc/en'; 00514 $cfg['MySQLManualType'] = 'searchable'; 00515 } 00516 } 00517 00518 if (!isset($cfg['MySQLManualType'])) { 00519 $cfg['MySQLManualType'] = 'none'; 00520 } 00521 00522 if (!isset($cfg['DefaultLang'])) { 00523 if (isset($cfgDefaultLang)) { 00524 $cfg['DefaultLang'] = $cfgDefaultLang; 00525 unset($cfgDefaultLang); 00526 } else { 00527 $cfg['DefaultLang'] = 'en-iso-8859-1'; 00528 } 00529 } 00530 00531 if (!isset($cfg['DefaultCharset'])) { 00532 $cfg['DefaultCharset'] = 'iso-8859-1'; 00533 } 00534 00535 if (!isset($cfg['AllowAnywhereRecoding'])) { 00536 $cfg['AllowAnywhereRecoding'] = FALSE; 00537 } 00538 00539 if (!isset($cfg['RecodingEngine'])) { 00540 $cfg['RecodingEngine'] = 'auto'; 00541 } 00542 00543 if (!isset($cfg['IconvExtraParams'])) { 00544 $cfg['IconvExtraParams'] = ''; 00545 } 00546 00547 if (!isset($cfg['Lang']) &&isset($cfgLang)) { 00548 $cfg['Lang'] = $cfgLang; 00549 unset($cfgLang); 00550 } 00551 00552 if (!isset($cfg['LeftWidth'])) { 00553 if (isset($cfgLeftWidth)) { 00554 $cfg['LeftWidth'] = $cfgLeftWidth; 00555 unset($cfgLeftWidth); 00556 } else { 00557 $cfg['LeftWidth'] = 150; 00558 } 00559 } 00560 00561 if (!isset($cfg['LeftBgColor'])) { 00562 if (isset($cfgLeftBgColor)) { 00563 $cfg['LeftBgColor'] = $cfgLeftBgColor; 00564 unset($cfgLeftBgColor); 00565 } else { 00566 $cfg['LeftBgColor'] = '#D0DCE0'; 00567 } 00568 } 00569 00570 if (!isset($cfg['LeftPointerColor'])) { 00571 if (isset($cfgLeftPointerColor)) { 00572 $cfg['LeftPointerColor'] = $cfgLeftPointerColor; 00573 unset($cfgLeftPointerColor); 00574 } else { 00575 $cfg['LeftPointerColor'] = '#CCFFCC'; 00576 } 00577 } 00578 00579 if (!isset($cfg['RightBgColor'])) { 00580 if (isset($cfgRightBgColor)) { 00581 $cfg['RightBgColor'] = $cfgRightBgColor; 00582 unset($cfgRightBgColor); 00583 } else { 00584 $cfg['RightBgColor'] = '#F5F5F5'; 00585 } 00586 } 00587 00588 if (!isset($cfg['RightBgImage'])) { 00589 $cfg['RightBgImage'] = ''; 00590 } 00591 00592 if (!isset($cfg['Border'])) { 00593 if (isset($cfgBorder)) { 00594 $cfg['Border'] = $cfgBorder; 00595 unset($cfgBorder); 00596 } else { 00597 $cfg['Border'] = 0; 00598 } 00599 } 00600 00601 if (!isset($cfg['ThBgcolor'])) { 00602 if (isset($cfgThBgcolor)) { 00603 $cfg['ThBgcolor'] = $cfgThBgcolor; 00604 unset($cfgThBgcolor); 00605 } else { 00606 $cfg['ThBgcolor'] = '#D3DCE3'; 00607 } 00608 } 00609 00610 if (!isset($cfg['BgcolorOne'])) { 00611 if (isset($cfgBgcolorOne)) { 00612 $cfg['BgcolorOne'] = $cfgBgcolorOne; 00613 unset($cfgBgcolorOne); 00614 } else { 00615 $cfg['BgcolorOne'] = '#CCCCCC'; 00616 } 00617 } 00618 00619 if (!isset($cfg['BgcolorTwo'])) { 00620 if (isset($cfgBgcolorTwo)) { 00621 $cfg['BgcolorTwo'] = $cfgBgcolorTwo; 00622 unset($cfgBgcolorTwo); 00623 } else { 00624 $cfg['BgcolorTwo'] = '#DDDDDD'; 00625 } 00626 } 00627 00628 if (!isset($cfg['BrowsePointerColor'])) { 00629 if (isset($cfgBrowsePointerColor)) { 00630 $cfg['BrowsePointerColor'] = $cfgBrowsePointerColor; 00631 unset($cfgBrowsePointerColor); 00632 } else { 00633 $cfg['BrowsePointerColor'] = '#CCFFCC'; 00634 } 00635 } 00636 00637 if (!isset($cfg['BrowseMarkerColor'])) { 00638 if (isset($cfgBrowseMarkerColor)) { 00639 $cfg['BrowseMarkerColor'] = $cfgBrowseMarkerColor; 00640 unset($cfgBrowseMarkerColor); 00641 } else if (isset($cfg['BrowseMarkRow'])) { 00642 $cfg['BrowseMarkerColor'] = (!empty($cfg['BrowsePointerColor']) && !empty($cfg['BrowseMarkRow'])) 00643 ? '#FFCC99' 00644 : ''; 00645 unset($cfg['BrowseMarkRow']); 00646 } else if (isset($cfgBrowseMarkRow)) { 00647 $cfg['BrowseMarkerColor'] = (!empty($cfg['BrowsePointerColor']) && !empty($cfgBrowseMarkRow)) 00648 ? '#FFCC99' 00649 : ''; 00650 unset($cfgBrowseMarkRow); 00651 } else { 00652 $cfg['BrowseMarkerColor'] = '#FFCC99'; 00653 } 00654 } 00655 00656 if (!isset($cfg['TextareaCols'])) { 00657 if (isset($cfgTextareaCols)) { 00658 $cfg['TextareaCols'] = $cfgTextareaCols; 00659 unset($cfgTextareaCols); 00660 } else { 00661 $cfg['TextareaCols'] = 40; 00662 } 00663 } 00664 00665 if (!isset($cfg['LongtextDoubleTextarea'])) { 00666 $cfg['LongtextDoubleTextarea'] = TRUE; 00667 } 00668 00669 if (!isset($cfg['TextareaRows'])) { 00670 if (isset($cfgTextareaRows)) { 00671 $cfg['TextareaRows'] = $cfgTextareaRows; 00672 unset($cfgTextareaRows); 00673 } else { 00674 $cfg['TextareaRows'] = 7; 00675 } 00676 } 00677 00678 if (!isset($cfg['TextareaAutoSelect'])) { 00679 $cfg['TextareaAutoSelect'] = TRUE; 00680 } 00681 00682 if (!isset($cfg['CharTextareaCols'])) { 00683 $cfg['CharTextareaCols'] = 40; 00684 } 00685 00686 if (!isset($cfg['CharTextareaRows'])) { 00687 $cfg['CharTextareaRows'] = 2; 00688 } 00689 00690 if (!isset($cfg['LimitChars'])) { 00691 if (isset($cfgLimitChars)) { 00692 $cfg['LimitChars'] = $cfgLimitChars; 00693 unset($cfgLimitChars); 00694 } else { 00695 $cfg['LimitChars'] = 50; 00696 } 00697 } 00698 00699 if (!isset($cfg['ModifyDeleteAtLeft'])) { 00700 if (isset($cfgModifyDeleteAtLeft)) { 00701 $cfg['ModifyDeleteAtLeft'] = $cfgModifyDeleteAtLeft; 00702 unset($cfgModifyDeleteAtLeft); 00703 } else { 00704 $cfg['ModifyDeleteAtLeft'] = TRUE; 00705 } 00706 } 00707 00708 if (!isset($cfg['ModifyDeleteAtRight'])) { 00709 if (isset($cfgModifyDeleteAtRight)) { 00710 $cfg['ModifyDeleteAtRight'] = $cfgModifyDeleteAtRight; 00711 unset($cfgModifyDeleteAtRight); 00712 } else { 00713 $cfg['ModifyDeleteAtRight'] = FALSE; 00714 } 00715 } 00716 00717 if (!isset($cfg['DefaultDisplay'])) { 00718 if (isset($cfgDefaultDisplay)) { 00719 $cfg['DefaultDisplay'] = $cfgDefaultDisplay; 00720 unset($cfgDefaultDisplay); 00721 } else { 00722 $cfg['DefaultDisplay'] = 'horizontal'; 00723 } 00724 } 00725 if (!isset($cfg['DefaultPropDisplay'])) { 00726 $cfg['DefaultPropDisplay'] = 'horizontal'; 00727 } 00728 00729 if (!isset($cfg['RepeatCells'])) { 00730 if (isset($cfgRepeatCells)) { 00731 $cfg['RepeatCells'] = $cfgRepeatCells; 00732 unset($cfgRepeatCells); 00733 } else { 00734 $cfg['RepeatCells'] = 100; 00735 } 00736 } 00737 00738 if (!isset($cfg['HeaderFlipType'])) { 00739 $cfg['HeaderFlipType'] = 'css'; 00740 } 00741 00742 if (!isset($cfg['ShowBrowseComments'])) { 00743 $cfg['ShowBrowseComments'] = TRUE; 00744 } 00745 00746 if (!isset($cfg['ShowPropertyComments'])) { 00747 $cfg['ShowPropertyComments'] = TRUE; 00748 } 00749 00750 if (!isset($cfg['QueryFrame'])) { 00751 $cfg['QueryFrame'] = TRUE; 00752 } 00753 00754 if (!isset($cfg['QueryFrameJS'])) { 00755 $cfg['QueryFrameJS'] = TRUE; 00756 } 00757 00758 if (!isset($cfg['QueryFrameDebug'])) { 00759 $cfg['QueryFrameDebug'] = FALSE; 00760 } 00761 00762 if (!isset($cfg['QueryWindowWidth'])) { 00763 $cfg['QueryWindowWidth'] = 550; 00764 } 00765 00766 if (!isset($cfg['QueryWindowHeight'])) { 00767 $cfg['QueryWindowHeight'] = 310; 00768 } 00769 00770 if (!isset($cfg['QueryHistoryMax'])) { 00771 $cfg['QueryHistoryMax'] = 25; 00772 } 00773 00774 if (!isset($cfg['QueryHistoryDB'])) { 00775 $cfg['QueryHistoryDB'] = FALSE; 00776 } 00777 00778 if (!isset($cfg['QueryWindowDefTab'])) { 00779 $cfg['QueryWindowDefTab'] = 'sql'; 00780 } 00781 00782 if (!isset($cfg['BrowseMIME'])) { 00783 $cfg['BrowseMIME'] = TRUE; 00784 } 00785 00786 if (!isset($cfg['MaxExactCount'])) { 00787 $cfg['MaxExactCount'] = 20000; 00788 } 00789 00790 if (!isset($cfg['WYSIWYG-PDF'])) { 00791 $cfg['WYSIWYG-PDF'] = TRUE; 00792 } 00793 00794 if (!isset($cfg['DefaultQueryTable'])) { 00795 $cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1'; 00796 } 00797 00798 if (!isset($cfg['DefaultQueryDatabase'])) { 00799 $cfg['DefaultQueryDatabase']= ''; 00800 } 00801 00802 if (!isset($cfg['ShowTooltipAliasDB'])) { 00803 $cfg['ShowTooltipAliasDB'] = FALSE; 00804 } 00805 00806 if (!isset($cfg['ShowTooltipAliasTB'])) { 00807 $cfg['ShowTooltipAliasTB'] = FALSE; 00808 } 00809 00810 if (!isset($cfg['SQLQuery']['Edit'])) { 00811 $cfg['SQLQuery']['Edit'] = TRUE; 00812 } 00813 00814 if (!isset($cfg['SQLQuery']['Explain'])) { 00815 $cfg['SQLQuery']['Explain'] = TRUE; 00816 } 00817 00818 if (!isset($cfg['SQLQuery']['ShowAsPHP'])) { 00819 $cfg['SQLQuery']['ShowAsPHP'] = TRUE; 00820 } 00821 00822 if (!isset($cfg['SQLQuery']['Validate'])) { 00823 $cfg['SQLQuery']['Validate'] = FALSE; 00824 } 00825 00826 if (!isset($cfg['UploadDir'])) { 00827 $cfg['UploadDir'] = ''; 00828 } 00829 00830 if (!isset($cfg['SaveDir'])) { 00831 $cfg['SaveDir'] = ''; 00832 } 00833 00834 if (!isset($cfg['docSQLDir'])) { 00835 $cfg['docSQLDir'] = ''; 00836 } 00837 00838 if (!isset($cfg['SQLValidator']['use'])) { 00839 $cfg['SQLValidator']['use'] = FALSE; 00840 } 00841 00842 if (!isset($cfg['SQLValidator']['username'])) { 00843 $cfg['SQLValidator']['username'] = ''; 00844 } 00845 00846 if (!isset($cfg['SQLValidator']['password'])) { 00847 $cfg['SQLValidator']['password'] = ''; 00848 } 00849 00850 if (!isset($cfg['DBG']['enable'])) { 00851 $cfg['DBG']['enable'] = FALSE; 00852 } 00853 00854 if (!isset($cfg['DBG']['profile']['enable'])) { 00855 $cfg['DBG']['profile']['enable'] = FALSE; 00856 } 00857 00858 if (!isset($cfg['DBG']['profile']['threshold'])) { 00859 $cfg['DBG']['profile']['threshold'] = 0.5; 00860 } 00861 00862 if (!isset($cfg['SQP']['fmtType'])) { 00863 $cfg['SQP']['fmtType'] = 'html'; 00864 } 00865 00866 if (!isset($cfg['SQP']['fmtInd'])) { 00867 $cfg['SQP']['fmtInd'] = '1'; 00868 } 00869 00870 if (!isset($cfg['SQP']['fmtIndUnit'])) { 00871 $cfg['SQP']['fmtIndUnit'] = 'em'; 00872 } 00873 00874 if (!isset($cfg['SQP']['fmtColor']['comment'])) { 00875 $cfg['SQP']['fmtColor']['comment'] = '#808000'; 00876 } 00877 00878 if (!isset($cfg['SQP']['fmtColor']['digit'])) { 00879 $cfg['SQP']['fmtColor']['digit'] = ''; 00880 } 00881 00882 if (!isset($cfg['SQP']['fmtColor']['digit_hex'])) { 00883 $cfg['SQP']['fmtColor']['digit_hex'] = 'teal'; 00884 } 00885 00886 if (!isset($cfg['SQP']['fmtColor']['digit_integer'])) { 00887 $cfg['SQP']['fmtColor']['digit_integer'] = 'teal'; 00888 } 00889 00890 if (!isset($cfg['SQP']['fmtColor']['digit_float'])) { 00891 $cfg['SQP']['fmtColor']['digit_float'] = 'aqua'; 00892 } 00893 00894 if (!isset($cfg['SQP']['fmtColor']['punct'])) { 00895 $cfg['SQP']['fmtColor']['punct'] = 'fuchsia'; 00896 } 00897 00898 if (!isset($cfg['SQP']['fmtColor']['alpha'])) { 00899 $cfg['SQP']['fmtColor']['alpha'] = ''; 00900 } 00901 00902 if (!isset($cfg['SQP']['fmtColor']['alpha_columnType'])) { 00903 $cfg['SQP']['fmtColor']['alpha_columnType'] = '#FF9900'; 00904 } 00905 00906 if (!isset($cfg['SQP']['fmtColor']['alpha_columnAttrib'])) { 00907 $cfg['SQP']['fmtColor']['alpha_columnAttrib'] = '#0000FF'; 00908 } 00909 00910 if (!isset($cfg['SQP']['fmtColor']['alpha_reservedWord'])) { 00911 $cfg['SQP']['fmtColor']['alpha_reservedWord'] = '#990099'; 00912 } 00913 00914 if (!isset($cfg['SQP']['fmtColor']['alpha_functionName'])) { 00915 $cfg['SQP']['fmtColor']['alpha_functionName'] = '#FF0000'; 00916 } 00917 00918 if (!isset($cfg['SQP']['fmtColor']['alpha_identifier'])) { 00919 $cfg['SQP']['fmtColor']['alpha_identifier'] = 'black'; 00920 } 00921 00922 if (!isset($cfg['SQP']['fmtColor']['alpha_charset'])) { 00923 $cfg['SQP']['fmtColor']['alpha_charset'] = '#6495ed'; 00924 } 00925 00926 if (!isset($cfg['SQP']['fmtColor']['alpha_variable'])) { 00927 $cfg['SQP']['fmtColor']['alpha_variable'] = '#800000'; 00928 } 00929 00930 if (!isset($cfg['SQP']['fmtColor']['quote'])) { 00931 $cfg['SQP']['fmtColor']['quote'] = '#008000'; 00932 } 00933 00934 if (!isset($cfg['SQP']['fmtColor']['quote_double'])) { 00935 $cfg['SQP']['fmtColor']['quote_double'] = ''; 00936 } 00937 00938 if (!isset($cfg['SQP']['fmtColor']['quote_single'])) { 00939 $cfg['SQP']['fmtColor']['quote_single'] = ''; 00940 } 00941 00942 if (!isset($cfg['SQP']['fmtColor']['quote_backtick'])) { 00943 $cfg['SQP']['fmtColor']['quote_backtick'] = ''; 00944 } 00945 00946 if (!isset($cfg['AvailableCharsets'])) { 00947 $cfg['AvailableCharsets'] = array( 00948 'iso-8859-1', 00949 'iso-8859-2', 00950 'iso-8859-3', 00951 'iso-8859-4', 00952 'iso-8859-5', 00953 'iso-8859-6', 00954 'iso-8859-7', 00955 'iso-8859-8', 00956 'iso-8859-9', 00957 'iso-8859-10', 00958 'iso-8859-11', 00959 'iso-8859-12', 00960 'iso-8859-13', 00961 'iso-8859-14', 00962 'iso-8859-15', 00963 'windows-1250', 00964 'windows-1251', 00965 'windows-1252', 00966 'windows-1257', 00967 'koi8-r', 00968 'big5', 00969 'gb2312', 00970 'utf-8', 00971 'utf-7', 00972 'x-user-defined', 00973 'euc-jp', 00974 'ks_c_5601-1987', 00975 'tis-620', 00976 'SHIFT_JIS' 00977 ); 00978 } 00979 00980 if (!isset($cfg['ColumnTypes'])) { 00981 if (isset($cfgColumnTypes)) { 00982 $cfg['ColumnTypes'] = $cfgColumnTypes; 00983 unset($cfgColumnTypes); 00984 } else { 00985 $cfg['ColumnTypes'] = array( 00986 'VARCHAR', 00987 'TINYINT', 00988 'TEXT', 00989 'DATE', 00990 'SMALLINT', 00991 'MEDIUMINT', 00992 'INT', 00993 'BIGINT', 00994 'FLOAT', 00995 'DOUBLE', 00996 'DECIMAL', 00997 'DATETIME', 00998 'TIMESTAMP', 00999 'TIME', 01000 'YEAR', 01001 'CHAR', 01002 'TINYBLOB', 01003 'TINYTEXT', 01004 'BLOB', 01005 'MEDIUMBLOB', 01006 'MEDIUMTEXT', 01007 'LONGBLOB', 01008 'LONGTEXT', 01009 'ENUM', 01010 'SET' 01011 ); 01012 } 01013 } 01014 01015 if (!isset($cfg['AttributeTypes'])) { 01016 if (isset($cfgAttributeTypes)) { 01017 $cfg['AttributeTypes'] = $cfgAttributeTypes; 01018 unset($cfgAttributeTypes); 01019 } else { 01020 $cfg['AttributeTypes'] = array( 01021 '', 01022 'BINARY', 01023 'UNSIGNED', 01024 'UNSIGNED ZEROFILL' 01025 ); 01026 } 01027 } 01028 01029 if ($cfg['ShowFunctionFields']) { 01030 if (!isset($cfg['Functions'])) { 01031 if (isset($cfgFunctions)) { 01032 $cfg['Functions'] = $cfgFunctions; 01033 } else { 01034 $cfg['Functions'] = array( 01035 'ASCII', 01036 'CHAR', 01037 'SOUNDEX', 01038 'LCASE', 01039 'UCASE', 01040 'NOW', 01041 'PASSWORD', 01042 'MD5', 01043 'ENCRYPT', 01044 'RAND', 01045 'LAST_INSERT_ID', 01046 'COUNT', 01047 'AVG', 01048 'SUM', 01049 'CURDATE', 01050 'CURTIME', 01051 'FROM_DAYS', 01052 'FROM_UNIXTIME', 01053 'PERIOD_ADD', 01054 'PERIOD_DIFF', 01055 'TO_DAYS', 01056 'UNIX_TIMESTAMP', 01057 'USER', 01058 'WEEKDAY', 01059 'CONCAT' 01060 ); 01061 } 01062 01063 // Which column types will be mapped to which Group? 01064 $cfg['RestrictColumnTypes'] = array( 01065 'VARCHAR' => 'FUNC_CHAR', 01066 'TINYINT' => 'FUNC_NUMBER', 01067 'TEXT' => 'FUNC_CHAR', 01068 'DATE' => 'FUNC_DATE', 01069 'SMALLINT' => 'FUNC_NUMBER', 01070 'MEDIUMINT' => 'FUNC_NUMBER', 01071 'INT' => 'FUNC_NUMBER', 01072 'BIGINT' => 'FUNC_NUMBER', 01073 'FLOAT' => 'FUNC_NUMBER', 01074 'DOUBLE' => 'FUNC_NUMBER', 01075 'DECIMAL' => 'FUNC_NUMBER', 01076 'DATETIME' => 'FUNC_DATE', 01077 'TIMESTAMP' => 'FUNC_DATE', 01078 'TIME' => 'FUNC_DATE', 01079 'YEAR' => 'FUNC_DATE', 01080 'CHAR' => 'FUNC_CHAR', 01081 'TINYBLOB' => 'FUNC_CHAR', 01082 'TINYTEXT' => 'FUNC_CHAR', 01083 'BLOB' => 'FUNC_CHAR', 01084 'MEDIUMBLOB' => 'FUNC_CHAR', 01085 'MEDIUMTEXT' => 'FUNC_CHAR', 01086 'LONGBLOB' => 'FUNC_CHAR', 01087 'LONGTEXT' => 'FUNC_CHAR', 01088 'ENUM' => '', 01089 'SET' => '' 01090 ); 01091 01092 // Map above defined groups to any function 01093 $cfg['RestrictFunctions'] = array( 01094 'FUNC_CHAR' => array( 01095 'ASCII', 01096 'CHAR', 01097 'SOUNDEX', 01098 'LCASE', 01099 'UCASE', 01100 'PASSWORD', 01101 'MD5', 01102 'ENCRYPT', 01103 'LAST_INSERT_ID', 01104 'USER', 01105 'CONCAT' 01106 ), 01107 01108 'FUNC_DATE' => array( 01109 'NOW', 01110 'CURDATE', 01111 'CURTIME', 01112 'FROM_DAYS', 01113 'FROM_UNIXTIME', 01114 'PERIOD_ADD', 01115 'PERIOD_DIFF', 01116 'TO_DAYS', 01117 'UNIX_TIMESTAMP', 01118 'WEEKDAY' 01119 ), 01120 01121 'FUNC_NUMBER' => array( 01122 'ASCII', 01123 'CHAR', 01124 'MD5', 01125 'ENCRYPT', 01126 'RAND', 01127 'LAST_INSERT_ID', 01128 'COUNT', 01129 'AVG', 01130 'SUM' 01131 ) 01132 ); 01133 } 01134 01135 if (!isset($cfg['DefaultFunctions'])) { 01136 $cfg['DefaultFunctions'] = array( 01137 'FUNC_CHAR' => '', 01138 'FUNC_DATE' => '', 01139 'FUNC_NUMBER' => '', 01140 'first_timestamp' => 'NOW' 01141 ); 01142 } 01143 } 01144 01145 if (!isset($cfg['GD2Available'])) { 01146 $cfg['GD2Available'] = 'auto'; 01147 } 01148 if (!isset($cfg['PDFPageSizes'])) { 01149 $cfg['PDFPageSizes'] = array('A3', 'A4', 'A5', 'letter', 'legal'); 01150 } 01151 if (!isset($cfg['PDFDefaultPageSize'])) { 01152 $cfg['PDFDefaultPageSize'] = 'A4'; 01153 } 01154 if (!isset($cfg['CtrlArrowsMoving'])) { 01155 $cfg['CtrlArrowsMoving'] = TRUE; 01156 } 01157 01158 if (!isset($cfg['Export']['format'])) { 01159 $cfg['Export']['format'] = 'sql'; 01160 } // sql/latex/excel/csv/xml 01161 if (!isset($cfg['Export']['compression'])) { 01162 $cfg['Export']['compression'] = 'none'; 01163 } // none/zip/gzip/bzip2 01164 01165 if (!isset($cfg['Export']['asfile'])) { 01166 $cfg['Export']['asfile'] = FALSE; 01167 } 01168 if (!isset($cfg['Export']['onserver'])) { 01169 $cfg['Export']['onserver'] = FALSE; 01170 } 01171 if (!isset($cfg['Export']['onserver_overwrite'])) { 01172 $cfg['Export']['onserver_overwrite'] = FALSE; 01173 } 01174 if (!isset($cfg['Export']['remember_file_template'])) { 01175 $cfg['Export']['remember_file_template'] = TRUE; 01176 } 01177 if (!isset($cfg['Export']['csv_null'])) { 01178 $cfg['Export']['csv_null'] = 'NULL'; 01179 } 01180 if (!isset($cfg['Export']['csv_columns'])) { 01181 $cfg['Export']['csv_columns'] = FALSE; 01182 } 01183 if (!isset($cfg['Export']['excel_null'])) { 01184 $cfg['Export']['excel_null'] = 'NULL'; 01185 } 01186 if (!isset($cfg['Export']['excel_columns'])) { 01187 $cfg['Export']['excel_columns'] = FALSE; 01188 } 01189 if (!isset($cfg['Export']['excel_edition'])) { 01190 $cfg['Export']['excel_edition'] = 'win'; 01191 } 01192 if (!isset($cfg['Export']['latex_null'])) { 01193 $cfg['Export']['latex_null'] = '\textit{NULL}'; 01194 } 01195 if (!isset($cfg['Export']['csv_separator'])) { 01196 $cfg['Export']['csv_separator'] = ';'; 01197 } 01198 if (!isset($cfg['Export']['csv_enclosed'])) { 01199 $cfg['Export']['csv_enclosed'] = '"'; 01200 } 01201 if (!isset($cfg['Export']['csv_escaped'])) { 01202 $cfg['Export']['csv_escaped'] = '\\'; 01203 } 01204 if (!isset($cfg['Export']['csv_terminated'])) { 01205 $cfg['Export']['csv_terminated'] = 'AUTO'; 01206 } 01207 01208 if (!isset($cfg['Export']['latex_structure'])) { 01209 $cfg['Export']['latex_structure'] = TRUE; 01210 } 01211 if (!isset($cfg['Export']['latex_data'])) { 01212 $cfg['Export']['latex_data'] = TRUE; 01213 } 01214 if (!isset($cfg['Export']['latex_columns'])) { 01215 $cfg['Export']['latex_columns'] = TRUE; 01216 } 01217 if (!isset($cfg['Export']['latex_relation'])) { 01218 $cfg['Export']['latex_relation'] = TRUE; 01219 } 01220 if (!isset($cfg['Export']['latex_comments'])) { 01221 $cfg['Export']['latex_comments'] = TRUE; 01222 } 01223 if (!isset($cfg['Export']['latex_mime'])) { 01224 $cfg['Export']['latex_mime'] = TRUE; 01225 } 01226 if (!isset($cfg['Export']['latex_caption'])) { 01227 $cfg['Export']['latex_caption'] = TRUE; 01228 } 01229 if (!isset($cfg['Export']['latex_data_label'])) { 01230 $cfg['Export']['latex_data_label'] = 'tab:__TABLE__-data'; 01231 } 01232 if (!isset($cfg['Export']['latex_structure_label'])) { 01233 $cfg['Export']['latex_structure_label'] = 'tab:__TABLE__-structure'; 01234 } 01235 01236 if (!isset($cfg['Export']['sql_drop_database'])) { 01237 $cfg['Export']['sql_drop_database'] = FALSE; 01238 } 01239 if (!isset($cfg['Export']['sql_drop_table'])) { 01240 $cfg['Export']['sql_drop_table'] = FALSE; 01241 } 01242 if (!isset($cfg['Export']['sql_auto_increment'])) { 01243 $cfg['Export']['sql_auto_increment'] = TRUE; 01244 } 01245 if (!isset($cfg['Export']['sql_structure'])) { 01246 $cfg['Export']['sql_structure'] = TRUE; 01247 } 01248 if (!isset($cfg['Export']['sql_data'])) { 01249 $cfg['Export']['sql_data'] = TRUE; 01250 } 01251 if (!isset($cfg['Export']['sql_backquotes'])) { 01252 $cfg['Export']['sql_backquotes'] = TRUE; 01253 } 01254 if (!isset($cfg['Export']['sql_dates'])) { 01255 $cfg['Export']['sql_dates'] = FALSE; 01256 } 01257 if (!isset($cfg['Export']['sql_relation'])) { 01258 $cfg['Export']['sql_relation'] = FALSE; 01259 } 01260 if (!isset($cfg['Export']['sql_columns'])) { 01261 $cfg['Export']['sql_columns'] = FALSE; 01262 } 01263 if (!isset($cfg['Export']['sql_delayed'])) { 01264 $cfg['Export']['sql_delayed'] = FALSE; 01265 } 01266 if (!isset($cfg['Export']['sql_type'])) { 01267 $cfg['Export']['sql_type'] = 'insert'; 01268 } 01269 if (!isset($cfg['Export']['sql_extended'])) { 01270 $cfg['Export']['sql_extended'] = FALSE; 01271 } 01272 if (!isset($cfg['Export']['sql_comments'])) { 01273 $cfg['Export']['sql_comments'] = FALSE; 01274 } 01275 if (!isset($cfg['Export']['sql_mime'])) { 01276 $cfg['Export']['sql_mime'] = FALSE; 01277 } 01278 01279 ?>