mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 04:18:55 +00:00
some minor odbc tweaks...
git-svn-id: file:///svn/phpbb/trunk@1163 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
06889f19fb
commit
2f10b2076e
1 changed files with 130 additions and 139 deletions
|
@ -292,12 +292,11 @@ else
|
||||||
// out some additional instruction_textions later on what to do after installation
|
// out some additional instruction_textions later on what to do after installation
|
||||||
// for the odbc DBMS.
|
// for the odbc DBMS.
|
||||||
//
|
//
|
||||||
if( ereg(':', $dbms) && $install_step < 2 )
|
if( ereg(':', $dbms) )
|
||||||
{
|
{
|
||||||
$dbms = explode(':', $dbms);
|
$dbms = explode(':', $dbms);
|
||||||
$dbhost = $dbms[1] . ':' . $dbhost;
|
$dbhost = $dbms[1] . ':' . $dbhost;
|
||||||
$dbms = $dbms[0];
|
$dbms = $dbms[0];
|
||||||
$install_step = 2;
|
|
||||||
}
|
}
|
||||||
else if( isset($dbms) )
|
else if( isset($dbms) )
|
||||||
{
|
{
|
||||||
|
@ -310,9 +309,10 @@ else
|
||||||
$remove_remarks = ( $dbms == 'mysql' ) ? 'remove_remarks' : 'remove_comments';
|
$remove_remarks = ( $dbms == 'mysql' ) ? 'remove_remarks' : 'remove_comments';
|
||||||
$delimiter = ( $dbms == 'mssql' ) ? 'GO' : ';';
|
$delimiter = ( $dbms == 'mssql' ) ? 'GO' : ';';
|
||||||
|
|
||||||
switch ( $install_step )
|
if( $install_step == 1 )
|
||||||
|
{
|
||||||
|
if($dbms != 'odbc')
|
||||||
{
|
{
|
||||||
case 1:
|
|
||||||
//
|
//
|
||||||
// Ok we have the db info go ahead and read in the relevant schema
|
// Ok we have the db info go ahead and read in the relevant schema
|
||||||
// and work on building the table.. probably ought to provide some
|
// and work on building the table.. probably ought to provide some
|
||||||
|
@ -374,26 +374,6 @@ else
|
||||||
// this we are going to pass them over to the admin_forum.php script
|
// this we are going to pass them over to the admin_forum.php script
|
||||||
// to set up their forum defaults.
|
// to set up their forum defaults.
|
||||||
//
|
//
|
||||||
if( $dbms == 'odbc' )
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Output the instruction_textions for the odbc...
|
|
||||||
//
|
|
||||||
$template->assign_block_vars("common_install", array());
|
|
||||||
|
|
||||||
$s_hidden_fields = '<input type="hidden" name="install_step" value="3" />';
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"L_INSTRUCTION_TEXT" => $lang['ODBC_instruction_texts'],
|
|
||||||
"L_SUBMIT" => $lang['OK'],
|
|
||||||
|
|
||||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
|
||||||
"S_FORM_ACTION" => 'install.'.$phpEx)
|
|
||||||
);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$error = "";
|
$error = "";
|
||||||
//
|
//
|
||||||
// Update the default admin user with their information.
|
// Update the default admin user with their information.
|
||||||
|
@ -444,9 +424,8 @@ else
|
||||||
$template->pparse('body');
|
$template->pparse('body');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$template->assign_block_vars("common_install", array());
|
$template->assign_block_vars("common_install", array());
|
||||||
|
|
||||||
//
|
//
|
||||||
// Write out the config file.
|
// Write out the config file.
|
||||||
//
|
//
|
||||||
|
@ -463,9 +442,7 @@ else
|
||||||
|
|
||||||
@umask(0111);
|
@umask(0111);
|
||||||
$no_open = FALSE;
|
$no_open = FALSE;
|
||||||
|
|
||||||
$fp = @fopen('config.php', 'w');
|
$fp = @fopen('config.php', 'w');
|
||||||
|
|
||||||
if( !$fp )
|
if( !$fp )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -474,6 +451,16 @@ else
|
||||||
//
|
//
|
||||||
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />';
|
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />';
|
||||||
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
|
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
|
||||||
|
if ( $dbms == 'odbc' )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Output the instruction_textions for the odbc...
|
||||||
|
//
|
||||||
|
$template->assign_block_vars("common_install", array());
|
||||||
|
|
||||||
|
$s_hidden_fields .= '<input type="hidden" name="install_step" value="3" />';
|
||||||
|
$lang['Unwritable_config'] = $lang['ODBC_Instructs'] . '<br />' . $lang['Unwritable_config'];
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_INSTRUCTION_TEXT" => $lang['Unwriteable_config'],
|
"L_INSTRUCTION_TEXT" => $lang['Unwriteable_config'],
|
||||||
|
@ -500,6 +487,13 @@ else
|
||||||
$s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />';
|
$s_hidden_fields .= '<input type="hidden" name="password" value="' . $admin_pass1 . '" />';
|
||||||
$s_hidden_fields .= '<input type="hidden" name="forward_page" value="admin/" />';
|
$s_hidden_fields .= '<input type="hidden" name="forward_page" value="admin/" />';
|
||||||
$s_hidden_fields .= '<input type="hidden" name="submit" value="Login" />';
|
$s_hidden_fields .= '<input type="hidden" name="submit" value="Login" />';
|
||||||
|
if ( $dbms == 'odbc' )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Output the instruction_textions for the odbc...
|
||||||
|
//
|
||||||
|
$lang['Inst_Step_2'] = $lang['ODBC_Instructs'] . '<br />' . $lang['Inst_Step_2'];
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_INSTRUCTION_TEXT" => $lang['Inst_Step_2'],
|
"L_INSTRUCTION_TEXT" => $lang['Inst_Step_2'],
|
||||||
|
@ -512,8 +506,5 @@ else
|
||||||
$template->pparse('body');
|
$template->pparse('body');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue