// 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:
@@ -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}
|
||||
*
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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/',
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
<div class="warnBlock"><?php echo $this->l('PrestaShop requires at least 16M of memory to run, please check the memory_limit directive in php.ini or contact your host provider'); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->can_upgrade): ?>
|
||||
<div class="warnBlock"><?php echo $this->l('You already have PrestaShop version %1$s installed. If you want to upgrade to the latest version please read our documentation : <a href="%2$s">%2$s</a>', $this->ps_version, $this->getDocumentationUpgradeLink()) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->l('Welcome to the PrestaShop %s Installer.', _PS_INSTALL_VERSION_) ?></h2>
|
||||
<p><?php echo $this->l('The installation process should take only few minutes!') ?></p>
|
||||
<p><?php echo $this->l('If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s', $this->getDocumentationLink(), $this->getPhone()) ?></p>
|
||||
@@ -15,7 +19,7 @@
|
||||
<?php foreach ($this->language->getIsoList() as $iso): ?>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" value="<?php echo $iso ?>" <?php echo ($iso == $this->language->getLanguageIso()) ? "checked=\"checked\"" : '' ?> name="language" style="vertical-align: middle; margin-right: 0;" />
|
||||
<input type="radio" value="<?php echo $iso ?>" <?php echo ($iso == $this->language->getLanguageIso()) ? 'checked="checked"' : '' ?> name="language" style="vertical-align: middle; margin-right: 0;" />
|
||||
<?php if (file_exists(_PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg')): ?>
|
||||
<img src="langs/<?php echo $iso ?>/flag.jpg" alt="<?php echo $iso ?>" style="vertical-align: middle;" />
|
||||
<?php else: ?>
|
||||
|
||||
Reference in New Issue
Block a user