$heading = format_string($heading); // Fix for MDL-8582
- if (defined('CLI_SCRIPT')) {
+ if (CLI_SCRIPT) {
$output = $heading;
if ($return) {
return $output;
if ($id) {
$id = ' id="'.$id.'"';
}
- if (!defined('CLI_SCRIPT')) {
+ if (!CLI_SCRIPT) {
$output = "<h$size $align $class $id>".$text."</h$size>";
} else {
$output = $text;
if ($return) {
return $output;
} else {
- if (!defined('CLI_SCRIPT')) {
+ if (!CLI_SCRIPT) {
echo $output;
} else {
console_write(STDOUT,$output,'',false);
}
$message = clean_text($message);
- if (!defined('CLI_SCRIPT')) {
+ if (!CLI_SCRIPT) {
$output = '<div class="'.$style.'" style="text-align:'. $align .'">'. $message .'</div>'."\n";
} else {
if ($style === 'notifysuccess') {
return $output;
}
- if (!defined('CLI_SCRIPT')) {
+ if (!CLI_SCRIPT) {
echo $output;
} else {
console_write(STDOUT,$output,'',false);