# HG changeset patch # User Dan # Date 1204854771 18000 # Node ID 192db6ac195b6fdd4784c98ca3a44d508d38d485 # Parent 376a01d8386de9e8dfaa56fabf2d4a69dac2e494 Added $no_wrapper parameter to die_semicritical, useful for some upcoming PageProcessor tweaks. diff -r 376a01d8386d -r 192db6ac195b includes/functions.php --- a/includes/functions.php Thu Mar 06 20:48:20 2008 -0500 +++ b/includes/functions.php Thu Mar 06 20:52:51 2008 -0500 @@ -540,9 +540,10 @@ * description. * @param string The title of the error message * @param string The body of the message, this can be HTML, and should be separated into paragraphs using the

tag + * @param bool Added in 1.1.3. If true, only the error is output. Defaults to false. */ -function die_semicritical($t, $p) +function die_semicritical($t, $p, $no_wrapper = false) { global $db, $session, $paths, $template, $plugins; // Common objects $db->close(); @@ -550,6 +551,13 @@ if ( ob_get_status() ) ob_end_clean(); + if ( $no_wrapper ) + { + echo '

' . htmlspecialchars($t) . '

'; + echo "

$p

"; + exit; + } + $tpl = new template_nodb(); $tpl->load_theme('oxygen', 'bleu'); $tpl->tpl_strings['SITE_NAME'] = getConfig('site_name');