// Fixed sessions/cookies

// Added support iframe
This commit is contained in:
Damien Metzger committed 2013-06-24 11:51:36 +02:00
1 parent 6955594290
commit 5335820915
3 files changed
+20 -9

No files matched your search

+6 -2
View File
@@ -43,13 +43,17 @@ class InstallSession
public function __construct() public function __construct()
{ {
session_name('install_'.md5(__PS_BASE_URI__)); session_name('install_'.md5(__PS_BASE_URI__));
if (!session_start() if (!($session_started = session_start())
|| (!isset($_SESSION['session_mode']) && (isset($_POST['submitNext']) || isset($_POST['submitPrevious']) || isset($_POST['language'])))) || (!isset($_SESSION['session_mode']) && (isset($_POST['submitNext']) || isset($_POST['submitPrevious']) || isset($_POST['language']))))
{ {
InstallSession::$_cookie_mode = true; InstallSession::$_cookie_mode = true;
InstallSession::$_cookie = new Cookie('ps_install', null, time() + 7200, null, true); InstallSession::$_cookie = new Cookie('ps_install', null, time() + 7200, null, true);
} }
$_SESSION['session_mode'] = 'session'; if ($session_started && !isset($_SESSION['session_mode']))
{
$_SESSION['session_mode'] = 'session';
session_write_close();
}
} }
public function clean() public function clean()
+6 -7
View File
@@ -43,12 +43,11 @@ a {cursor:pointer;}
width:990px; width:990px;
background :#fff; background :#fff;
} }
#header { #header {
padding:6px 16px 16px 16px; padding:6px 16px 16px 16px;
height:68px;/* 90 */ height:50px;
background:#394049; background:#394049;
} }
#loaderSpace{ #loaderSpace{
display:none; display:none;
z-index: 100; z-index: 100;
@@ -407,7 +406,7 @@ ul#footer a:link, ul#footer a:active, ul#footer a:visited {
} }
.sheet .contentTitle { .sheet .contentTitle {
position:absolute; position:absolute;
top:90px; top:72px;
left:0; left:0;
padding:15px 25px 10px 38px; padding:15px 25px 10px 38px;
height:28px;/* 53 */ height:28px;/* 53 */
+8
View File
@@ -39,11 +39,13 @@
<li class="lnk_forum"><a href="<?php echo $this->getSupportLink() ?>" target="_blank"><?php echo $this->l('Support') ?></a></li> <li class="lnk_forum"><a href="<?php echo $this->getSupportLink() ?>" target="_blank"><?php echo $this->l('Support') ?></a></li>
<li class="lnk_forum"><a href="<?php echo $this->getDocumentationLink() ?>" target="_blank"><?php echo $this->l('Documentation') ?></a></li> <li class="lnk_forum"><a href="<?php echo $this->getDocumentationLink() ?>" target="_blank"><?php echo $this->l('Documentation') ?></a></li>
<li class="lnk_blog last"><a href="<?php echo $this->getBlogLink() ?>" target="_blank"><?php echo $this->l('Blog') ?></a></li> <li class="lnk_blog last"><a href="<?php echo $this->getBlogLink() ?>" target="_blank"><?php echo $this->l('Blog') ?></a></li>
<!--
<?php if ($this->getPhone()): ?> <?php if ($this->getPhone()): ?>
<li id="phone_block" class="last"> <li id="phone_block" class="last">
<div><span><?php echo $this->l('Contact us!') ?></span><br /><?php echo $this->getPhone() ?></div> <div><span><?php echo $this->l('Contact us!') ?></span><br /><?php echo $this->getPhone() ?></div>
</li> </li>
<?php endif; ?> <?php endif; ?>
-->
</ul> </ul>
<div id="PrestaShopLogo">PrestaShop</div> <div id="PrestaShopLogo">PrestaShop</div>
@@ -69,6 +71,12 @@
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</ol> </ol>
<?php if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3)): ?>
<iframe scrolling="no" style="height:200px;width:160px;border:none;margin-top:20px"
src="https://api.prestashop.com/iframe/install.php?step=<?php echo $this->step ?>&lang=<?php echo $this->language->getLanguageIso() ?>&country=<?php echo $this->session->shop_country ?>">
<p><?php echo $this->l('Contact us!') ?><br /><?php echo $this->getPhone() ?></p>
</iframe>
<?php endif; ?>
</div> </div>
<!-- Page content --> <!-- Page content -->