// Installer optimization
This commit is contained in:
@@ -321,13 +321,16 @@ abstract class InstallControllerHttp
|
||||
*/
|
||||
public function getPhone()
|
||||
{
|
||||
if (InstallSession::getInstance()->support_phone != null)
|
||||
return InstallSession::getInstance()->support_phone;
|
||||
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 ($iframe = Tools::file_get_contents('http://api.prestashop.com/iframe/install.php?lang='.$this->language->getLanguageIso(), false, null, 3))
|
||||
if (preg_match('/<img.+alt="([^"]+)".*>/Ui', $iframe, $matches) && isset($matches[1]))
|
||||
$this->phone = $matches[1];
|
||||
}
|
||||
InstallSession::getInstance()->support_phone = $this->phone;
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user