config_import.lib.php
来自「php绿色服务器,让大家试用greenamp」· PHP 代码 · 共 1,258 行 · 第 1/3 页
PHP
1,258 行
<?php/* $Id: config_import.lib.php,v 2.35 2004/09/23 10:10:37 rabus Exp $ */// vim: expandtab sw=4 ts=4 sts=4:/** * This file provides support for older config files. *//** * U S A G E * * After having added a new directive to the config.inc.php file, you need to * put some backwards compatibility code into this file. * * This usually looks like this: * * if (!isset($myNewDirective)) { * $myNewDirective = 'my default value'; * } * * If the new directive is meant as a replacement for an old one, please use the * following layout: * * if (!isset($myNewDirective)) { * if (isset($myOldDirective)) { * $myNewDirective = $myOldDirective; * unset($myOldDirective); * } else { * $myNewDirective = ''; * } * } * * In order to make this file readable for other developers, please try to use * the same order of directives here as you do in config.inc.php. * * After having done all this, search libraries/common.lib.php for the * following paragraph (x and y are integers): * * if ($cfg['FileRevision'][0] < x || $cfg['FileRevision'][1] < y) { * require_once('./libraries/config_import.lib.php'); * } * * Finally, set x and y to the _new_ revision number of config.inc.php and * you're done! x would be the major version, y the minor version number of the * new revision, e.g. 2.34 becomes: x = 2, y = 34 */if (!isset($cfg['PmaAbsoluteUri'])) { if (isset($cfgPmaAbsoluteUri)) { $cfg['PmaAbsoluteUri'] = $cfgPmaAbsoluteUri; unset($cfgPmaAbsoluteUri); } else { $cfg['PmaAbsoluteUri'] = ''; }}if (!isset($cfg['PmaAbsoluteUri_DisableWarning'])) { $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;}if (!isset($cfg['PmaNoRelation_DisableWarning'])) { $cfg['PmaNoRelation_DisableWarning'] = FALSE;}// do not set a default value here!if (!isset($cfg['blowfish_secret'])) { $cfg['blowfish_secret'] = '';}if (!isset($cfg['Servers'])) { if (isset($cfgServers)) { $cfg['Servers'] = $cfgServers; unset($cfgServers); } else { $server = 0; }}if (isset($cfg['Servers'])) { for ($i=1; (!empty($cfg['Servers'][$i]['host']) || (isset($cfg['Servers'][$i]['connect_type']) && $cfg['Servers'][$i]['connect_type'] == 'socket')); $i++) { if (!isset($cfg['Servers'][$i]['host'])) { $cfg['Servers'][$i]['host'] = ''; } if (!isset($cfg['Servers'][$i]['port'])) { $cfg['Servers'][$i]['port'] = ''; } if (!isset($cfg['Servers'][$i]['socket'])) { $cfg['Servers'][$i]['socket'] = ''; } if (!isset($cfg['Servers'][$i]['connect_type'])) { $cfg['Servers'][$i]['connect_type'] = 'tcp'; } if (!isset($cfg['Servers'][$i]['extension'])) { $cfg['Servers'][$i]['extension'] = 'mysql'; } if (!isset($cfg['Servers'][$i]['controluser']) && isset($cfg['Servers'][$i]['stduser'])) { $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['stduser']; $cfg['Servers'][$i]['controlpass'] = $cfg['Servers'][$i]['stdpass']; unset($cfg['Servers'][$i]['stduser'], $cfg['Servers'][$i]['stdpass']); } else if (!isset($cfg['Servers'][$i]['controluser'])) { $cfg['Servers'][$i]['controluser'] = $cfg['Servers'][$i]['controlpass'] = ''; } if (!isset($cfg['Servers'][$i]['auth_type'])) { $cfg['Servers'][$i]['auth_type'] = (isset($cfg['Servers'][$i]['adv_auth']) && $cfg['Servers'][$i]['adv_auth']) ? 'http' : 'config'; unset($cfg['Servers'][$i]['adv_auth']); } // for users who use the "first" blowfish mechanism if (isset($cfg['Servers'][$i]['blowfish_secret'])) { if (empty($cfg['blowfish_secret'])) { $cfg['blowfish_secret'] = $cfg['Servers'][$i]['blowfish_secret']; } unset($cfg['Servers'][$i]['blowfish_secret']); } if (!isset($cfg['Servers'][$i]['compress'])) { $cfg['Servers'][$i]['compress'] = FALSE; } if (!isset($cfg['Servers'][$i]['user'])) { $cfg['Servers'][$i]['user'] = 'root'; } if (!isset($cfg['Servers'][$i]['password'])) { $cfg['Servers'][$i]['password'] = ''; } if (!isset($cfg['Servers'][$i]['only_db'])) { $cfg['Servers'][$i]['only_db'] = ''; } if (!isset($cfg['Servers'][$i]['verbose'])) { $cfg['Servers'][$i]['verbose'] = ''; } if (!isset($cfg['Servers'][$i]['pmadb'])) { if (isset($cfg['Servers'][$i]['bookmarkdb'])) { $cfg['Servers'][$i]['pmadb'] = $cfg['Servers'][$i]['bookmarkdb']; unset($cfg['Servers'][$i]['bookmarkdb']); } else { $cfg['Servers'][$i]['pmadb'] = ''; } } if (!isset($cfg['Servers'][$i]['bookmarktable'])) { $cfg['Servers'][$i]['bookmarktable'] = ''; } if (!isset($cfg['Servers'][$i]['relation'])) { $cfg['Servers'][$i]['relation'] = ''; } if (!isset($cfg['Servers'][$i]['table_info'])) { $cfg['Servers'][$i]['table_info'] = ''; } if (!isset($cfg['Servers'][$i]['table_coords'])) { $cfg['Servers'][$i]['table_coords'] = ''; } if (!isset($cfg['Servers'][$i]['column_info'])) { if (isset($cfg['Servers'][$i]['column_comments'])) { $cfg['Servers'][$i]['column_info'] = $cfg['Servers'][$i]['column_comments']; unset($cfg['Servers'][$i]['column_comments']); } else { $cfg['Servers'][$i]['column_info'] = ''; } } if (!isset($cfg['Servers'][$i]['pdf_pages'])) { $cfg['Servers'][$i]['pdf_pages'] = ''; } if (!isset($cfg['Servers'][$i]['history'])) { $cfg['Servers'][$i]['history'] = ''; } if (!isset($cfg['Servers'][$i]['verbose_check'])) { $cfg['Servers'][$i]['verbose_check'] = TRUE; } if (!isset($cfg['Servers'][$i]['AllowDeny'])) { $cfg['Servers'][$i]['AllowDeny'] = array ('order' => '', 'rules' => array()); } }}if (!isset($cfg['ServerDefault'])) { if (isset($cfgServerDefault)) { $cfg['ServerDefault'] = $cfgServerDefault; unset($cfgServerDefault); } else { $cfg['ServerDefault'] = 1; }}if (!isset($cfg['OBGzip'])) { if (isset($cfgOBGzip)) { $cfg['OBGzip'] = $cfgOBGzip; unset($cfgOBGzip); } else { $cfg['OBGzip'] = 'auto'; }}if (!isset($cfg['PersistentConnections'])) { if (isset($cfgPersistentConnections)) { $cfg['PersistentConnections'] = $cfgPersistentConnections; unset($cfgPersistentConnections); } else { $cfg['PersistentConnections'] = FALSE; }}if (!isset($cfg['ExecTimeLimit'])) { if (isset($cfgExecTimeLimit)) { $cfg['ExecTimeLimit'] = $cfgExecTimeLimit; unset($cfgExecTimeLimit); } else { $cfg['ExecTimeLimit'] = 300; }}if (!isset($cfg['SkipLockedTables'])) { if (isset($cfgSkipLockedTables)) { $cfg['SkipLockedTables'] = $cfgSkipLockedTables; unset($cfgSkipLockedTables); } else { $cfg['SkipLockedTables'] = FALSE; }}if (!isset($cfg['ShowSQL'])) { if (isset($cfgShowSQL)) { $cfg['ShowSQL'] = $cfgShowSQL; unset($cfgShowSQL); } else { $cfg['ShowSQL'] = TRUE; }}if (!isset($cfg['AllowUserDropDatabase'])) { if (isset($cfgAllowUserDropDatabase)) { $cfg['AllowUserDropDatabase'] = $cfgAllowUserDropDatabase; unset($cfgAllowUserDropDatabase); } else { $cfg['AllowUserDropDatabase'] = FALSE; }}if (!isset($cfg['Confirm'])) { if (isset($cfgConfirm)) { $cfg['Confirm'] = $cfgConfirm; unset($cfgConfirm); } else { $cfg['Confirm'] = TRUE; }}if (!isset($cfg['LoginCookieRecall'])) { if (isset($cfgLoginCookieRecall)) { $cfg['LoginCookieRecall'] = $cfgLoginCookieRecall; unset($cfgLoginCookieRecall); } else { $cfg['LoginCookieRecall'] = TRUE; }}if (!isset($cfg['LoginCookieValidity'])) { $cfg['LoginCookieValidity'] = 1800;}if (!isset($cfg['UseDbSearch'])) { $cfg['UseDbSearch'] = TRUE;}if (!isset($cfg['IgnoreMultiSubmitErrors'])) { $cfg['IgnoreMultiSubmitErrors'] = FALSE;}if (!isset($cfg['VerboseMultiSubmit'])) { $cfg['VerboseMultiSubmit'] = TRUE;}if (!isset($cfg['AllowArbitraryServer'])) { $cfg['AllowArbitraryServer'] = FALSE;}if (!isset($cfg['LeftFrameLight'])) { if (isset($cfgLeftFrameLight)) { $cfg['LeftFrameLight'] = $cfgLeftFrameLight; unset($cfgLeftFrameLight); } else { $cfg['LeftFrameLight'] = TRUE; }}if (!isset($cfg['LeftFrameTableSeparator'])) { $cfg['LeftFrameTableSeparator'] = '__';}if (!isset($cfg['LeftFrameTableLevel'])) { $cfg['LeftFrameTableLevel'] = '1';}if (!isset($cfg['LightTabs'])) { $cfg['LightTabs'] = FALSE;}if (!isset($cfg['PropertiesIconic'])) { $cfg['PropertiesIconic'] = TRUE;}if (!isset($cfg['PropertiesNumColumns'])) { $cfg['PropertiesNumColumns'] = 1;}if (!isset($cfg['ShowTooltip'])) { if (isset($cfgShowTooltip)) { $cfg['ShowTooltip'] = $cfgShowTooltip; } else { $cfg['ShowTooltip'] = TRUE; }}if (!isset($cfg['LeftDisplayLogo'])) { $cfg['LeftDisplayLogo'] = TRUE;}if (!isset($cfg['LeftDisplayServers'])) { $cfg['LeftDisplayServers'] = FALSE;}if (!isset($cfg['DisplayServersList'])) { if (isset($cfg['LeftisplayServersList'])) { $cfg['DisplayServersList'] = $cfg['LeftDisplayServersList']; } else { $cfg['DisplayServersList'] = FALSE; }}if (!isset($cfg['ShowStats'])) { if (isset($cfgShowStats)) { $cfg['ShowStats'] = $cfgShowStats; unset($cfgShowStats); } else { $cfg['ShowStats'] = TRUE; }}if (!isset($cfg['ShowMysqlInfo'])) { if (isset($cfgShowMysqlInfo)) { $cfg['ShowMysqlInfo'] = $cfgShowMysqlInfo; unset($cfgShowMysqlInfo); } else { $cfg['ShowMysqlInfo'] = FALSE; }}if (!isset($cfg['ShowMysqlVars'])) { if (isset($cfgShowMysqlVars)) { $cfg['ShowMysqlVars'] = $cfgShowMysqlVars; unset($cfgShowMysqlVars); } else { $cfg['ShowMysqlVars'] = FALSE; }}if (!isset($cfg['ShowPhpInfo'])) { if (isset($cfgShowPhpInfo)) { $cfg['ShowPhpInfo'] = $cfgShowPhpInfo; unset($cfgShowPhpInfo); } else { $cfg['ShowPhpInfo'] = FALSE; }}if (!isset($cfg['ShowChgPassword'])) { if (isset($cfgShowChgPassword)) { $cfg['ShowChgPassword'] = $cfgShowChgPassword; unset($cfgShowChgPassword); } else { $cfg['ShowChgPassword'] = FALSE; }}if (!isset($cfg['SuggestDBName'])) { $cfg['SuggestDBName'] = TRUE;}if (!isset($cfg['ShowBlob'])) { if (isset($cfgShowBlob)) { $cfg['ShowBlob'] = $cfgShowBlob; unset($cfgShowBlob); } else { $cfg['ShowBlob'] = FALSE; }}if (!isset($cfg['NavigationBarIconic'])) { if (isset($cfgNavigationBarIconic)) { $cfg['NavigationBarIconic'] = $cfgNavigationBarIconic; unset($cfgNavigationBarIconic); } else { $cfg['NavigationBarIconic'] = TRUE; }}if (!isset($cfg['ShowAll'])) { if (isset($cfgShowAll)) { $cfg['ShowAll'] = $cfgShowAll;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?