mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url
This commit is contained in:
parent
73511be761
commit
5d3b999468
@ -232,7 +232,7 @@ function action_url($filterpath, $action) {
|
||||
function action_icon($url, $icon, $straction) {
|
||||
global $CFG;
|
||||
return '<a href="' . $url . '" title="' . $straction . '">' .
|
||||
'<img src="' . $CFG->pixpath . '/t/' . $icon . '.gif" alt="' . $straction . '" /></a> ';
|
||||
'<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" alt="' . $straction . '" /></a> ';
|
||||
}
|
||||
|
||||
function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings) {
|
||||
|
@ -215,7 +215,7 @@ function filter_user($user, $keywords, $count) {
|
||||
$user->description = '<h3>'.get_string('spamfromblog', 'report_spamcleaner').'</h3>'.$user->summary;
|
||||
unset($user->summary);
|
||||
}
|
||||
if (preg_match('#<img.*src=[\"\']('.$CFG->pixpath.')#', $user->description, $matches)
|
||||
if (preg_match('#<img.*src=[\"\']('.$CFG->wwwroot.')#', $user->description, $matches)
|
||||
&& $image_search) {
|
||||
$result = false;
|
||||
foreach ($keywords as $keyword) {
|
||||
|
@ -413,9 +413,9 @@ abstract class capability_table_with_risks extends capability_table_base {
|
||||
* get_all_risks array. Must start with 'risk'.
|
||||
*/
|
||||
function get_risk_icon($type) {
|
||||
global $CFG;
|
||||
global $OUTPUT;
|
||||
if (!isset($this->riskicons[$type])) {
|
||||
$iconurl = $CFG->pixpath . '/i/' . str_replace('risk', 'risk_', $type) . '.gif';
|
||||
$iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type));
|
||||
$this->riskicons[$type] = link_to_popup_window($this->risksurl, 'docspopup',
|
||||
'<img src="' . $iconurl . '" alt="' . get_string($type . 'short', 'admin') . '" />',
|
||||
0, 0, get_string($type, 'admin'), null, true);
|
||||
|
@ -266,12 +266,12 @@
|
||||
die;
|
||||
|
||||
function get_action_icon($url, $icon, $alt, $tooltip) {
|
||||
global $CFG;
|
||||
global $OUTPUT;
|
||||
return '<a title="' . $tooltip . '" href="'. $url . '">' .
|
||||
'<img src="' . $CFG->pixpath . '/t/' . $icon . '.gif" class="iconsmall" alt="' . $alt . '" /></a> ';
|
||||
'<img src="' . $OUTPUT->old_icon_url('t/' . $icon) . '" class="iconsmall" alt="' . $alt . '" /></a> ';
|
||||
}
|
||||
function get_spacer() {
|
||||
global $CFG;
|
||||
return '<img src="' . $CFG->pixpath . '/spacer.gif" class="iconsmall" alt="" /> ';
|
||||
global $OUTPUT;
|
||||
return '<img src="' . $OUTPUT->old_icon_url('spacer') . '" class="iconsmall" alt="" /> ';
|
||||
}
|
||||
?>
|
||||
|
@ -1501,7 +1501,7 @@ class grade_structure {
|
||||
* @return string
|
||||
*/
|
||||
public function get_hiding_icon($element, $gpr) {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
if (!has_capability('moodle/grade:manage', $this->context) and
|
||||
!has_capability('moodle/grade:hide', $this->context)) {
|
||||
@ -1529,7 +1529,7 @@ class grade_structure {
|
||||
|
||||
$url = $gpr->add_url_params($url);
|
||||
$action = '<a href="'.$url.'" class="hide"><img alt="'.s($strshow).
|
||||
'" src="'.$CFG->pixpath.'/t/'.$icon.'.gif" ' .
|
||||
'" src="'.$OUTPUT->old_icon_url('t/' . $icon) . '" ' .
|
||||
'class="iconsmall" title="'.s($tooltip).'"/></a>';
|
||||
|
||||
} else {
|
||||
|
@ -1380,7 +1380,7 @@ class grade_report_grader extends grade_report {
|
||||
* @return string HTML
|
||||
*/
|
||||
protected function get_collapsing_icon($element) {
|
||||
global $CFG;
|
||||
global $OUTPUT;
|
||||
|
||||
$contract_expand_icon = '';
|
||||
// If object is a category, display expand/contract icon
|
||||
@ -1398,7 +1398,7 @@ class grade_report_grader extends grade_report {
|
||||
$expand_contract = 'switch_whole';
|
||||
}
|
||||
$url = $this->gpr->get_return_url(null, array('target'=>$element['eid'], 'action'=>$expand_contract, 'sesskey'=>sesskey()));
|
||||
$contract_expand_icon = '<a href="'.$url.'"><img src="'.$CFG->pixpath.'/t/'.$expand_contract.'.gif" class="iconsmall" alt="'
|
||||
$contract_expand_icon = '<a href="'.$url.'"><img src="'.$OUTPUT->old_icon_url('t/' . $expand_contract) . '" class="iconsmall" alt="'
|
||||
.${'str'.$expand_contract}.'" title="'.${'str'.$expand_contract}.'" /></a>';
|
||||
}
|
||||
return $contract_expand_icon;
|
||||
|
@ -2017,8 +2017,7 @@ function cleanAttributes2($htmlArray){
|
||||
* @return string
|
||||
*/
|
||||
function replace_smilies(&$text) {
|
||||
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
if (empty($CFG->emoticons)) { /// No emoticons defined, nothing to process here
|
||||
return;
|
||||
@ -2048,7 +2047,7 @@ function replace_smilies(&$text) {
|
||||
$alttext = get_string($image, 'pix');
|
||||
$alttext = preg_replace('/^\[\[(.*)\]\]$/', '$1', $alttext); /// Clean alttext in case there isn't lang string for it.
|
||||
$e[$lang][] = $emoticon;
|
||||
$img[$lang][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $CFG->pixpath .'/s/'. $image .'.gif" />';
|
||||
$img[$lang][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $OUTPUT->old_icon_url('s/' . $image) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
@ -5494,7 +5493,7 @@ function print_location_comment($file, $line, $return = false)
|
||||
*
|
||||
*/
|
||||
function print_arrow($direction='up', $strsort=null, $return=false) {
|
||||
global $CFG;
|
||||
global $OUTPUT;
|
||||
|
||||
if (!in_array($direction, array('up', 'down', 'right', 'left', 'move'))) {
|
||||
return null;
|
||||
@ -5523,7 +5522,7 @@ function print_arrow($direction='up', $strsort=null, $return=false) {
|
||||
$strsort = get_string('sort' . $sortdir, 'grades');
|
||||
}
|
||||
|
||||
$return = ' <img src="'.$CFG->pixpath.'/t/' . $direction . '.gif" alt="'.$strsort.'" /> ';
|
||||
$return = ' <img src="'.$OUTPUT->old_icon_url('t/' . $direction) . '" alt="'.$strsort.'" /> ';
|
||||
|
||||
if ($return) {
|
||||
return $return;
|
||||
|
@ -905,7 +905,7 @@ function quiz_print_randomquestion_reordertool(&$question, &$pageurl, &$quiz) {
|
||||
* @param $question the random question.
|
||||
*/
|
||||
function print_random_option_icon($question) {
|
||||
global $CFG;
|
||||
global $OUTPUT;
|
||||
if (!empty($question->questiontext)) {
|
||||
$icon = 'withsubcat';
|
||||
$tooltip = get_string('randomwithsubcat', 'quiz');
|
||||
@ -913,7 +913,7 @@ function print_random_option_icon($question) {
|
||||
$icon = 'nosubcat';
|
||||
$tooltip = get_string('randomnosubcat', 'quiz');
|
||||
}
|
||||
echo '<img src="' . $CFG->pixpath . '/i/' . $icon . '.png" alt="' .
|
||||
echo '<img src="' . $OUTPUT->old_icon_url('i/' . $icon) . '" alt="' .
|
||||
$tooltip . '" title="' . $tooltip . '" class="uihint" />';
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user