Commit 4a5c9aab by Scott

Move text direction to $qa_content array

parent f6f9c07d
...@@ -1806,7 +1806,7 @@ ...@@ -1806,7 +1806,7 @@
// Finally, instantiate the object // Finally, instantiate the object
$themeclass=new $classname($template, $content, $themeroothtml, $request, qa_opt('site_text_direction')); $themeclass=new $classname($template, $content, $themeroothtml, $request);
return $themeclass; return $themeclass;
} }
......
...@@ -479,9 +479,10 @@ ...@@ -479,9 +479,10 @@
$qa_content=array( $qa_content=array(
'content_type' => 'text/html; charset='.$charset, 'content_type' => 'text/html; charset='.$charset,
'charset' => $charset, 'charset' => $charset,
'direction' => qa_opt('site_text_direction'),
'site_title' => qa_html(qa_opt('site_title')), 'site_title' => qa_html(qa_opt('site_title')),
'head_lines' => array(), 'head_lines' => array(),
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
protected $ranking_block_layout = false; protected $ranking_block_layout = false;
public function __construct($template, $content, $rooturl, $request, $textdir='ltr') public function __construct($template, $content, $rooturl, $request)
/* /*
Initialize the object and assign local variables Initialize the object and assign local variables
*/ */
...@@ -62,16 +62,17 @@ ...@@ -62,16 +62,17 @@
$this->content = $content; $this->content = $content;
$this->rooturl = $rooturl; $this->rooturl = $rooturl;
$this->request = $request; $this->request = $request;
$this->isRTL = $textdir === 'rtl';
$this->isRTL = isset($content['direction']) && $content['direction'] === 'rtl';
} }
/** /**
* @deprecated PHP4-style constructor deprecated from 1.7; please use proper `__construct` * @deprecated PHP4-style constructor deprecated from 1.7; please use proper `__construct`
* function instead. * function instead.
*/ */
public function qa_html_theme_base($template, $content, $rooturl, $request, $textdir='ltr') public function qa_html_theme_base($template, $content, $rooturl, $request)
{ {
self::__construct($template, $content, $rooturl, $request, $textdir); self::__construct($template, $content, $rooturl, $request);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment