Bug [0000060] table prefix error message and inconsistency at install
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 25 Sep 2008 15:05:19 +0000 (15:05 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 25 Sep 2008 15:05:19 +0000 (15:05 +0000)
admin/db/maintenance_db.inc
install/index.php
install/save.php

index c4a8b9ef66cfc77eec14117124aac5a00992922b..c40c4ef637aa77f58887b7d57924bab150c89b3e 100644 (file)
@@ -110,6 +110,7 @@ function db_import($filename, $connection)
        $drop_queries = array();
        $table_queries = array();
 
+       ini_set("max_execution_time", "180");
        // uncrompress gziped backup files
        if (strpos($filename, ".gzip") || strpos($filename, ".GZIP"))
                $lines = db_ungzip("lines", $filename);
index a02fb38e762667ac0fac2f23b35c11867be4c6d7..221d207c38ce6a2844ad721a15f1b4ee03729e7f 100644 (file)
@@ -213,9 +213,9 @@ function change_os(type) {
                        </td>
                </tr>
                <tr>
-                       <td style="color: #666666;">Table Prefix:</td>
+                       <td style="color: #666666;">Table Prefix ( 0_ ):</td>
                        <td>
-                               <input type="text" tabindex="11" name="table_prefix" style="width: 250px;" value="<?php if(isset($_SESSION['table_prefix'])) { echo $_SESSION['table_prefix']; } else { echo '0_'; } ?>" />
+                               <input type="checkbox" tabindex="11" name="table_prefix" id="table_prefix" value="true"<?php if(!isset($_SESSION['table_prefix'])) { echo ' checked'; } elseif($_SESSION['table_prefix'] == 'true') { echo ' checked'; } ?> />
                        </td>
                        <td>&nbsp;</td>
                        <td colspan="2">
index d8a78d215f951ab5ba09abe8537e2d08898033db..054605531083ca03337704b89f20f86eda153b6c 100644 (file)
@@ -41,7 +41,14 @@ function set_error($message)
                        $_SESSION['database_username'] = $_POST['database_username'];
                        $_SESSION['database_password'] = $_POST['database_password'];
                        $_SESSION['database_name'] = $_POST['database_name'];
-                       $_SESSION['table_prefix'] = $_POST['table_prefix'];
+                       if(!isset($_POST['table_prefix']))
+                       {
+                               $_SESSION['table_prefix'] = false;
+                       }
+                       else
+                       {
+                               $_SESSION['table_prefix'] = true;
+                       }
                        if(!isset($_POST['install_tables']))
                        {
                                $_SESSION['install_tables'] = false;
@@ -229,7 +236,11 @@ else
        $database_name = $_POST['database_name'];
 }
 // Get table prefix
-$table_prefix = $_POST['table_prefix'];
+if (isset($_POST['table_prefix']) && $_POST['table_prefix'] == 'true')
+       $table_prefix = "0_";
+else
+       $table_prefix = "";
+
 // Find out if the user wants to install tables and data
 if (isset($_POST['install_tables']) && $_POST['install_tables'] == 'true')
 {