* rewrite backup/restore
* theme changes: move plugin styles into blocks/xxx/styles.css and use new css markers for images,
move all images into new blocks/xxx/pix/ directory and use new outputlib api
+ old global $THEME is fully replaced by $OUTPUT
optional - no changes needed in older code:
/**
* Force this page to use a particular theme.
*
- * Please use this cautiously. It is only intended to be used by the themes selector
- * admin page, and theme/styles.php.
+ * Please use this cautiously. It is only intended to be used by the themes selector admin page.
*
* @param $themename the name of the theme to use.
*/
public function force_theme($themename) {
- global $PAGE, $THEME;
$this->ensure_theme_not_set();
$this->_theme = theme_config::load($themename);
- if ($this === $PAGE) {
- $THEME = $this->_theme;
- }
}
/**
*
* Make sure the right theme for this page is loaded. Tell our
* blocks_manager about the theme block regions, and then, if
- * we are $PAGE, set up the globals $THEME and $OUTPUT.
+ * we are $PAGE, set up the global $OUTPUT.
*/
public function initialise_theme_and_output() {
- global $OUTPUT, $PAGE, $SITE, $THEME;
+ global $OUTPUT, $PAGE, $SITE;
if (!empty($this->_wherethemewasinitialised)) {
return;
$this->_theme->setup_blocks($this->pagelayout, $this->blocks);
if ($this === $PAGE) {
- $THEME = $this->_theme;
$OUTPUT = $this->get_renderer('core');
}
* to change something that affects the current theme ($PAGE->course, logged in use,
* httpsrequried ... will result in an exception.)
*
+ * Please note the $OUTPUT is replacing the old global $THEME object.
+ *
* @global object $OUTPUT
* @name $OUTPUT
*/
global $OUTPUT;
-/**
- * $THEME is a global that defines the current theme.
- *
- * @global theme_config $THEME
- * @name THEME
- */
-global $THEME;
-
/**
* Shared memory cache.
* @global object $MCACHE
* theme changes: move plugin styles into mod/xxx/styles.css and use new css markers for images,
move all images into new mod/xxx/pix/ directory and use new outputlib api
move module icon to mod/xxx/pix/icon.gif
+ old global $THEME is fully replaced by $OUTPUT
optional - no changes needed in older code: