made a copy
authorharris wong <hwong@ocad.ca>
Thu, 3 Jul 2008 14:17:54 +0000 (14:17 -0000)
committerharris wong <hwong@ocad.ca>
Thu, 3 Jul 2008 14:17:54 +0000 (14:17 -0000)
install/include/common.inc.php
install/include/ustep2.php

index 443632b..141038b 100644 (file)
@@ -92,7 +92,12 @@ if ( get_magic_quotes_gpc() == 1 ) {
                     if (mysql_query($prefixed_query[0],$db) !== false) {
                                                $progress[] = 'Table <strong>'.$table.'</strong> altered successfully.';
                                        } else {
-                                               $errors[] = 'Table <strong>'.$table.'</strong> alteration failed.';
+                                               if (mysql_errno($db) == 1060) 
+                                                       $progress[] = 'Table <strong>'.$table . '</strong> fields already exists. Skipping.';
+                                               elseif (mysql_errno($db) == 1091) 
+                                                       $progress[] = 'Table <strong>'.$table . '</strong> fields already dropped. Skipping.';
+                                               else
+                                                       $errors[] = 'Table <strong>'.$table.'</strong> alteration failed.';
                                        }
 
                 }elseif($prefixed_query[1] == 'DROP TABLE'){
index 6881a71..e1b7901 100644 (file)
@@ -48,8 +48,8 @@ $_POST['db_password'] = urldecode($_POST['db_password']);
                $sql = "SELECT VERSION() AS version";
                $result = mysql_query($sql, $db);
                $row = mysql_fetch_assoc($result);
-               if (version_compare($row['version'], '4.3', '>=') === FALSE) {
-                       $errors[] = 'MySQL version '.$row['version'].' was detected. ATutor requires version 4.3 or later.';
+               if (version_compare($row['version'], '4.1.10', '>=') === FALSE) {
+                       $errors[] = 'MySQL version '.$row['version'].' was detected. ATutor requires version 4.1.10 or later.';
                }
 
                if (!$errors) {