mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-21125 obsoleting global $THEME
This commit is contained in:
parent
92e01ab771
commit
088ccb43cf
@ -129,15 +129,9 @@ class mediaplugin_filter extends moodle_text_filter {
|
||||
/// callback filter functions
|
||||
|
||||
function mediaplugin_filter_mp3_callback($link) {
|
||||
global $CFG, $THEME, $PAGE;
|
||||
global $CFG, $OUTPUT, $PAGE;
|
||||
|
||||
if (!empty($THEME->filter_mediaplugin_colors)) {
|
||||
$c = $THEME->filter_mediaplugin_colors; // You can set this up in your theme/xxx/config.php
|
||||
} else {
|
||||
$c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'waitForPlay=yes';
|
||||
}
|
||||
$c = $OUTPUT->filter_mediaplugin_colors(); // You can set this up in your theme/xxx/config.php
|
||||
|
||||
static $count = 0;
|
||||
$count++;
|
||||
|
@ -2137,6 +2137,22 @@ class core_renderer extends renderer_base {
|
||||
public function larrow() {
|
||||
return $this->page->theme->larrow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colours of the small MP3 player
|
||||
* @return string
|
||||
*/
|
||||
public function filter_mediaplugin_colors() {
|
||||
return $this->page->theme->filter_mediaplugin_colors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colours of the big MP3 player
|
||||
* @return string
|
||||
*/
|
||||
public function resource_mp3player_colors() {
|
||||
return $this->page->theme->resource_mp3player_colors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,15 +136,10 @@ function resourcelib_embed_image($fullurl, $title) {
|
||||
* @return string html
|
||||
*/
|
||||
function resourcelib_embed_mp3($fullurl, $title, $clicktoopen) {
|
||||
global $CFG, $THEME, $PAGE;
|
||||
global $CFG, $OUTPUT, $PAGE;
|
||||
|
||||
$c = $OUTPUT->resource_mp3player_colors(); // You can set this up in your theme/xxx/config.php
|
||||
|
||||
if (!empty($THEME->resource_mp3player_colors)) {
|
||||
$c = $THEME->resource_mp3player_colors; // You can set this up in your theme/xxx/config.php
|
||||
} else {
|
||||
$c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
|
||||
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
|
||||
'font=Arial&fontColour=FF33FF&buffer=10&waitForPlay=no&autoPlay=yes';
|
||||
}
|
||||
$c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource');
|
||||
$id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache
|
||||
|
||||
|
@ -1251,13 +1251,9 @@ function hotpot_get_recent_mod_activity(&$activities, &$index, $sincetime, $cour
|
||||
*/
|
||||
function hotpot_print_recent_mod_activity($activity, $course, $detail=false) {
|
||||
|
||||
global $CFG, $THEME, $USER, $OUTPUT;
|
||||
global $CFG, $USER, $OUTPUT;
|
||||
|
||||
if (isset($THEME->cellcontent2)) {
|
||||
$bgcolor = ' bgcolor="'.$THEME->cellcontent2.'"';
|
||||
} else {
|
||||
$bgcolor = '';
|
||||
}
|
||||
$bgcolor = '';
|
||||
|
||||
print '<table border="0" cellpadding="3" cellspacing="0">';
|
||||
|
||||
|
@ -11,17 +11,13 @@
|
||||
/// courseid and the text to be filtered (in HTML form).
|
||||
|
||||
function hotpot_mediaplayer_moodle(&$hotpot, $text) {
|
||||
global $CFG, $THEME;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
if ($CFG->filter_mediaplugin_enable_mp3) {
|
||||
static $c;
|
||||
|
||||
if (empty($c)) {
|
||||
if (!empty($THEME->filter_mediaplugin_colors)) {
|
||||
$c = $THEME->filter_mediaplugin_colors; // You can set this up in your theme/xxx/config.php
|
||||
} else {
|
||||
$c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&waitForPlay=yes&';
|
||||
}
|
||||
$c = $OUTPUT->filter_mediaplugin_colors(); // You can set this up in your theme/xxx/config.php
|
||||
}
|
||||
// $c = htmlentities($c); // Commented out pending bug 5223
|
||||
$search = '/<a(.*?)href=\"([^<]+)\.mp3\"([^>]*)>(.*?)<\/a>/is';
|
||||
|
Loading…
x
Reference in New Issue
Block a user