Ok ok, so I'm not perfect :P

This commit is contained in:
Ice
2008-08-10 03:11:12 +00:00
parent 18d0124675
commit 5d9726986c
5 changed files with 14 additions and 14 deletions

View File

@@ -66,7 +66,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
{ {
$check_mode = 'install'; $check_mode = 'install';
} }
elseif( $phpbb3portal === TRUE || version_compare( $old_version, $current_version, "<" ) === TRUE ) elseif( $phpbb3portal === TRUE || version_compare( strtolower($old_version), strtolower($current_version), "<" ) === TRUE )
{ {
$check_mode = 'update'; $check_mode = 'update';
} }
@@ -261,7 +261,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
} }
// locate the schema files // locate the schema files
$dbms_schema = 'schemas/_' . $db_schema . '_schema.sql'; $dbms_schema = $phpbb_root_path.'install_portal/schemas/_' . $db_schema . '_schema.sql';
$sql_query = @file_get_contents($dbms_schema); $sql_query = @file_get_contents($dbms_schema);
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$comments($sql_query); $comments($sql_query);
@@ -280,7 +280,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
// Now for the data // Now for the data
$sql_query = @file_get_contents('schemas/_schema_data.sql'); $sql_query = @file_get_contents($phpbb_root_path.'install_portal/schemas/_schema_data.sql');
switch ($db->sql_layer) switch ($db->sql_layer)
{ {
case 'mssql': case 'mssql':
@@ -544,7 +544,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
} }
// locate the schema files // locate the schema files
$dbms_schema = 'schemas/_' . $db_schema . '_schema.sql'; $dbms_schema = $phpbb_root_path.'install_portal/schemas/_' . $db_schema . '_schema.sql';
$sql_query = @file_get_contents($dbms_schema); $sql_query = @file_get_contents($dbms_schema);
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$comments($sql_query); $comments($sql_query);
@@ -563,7 +563,7 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
// Start by inserting default data // Start by inserting default data
$sql_query = @file_get_contents('schemas/_schema_data.sql'); $sql_query = @file_get_contents($phpbb_root_path.'install_portal/schemas/_schema_data.sql');
switch ($db->sql_layer) switch ($db->sql_layer)
{ {
case 'mssql': case 'mssql':
@@ -856,11 +856,11 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
{ {
$portal_update_array = array(); $portal_update_array = array();
include $phpbb_root_path.'schemas/update_schema.'.$phpEx; include $phpbb_root_path.'install_portal/schemas/update_schema.'.$phpEx;
foreach( $sql_update as $sql_ver => $sql_data ) foreach( $sql_update as $sql_ver => $sql_data )
{ {
if( version_compare($old_version, $sql_ver, ">=") === TRUE ) if( version_compare(strtolower($old_version), strtolower($sql_ver), ">=") === TRUE )
{ {
continue; continue;
} else { } else {

View File

@@ -52,9 +52,9 @@ $mod_update['0.3.0'] = array(
), ),
); );
$sql_update['1.0.0RC1'] = array( $sql_update['1.0.0RC2'] = array(
"UPDATE phpbb_portal_config SET config_name = 'portal_right_column_width' config_name = 'portal_right_collumn_width'", "UPDATE phpbb_portal_config SET config_name = 'portal_right_column_width' WHERE config_name = 'portal_right_collumn_width'",
"UPDATE phpbb_portal_config SET config_name = 'portal_left_column_width' config_name = 'portal_left_collumn_width'",, "UPDATE phpbb_portal_config SET config_name = 'portal_left_column_width' WHERE config_name = 'portal_left_collumn_width'",
); );
?> ?>

View File

@@ -23,7 +23,7 @@ else
<h1><?php echo $user->lang['INSTALLER_INSTALL_TITLE']; ?></h1> <h1><?php echo $user->lang['INSTALLER_INSTALL_TITLE']; ?></h1>
<p><?php echo $user->lang['INSTALLER_INSTALL_NOTE']; ?></p> <p><?php echo $user->lang['INSTALLER_INSTALL_NOTE']; ?></p>
<form id="acp_board" method="post" action="<?php echo append_sid('install.'.$phpEx, 'mode=install'); ?>"> <form id="acp_board" method="post" action="<?php echo append_sid($phpbb_root_path.'install_portal/install.'.$phpEx, 'mode=install'); ?>">
<fieldset> <fieldset>
<legend><?php echo $user->lang['INSTALLER_INSTALL']; ?></legend> <legend><?php echo $user->lang['INSTALLER_INSTALL']; ?></legend>
<dl> <dl>

View File

@@ -23,7 +23,7 @@ else
<h1><?php echo $user->lang['INSTALLER_UNINSTALL_TITLE']; ?></h1> <h1><?php echo $user->lang['INSTALLER_UNINSTALL_TITLE']; ?></h1>
<p><?php echo $user->lang['INSTALLER_UNINSTALL_NOTE']; ?></p> <p><?php echo $user->lang['INSTALLER_UNINSTALL_NOTE']; ?></p>
<form id="acp_board" method="post" action="<?php echo append_sid('install.'.$phpEx, 'mode=uninstall'); ?>"> <form id="acp_board" method="post" action="<?php echo append_sid($phpbb_root_path.'install_portal/install.'.$phpEx, 'mode=uninstall'); ?>">
<fieldset> <fieldset>
<legend><?php echo $user->lang['INSTALLER_UNINSTALL']; ?></legend> <legend><?php echo $user->lang['INSTALLER_UNINSTALL']; ?></legend>
<dl> <dl>

View File

@@ -26,7 +26,7 @@ else
<h1><?php echo $user->lang['INSTALLER_UPDATE_TITLE']; ?></h1> <h1><?php echo $user->lang['INSTALLER_UPDATE_TITLE']; ?></h1>
<p><?php echo sprintf($user->lang['INSTALLER_UPDATE_NOTE'], $old_version, $current_version); ?></p> <p><?php echo sprintf($user->lang['INSTALLER_UPDATE_NOTE'], $old_version, $current_version); ?></p>
<form id="acp_board" method="post" action="<?php echo append_sid('install.'.$phpEx, 'mode=update'); ?>"> <form id="acp_board" method="post" action="<?php echo append_sid($phpbb_root_path.'install_portal/install.'.$phpEx, 'mode=update'); ?>">
<fieldset> <fieldset>
<legend><?php echo $user->lang['INSTALLER_UPDATE']; ?></legend> <legend><?php echo $user->lang['INSTALLER_UPDATE']; ?></legend>
<dl> <dl>