// Add a warning in welcome page for installer if use has already a previous version of PrestaShop installed #PSCFV-2161

This commit is contained in:
rMalie
2012-06-04 09:45:52 +00:00
parent c93d0896ce
commit 41f03792d6
4 changed files with 22 additions and 1 deletions
+11
View File
@@ -68,6 +68,17 @@ class InstallControllerHttpWelcome extends InstallControllerHttp
*/
public function display()
{
$this->can_upgrade = false;
if (file_exists(_PS_ROOT_DIR_.'/config/settings.inc.php'))
{
@include_once(_PS_ROOT_DIR_.'/config/settings.inc.php');
if (version_compare(_PS_VERSION_, _PS_INSTALL_VERSION_, '<'))
{
$this->can_upgrade = true;
$this->ps_version = _PS_VERSION_;
}
}
$this->displayTemplate('welcome');
}
}