diff --git a/install-dev/classes/controllerHttp.php b/install-dev/classes/controllerHttp.php index aaffad35a..99aa236f6 100644 --- a/install-dev/classes/controllerHttp.php +++ b/install-dev/classes/controllerHttp.php @@ -354,6 +354,11 @@ abstract class InstallControllerHttp return $this->language->getInformation('support'); } + public function getDocumentationUpgradeLink() + { + return $this->language->getInformation('documentation_upgrade', true); + } + /** * Send AJAX response in JSON format {success: bool, message: string} * diff --git a/install-dev/controllers/http/welcome.php b/install-dev/controllers/http/welcome.php index 40312f4ff..3966b389e 100644 --- a/install-dev/controllers/http/welcome.php +++ b/install-dev/controllers/http/welcome.php @@ -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'); } } diff --git a/install-dev/langs/en/install.php b/install-dev/langs/en/install.php index 082c26f8a..df7c015bb 100644 --- a/install-dev/langs/en/install.php +++ b/install-dev/langs/en/install.php @@ -3,6 +3,7 @@ return array( 'informations' => array( 'phone' => '+1 (888) 947-6543', 'documentation' => 'http://doc.prestashop.com/display/PS14/English+documentation', + 'documentation_upgrade' => 'http://docs.prestashop.com/display/PS15/Updating+PrestaShop', 'forum' => 'http://www.prestashop.com/forums/', 'blog' => 'http://www.prestashop.com/blog/', 'support' => 'http://support.prestashop.com/en/', diff --git a/install-dev/theme/views/welcome.phtml b/install-dev/theme/views/welcome.phtml index 4e5b06a94..f5c21ef2c 100644 --- a/install-dev/theme/views/welcome.phtml +++ b/install-dev/theme/views/welcome.phtml @@ -4,6 +4,10 @@
l('PrestaShop requires at least 16M of memory to run, please check the memory_limit directive in php.ini or contact your host provider'); ?>
+can_upgrade): ?> +
l('You already have PrestaShop version %1$s installed. If you want to upgrade to the latest version please read our documentation : %2$s', $this->ps_version, $this->getDocumentationUpgradeLink()) ?>
+ +

l('Welcome to the PrestaShop %s Installer.', _PS_INSTALL_VERSION_) ?>

l('The installation process should take only few minutes!') ?>

l('If you need help, do not hesitate to check our documentation or to contact our support team: %2$s', $this->getDocumentationLink(), $this->getPhone()) ?>

@@ -15,7 +19,7 @@ language->getIsoList() as $iso): ?>