Page 1 of 1

1.3.0 Installer Bug

Posted: Mon Jul 20, 2009 11:59 pm
by JNeuhoff
The Opencart installer for 1.3.0 has a bug. Whatever I enter as the DB prefix, it always ends up creating the DB tables using a 'oc_' as the DB prefix. This results in a mismatch between the DB_PREFIX in the config.php, and the actual DB tables (which use 'oc_' as the table name prefix).

Here is my proposed bugfix which should work for the supplied opencart.sql:

Replace lines 23 to 25 in file /install/model/install.php with this:

Code: Select all

						$query = str_replace("DROP TABLE IF EXISTS `oc_", "DROP TABLE IF EXISTS `" . $data['db_prefix'], $query);
						$query = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . $data['db_prefix'], $query);
						$query = str_replace("INSERT INTO `oc_", "INSERT INTO `" . $data['db_prefix'], $query);

Re: 1.3.0 Installer Bug

Posted: Tue Jul 21, 2009 12:25 am
by Daniel
oops I know what I've done!

i'm goign to do a mini update.

Re: 1.3.0 Installer Bug

Posted: Tue Jul 21, 2009 12:42 am
by Daniel
ok i reuploaded 1.3.0 with a fix in.