// Mobile device support

This commit is contained in:
bMancone
2012-03-13 16:35:20 +00:00
parent eb8447eb2a
commit 5581ad92d1
+7 -1
View File
@@ -359,6 +359,10 @@ class FrontControllerCore extends Controller
if ($this->context->getMobileDevice() != false) if ($this->context->getMobileDevice() != false)
$assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_;
// Add the CSS directory for mobile
if ($this->context->getMobileDevice() != false)
$assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_;
foreach ($assign_array as $assign_key => $assign_value) foreach ($assign_array as $assign_key => $assign_value)
if (substr($assign_value, 0, 1) == '/' || $protocol_content == 'https://') if (substr($assign_value, 0, 1) == '/' || $protocol_content == 'https://')
$this->context->smarty->assign($assign_key, $protocol_content.Tools::getMediaServer($assign_value).$assign_value); $this->context->smarty->assign($assign_key, $protocol_content.Tools::getMediaServer($assign_value).$assign_value);
@@ -564,7 +568,9 @@ class FrontControllerCore extends Controller
{ {
header('HTTP/1.1 503 temporarily overloaded'); header('HTTP/1.1 503 temporarily overloaded');
$this->context->smarty->assign('favicon_url', _PS_IMG_.Configuration::get('PS_FAVICON')); $this->context->smarty->assign('favicon_url', _PS_IMG_.Configuration::get('PS_FAVICON'));
$this->context->smarty->display(_PS_THEME_DIR_.'maintenance.tpl');
$template_dir = ($this->context->getMobileDevice() == true ? _PS_THEME_MOBILE_DIR_ : _PS_THEME_DIR_);
$this->context->smarty->display($template_dir.'maintenance.tpl');
exit; exit;
} }
} }