// Automatically run install.sql
if ((FILE_READABLE(REQUEST_POST('spath')."install/tables.sql")) && (FILE_READABLE(REQUEST_POST('spath')."install/menu-".GET_LANGUAGE().".sql"))) {
// Both exists so import them
- foreach (array("tables.sql", "menu-".GET_LANGUAGE().".sql") as $dump) {
+ foreach (array("tables", "menu-".GET_LANGUAGE()) as $dump) {
// Should be save here because file_exists() is there but we check it again. :)
- $FQFN = secureString(REQUEST_POST('spath')) . "install/" . $dump;
+ $FQFN = REQUEST_POST('spath') . "install/" . $dump . ".sql";
if (FILE_READABLE($FQFN)) {
// Read the file
$fileContent = READ_FILE($FQFN, true);