Skip to content

Commit

Permalink
[*] LO: Make Prestashop RTL readey!
Browse files Browse the repository at this point in the history
  • Loading branch information
Danoosh committed Mar 14, 2014
1 parent fa8ac2c commit 7d55311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ public static function getJSPath($js_uri)
*/
public static function getCSSPath($css_uri, $css_media_type = 'all', $need_rtl = true)
{
// RTL Ready: search and load rtl css file if it's not originally rtl or not needed
// RTL Ready: search and load rtl css file if it's not originally rtl
if($need_rtl && Context::getContext()->language->is_rtl)
{
$css_uri_rtl = Tools::str_replace_once('.css', '_rtl.css', $css_uri);
$css_uri_rtl = preg_replace('/(^[^.].*)(\.css)$/', '$1_rtl.css', $css_uri);
$rtl_media = Media::getMediaPath($css_uri_rtl, $css_media_type);
if($rtl_media != false)
return $rtl_media;
Expand Down
2 changes: 1 addition & 1 deletion classes/pdf/PDFGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class PDFGeneratorCore extends TCPDF

public function __construct($use_cache = false)
{
$this->setRTL(Context::getContext()->language->is_rtl);
parent::__construct('P', 'mm', 'A4', true, 'UTF-8', $use_cache, false);
$this->setRTL(Context::getContext()->language->is_rtl);
}

/**
Expand Down

0 comments on commit 7d55311

Please sign in to comment.