diff -ruN moodle-1.7/course/search.php moodle-dev/course/search.php
--- moodle-1.7/course/search.php 2006-09-27 03:00:50.000000000 +0100
+++ moodle-dev/course/search.php 2006-10-02 16:53:48.000000000 +0100
@@ -176,7 +176,7 @@
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {
- $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
+ $pixpath = "$CFG->themedir/$CFG->theme/pix";
}
echo "wwwroot/course/edit.php?id=$course->id\">
";
diff -ruN moodle-1.7/lib/moodlelib.php moodle-dev/lib/moodlelib.php
--- moodle-1.7/lib/moodlelib.php 2006-09-28 03:02:05.000000000 +0100
+++ moodle-dev/lib/moodlelib.php 2006-10-02 17:27:02.000000000 +0100
@@ -4653,11 +4653,11 @@
}
foreach ($themelist as $key => $theme) {
- if (!file_exists("$CFG->dirroot/theme/$theme/config.php")) { // bad folder
+ if (!file_exists("$CFG->themedir/$theme/config.php")) { // bad folder
continue;
}
unset($THEME); // Note this is not the global one!! :-)
- include("$CFG->dirroot/theme/$theme/config.php");
+ include("$CFG->themedir/$theme/config.php");
if (!isset($THEME->sheets)) { // Not a valid 1.5 theme
continue;
}
@@ -5110,10 +5110,21 @@
$plugins = array();
if (empty($basedir)) {
- $basedir = $CFG->dirroot .'/'. $plugin;
+
+ # This switch allows us to use the appropiate theme directory - and potentialy alternatives for other plugins
+ switch ($plugin) {
+ case "theme":
+ $basedir = $CFG->themedir;
+ break;
+
+ default:
+ $basedir = $CFG->dirroot .'/'. $plugin;
+ }
+
} else {
$basedir = $basedir .'/'. $plugin;
}
+
if (file_exists($basedir) && filetype($basedir) == 'dir') {
$dirhandle = opendir($basedir);
while (false !== ($dir = readdir($dirhandle))) {
@@ -5961,8 +5972,10 @@
if (!empty($CFG->loginhttps)) {
$HTTPSPAGEREQUIRED = true;
$CFG->httpswwwroot = str_replace('http:', 'https:', $CFG->wwwroot);
+ $CFG->httpsthemewww = str_replace('http:', 'https:', $CFG->themewww);
} else {
$CFG->httpswwwroot = $CFG->wwwroot;
+ $CFG->httpsthemewww = $CFG->themewww;
}
}
diff -ruN moodle-1.7/theme/chameleon/footer.html moodle-dev/theme/chameleon/footer.html
--- moodle-1.7/theme/chameleon/footer.html 2006-03-06 02:01:40.000000000 +0000
+++ moodle-dev/theme/chameleon/footer.html 2006-10-02 17:09:31.000000000 +0100
@@ -14,9 +14,9 @@
-
+
diff -ruN moodle-1.7/theme/chameleon/header.html moodle-dev/theme/chameleon/header.html
--- moodle-1.7/theme/chameleon/header.html 2006-04-24 03:01:33.000000000 +0100
+++ moodle-dev/theme/chameleon/header.html 2006-10-02 17:10:08.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/chameleon/ui/chameleon.php moodle-dev/theme/chameleon/ui/chameleon.php
--- moodle-1.7/theme/chameleon/ui/chameleon.php 2006-09-20 03:02:20.000000000 +0100
+++ moodle-dev/theme/chameleon/ui/chameleon.php 2006-10-02 17:08:17.000000000 +0100
@@ -20,11 +20,11 @@
$chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : current_theme();
?>
-
+
-
-
-
+
+
+
- ?>/images/moodlelogo.gif)
+ ?>/images/moodlelogo.gif)
diff -ruN moodle-1.7/theme/cornflower/header.html moodle-dev/theme/cornflower/header.html
--- moodle-1.7/theme/cornflower/header.html 2006-07-07 03:01:28.000000000 +0100
+++ moodle-dev/theme/cornflower/header.html 2006-10-02 17:05:09.000000000 +0100
@@ -4,11 +4,11 @@
-
+
javascript"); ?>
-
-
+
@@ -44,7 +44,7 @@
-
+
|
|
diff -ruN moodle-1.7/theme/formal_white/header.html moodle-dev/theme/formal_white/header.html
--- moodle-1.7/theme/formal_white/header.html 2006-07-07 03:01:28.000000000 +0100
+++ moodle-dev/theme/formal_white/header.html 2006-10-02 17:11:46.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
@@ -21,13 +21,13 @@
if ($home) { // This is what gets printed on the home page only
?>
@@ -42,4 +42,4 @@
-
\ No newline at end of file
+
diff -ruN moodle-1.7/theme/index.php moodle-dev/theme/index.php
--- moodle-1.7/theme/index.php 2006-09-15 03:01:26.000000000 +0100
+++ moodle-dev/theme/index.php 2006-10-02 17:53:10.000000000 +0100
@@ -23,7 +23,7 @@
if ($choose and confirm_sesskey()) {
- if (!is_dir($choose)) {
+ if (!is_dir($CFG->themedir . $choose)) {
error("This theme is not installed!");
}
if (set_config("theme", $choose)) {
@@ -76,10 +76,10 @@
if (file_exists("$theme/README.html")) {
$readme = ' '.
- link_to_popup_window('/theme/'.$theme.'/README.html', $theme, $strinfo, 400, 500, '', 'none', true).'';
+ link_to_popup_window($CFG->themewww . $theme .'/README.html', $theme, $strinfo, 400, 500, '', 'none', true).'';
} else if (file_exists("$theme/README.txt")) {
$readme = ''.
- link_to_popup_window('/theme/'.$theme.'/README.txt', $theme, $strinfo, 400, 500, '', 'none', true).'';
+ link_to_popup_window($CFG->themewww . $theme .'/README.txt', $theme, $strinfo, 400, 500, '', 'none', true).'';
}
if (file_exists("$theme/screenshot.png")) {
$screenshotpath = "$theme/screenshot.png";
diff -ruN moodle-1.7/theme/metal/header.html moodle-dev/theme/metal/header.html
--- moodle-1.7/theme/metal/header.html 2005-11-14 02:01:37.000000000 +0000
+++ moodle-dev/theme/metal/header.html 2006-10-02 17:06:14.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/oceanblue/header.html moodle-dev/theme/oceanblue/header.html
--- moodle-1.7/theme/oceanblue/header.html 2006-06-20 03:01:10.000000000 +0100
+++ moodle-dev/theme/oceanblue/header.html 2006-10-02 17:12:53.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/orangewhite/header.html moodle-dev/theme/orangewhite/header.html
--- moodle-1.7/theme/orangewhite/header.html 2006-04-24 03:01:33.000000000 +0100
+++ moodle-dev/theme/orangewhite/header.html 2006-10-02 17:12:18.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
@@ -41,4 +41,4 @@
-
\ No newline at end of file
+
diff -ruN moodle-1.7/theme/orangewhitepda/header.html moodle-dev/theme/orangewhitepda/header.html
--- moodle-1.7/theme/orangewhitepda/header.html 2006-04-24 03:01:34.000000000 +0100
+++ moodle-dev/theme/orangewhitepda/header.html 2006-10-02 17:10:39.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/preview.php moodle-dev/theme/preview.php
--- moodle-1.7/theme/preview.php 2006-09-11 03:26:02.000000000 +0100
+++ moodle-dev/theme/preview.php 2006-10-02 17:50:29.000000000 +0100
@@ -4,7 +4,7 @@
$preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
- if (!file_exists($preview)) {
+ if (!file_exists($CFG->themedir . $preview)) {
$preview = 'standard';
}
diff -ruN moodle-1.7/theme/standard/header.html moodle-dev/theme/standard/header.html
--- moodle-1.7/theme/standard/header.html 2006-04-09 03:04:58.000000000 +0100
+++ moodle-dev/theme/standard/header.html 2006-10-02 17:15:37.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/standardblue/header.html moodle-dev/theme/standardblue/header.html
--- moodle-1.7/theme/standardblue/header.html 2005-11-14 02:01:37.000000000 +0000
+++ moodle-dev/theme/standardblue/header.html 2006-10-02 17:13:22.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/standardgreen/header.html moodle-dev/theme/standardgreen/header.html
--- moodle-1.7/theme/standardgreen/header.html 2005-11-14 02:01:37.000000000 +0000
+++ moodle-dev/theme/standardgreen/header.html 2006-10-02 17:16:04.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/standardlogo/header.html moodle-dev/theme/standardlogo/header.html
--- moodle-1.7/theme/standardlogo/header.html 2006-07-07 03:01:28.000000000 +0100
+++ moodle-dev/theme/standardlogo/header.html 2006-10-02 17:14:28.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
@@ -35,7 +35,7 @@
$standardlogo = $CFG->httpswwwroot.'/file.php/1/logo.gif';
}
} else {
- $standardlogo = $CFG->httpswwwroot.'/theme/'.current_theme().'/logo.gif';
+ $standardlogo = $CFG->httpsthemewww . current_theme().'/logo.gif';
}
//Accessibility: warning: ALT text will need editing if logo changes. 'headermain' is now H1.
diff -ruN moodle-1.7/theme/standardred/header.html moodle-dev/theme/standardred/header.html
--- moodle-1.7/theme/standardred/header.html 2005-11-14 02:01:37.000000000 +0000
+++ moodle-dev/theme/standardred/header.html 2006-10-02 17:19:09.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/standardwhite/header.html moodle-dev/theme/standardwhite/header.html
--- moodle-1.7/theme/standardwhite/header.html 2006-05-03 03:01:54.000000000 +0100
+++ moodle-dev/theme/standardwhite/header.html 2006-10-02 17:06:36.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
diff -ruN moodle-1.7/theme/wood/header.html moodle-dev/theme/wood/header.html
--- moodle-1.7/theme/wood/header.html 2005-11-14 02:01:37.000000000 +0000
+++ moodle-dev/theme/wood/header.html 2006-10-02 17:30:25.000000000 +0100
@@ -4,7 +4,7 @@
-
+
javascript"); ?>
| |