// Fixed phone number in installer

This commit is contained in:
Damien Metzger committed 2013-08-22 12:19:32 +02:00
1 parent f476b34139
commit 4de8013b5e
2 files changed
+10 -3

No files matched your search

+9 -2
View File
@@ -30,7 +30,7 @@ abstract class InstallControllerHttp
* @var array List of installer steps * @var array List of installer steps
*/ */
protected static $steps = array('welcome', 'license', 'system', 'configure', 'database', 'process'); protected static $steps = array('welcome', 'license', 'system', 'configure', 'database', 'process');
protected $phone;
protected static $instances = array(); protected static $instances = array();
/** /**
@@ -318,7 +318,14 @@ abstract class InstallControllerHttp
*/ */
public function getPhone() public function getPhone()
{ {
return $this->language->getInformation('phone', false); if ($this->phone === null)
{
$this->phone = $this->language->getInformation('phone', false);
if ($iframe = Tools::file_get_contents('http://api.prestashop.com/iframe/install.php?lang='.$this->language->getLanguageIso()))
if (preg_match('/<img.+alt="([^"]+)".*>/Ui', $iframe, $matches) && isset($matches[1]))
$this->phone = $matches[1];
}
return $this->phone;
} }
/** /**
+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
return array( return array(
'informations' => array( 'informations' => array(
'phone' => '+1 (888) 947-6543', 'phone' => '+34 917.872.909',
'support' => 'https://www.prestashop.com/es/support', 'support' => 'https://www.prestashop.com/es/support',
), ),
'translations' => array( 'translations' => array(