From fbd0c5e31f14c62c0d3731493888eeb096c93f86 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 10 Jan 2009 19:46:02 +0000 Subject: [PATCH] MDL-17848 general support for CLI scripts in weblib; grrr - fixed regression --- lib/weblib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index bfc8343528..bedfb5d504 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2243,7 +2243,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $heading = format_string($heading); // Fix for MDL-8582 - if (defined('CLI_SCRIPT')) { + if (CLI_SCRIPT) { $output = $heading; if ($return) { return $output; @@ -3828,7 +3828,7 @@ function print_heading($text, $align='', $size=2, $class='main', $return=false, if ($id) { $id = ' id="'.$id.'"'; } - if (!defined('CLI_SCRIPT')) { + if (!CLI_SCRIPT) { $output = "".$text.""; } else { $output = $text; @@ -3842,7 +3842,7 @@ function print_heading($text, $align='', $size=2, $class='main', $return=false, if ($return) { return $output; } else { - if (!defined('CLI_SCRIPT')) { + if (!CLI_SCRIPT) { echo $output; } else { console_write(STDOUT,$output,'',false); @@ -6193,7 +6193,7 @@ function notify($message, $style='notifyproblem', $align='center', $return=false } $message = clean_text($message); - if (!defined('CLI_SCRIPT')) { + if (!CLI_SCRIPT) { $output = '
'. $message .'
'."\n"; } else { if ($style === 'notifysuccess') { @@ -6207,7 +6207,7 @@ function notify($message, $style='notifyproblem', $align='center', $return=false return $output; } - if (!defined('CLI_SCRIPT')) { + if (!CLI_SCRIPT) { echo $output; } else { console_write(STDOUT,$output,'',false); -- 2.39.5