$course = get_site();
$homelink = '<div class="sitelink">'.
'<a title="moodle '. $CFG->release .' ('. $CFG->version .')" href="http://moodle.org/">'.
- '<br /><img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
+ '<img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
$home = true;
} else {
$homelink = '<div class="homelink"><a '.$CFG->frametarget.' href="'.$CFG->wwwroot.
* @param int $lifetime ?
* @param string $thename ?
*/
-function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $forceconfig='', $lang='') {
+function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $forceconfig='', $lang='', $langdir='') {
global $CFG, $THEME;
}
}
-
+ $oppositlangdir = ($langdir == 'rtl') ? '_ltr' : '_rtl';
+
if ($files) {
/// Produce a list of all the files first
echo '/**************************************'."\n";
echo ' * THEME NAME: '.$themename."\n *\n";
echo ' * Files included in this sheet:'."\n *\n";
foreach ($files as $file) {
+ if (strstr($file[1], $oppositlangdir)) continue;
echo ' * '.$file[1]."\n";
}
echo ' **************************************/'."\n\n";
/// Actually collect all the files in order.
$css = '';
foreach ($files as $file) {
+ if (strstr($file[1], $oppositlangdir)) continue;
$css .= '/***** '.$file[1].' start *****/'."\n\n";
$css .= file_get_contents($file[0].'/'.$file[1]);
$ccs .= '/***** '.$file[1].' end *****/'."\n\n";
/// Actually output all the files in order.
if (empty($CFG->CSSEdit) && empty($THEME->CSSEdit)) {
foreach ($files as $file) {
+ if (strstr($file[1], $oppositlangdir)) continue;
echo '/***** '.$file[1].' start *****/'."\n\n";
@include_once($file[0].'/'.$file[1]);
echo '/***** '.$file[1].' end *****/'."\n\n";
}
} else {
foreach ($files as $file) {
+ if (strstr($file[1], $oppositlangdir)) continue;
echo '/* @group '.$file[1].' */'."\n\n";
if (strstr($file[1], '.css') !== FALSE) {
echo '@import url("'.$CFG->themewww.'/'.$file[1].'");'."\n\n";
if (!$params) {
$params = array();
}
+
+/// Add parameter for the language direction
+ $params[] = 'langdir='.get_string('thisdirection');
+
if ($theme != $CFG->theme) {
$params[] = 'forceconfig='.$theme;
}
$params[] = 'lang='.current_language();
}
+
/// Convert params to string
if ($params) {
$paramstring = '?'.implode('&', $params);