includes/functions.php
changeset 1092 3b97242ada21
parent 1081 745200a9cc2a
child 1099 73abd46f5148
equal deleted inserted replaced
1091:bb8e04f74819 1092:3b97242ada21
   563       // overridden token matches, continue exec
   563       // overridden token matches, continue exec
   564       return true;
   564       return true;
   565     }
   565     }
   566   }
   566   }
   567   
   567   
   568   ob_end_clean();
   568   @ob_end_clean();
   569   
   569   
   570   $output->set_title($lang->get('user_csrf_confirm_title'));
   570   $output->set_title($lang->get('user_csrf_confirm_title'));
   571   $output->header();
   571   $output->header();
   572   
   572   
   573   // initial info
   573   // initial info
   846 function die_semicritical($t, $p, $no_wrapper = false)
   846 function die_semicritical($t, $p, $no_wrapper = false)
   847 {
   847 {
   848   global $db, $session, $paths, $template, $plugins; // Common objects
   848   global $db, $session, $paths, $template, $plugins; // Common objects
   849   $db->close();
   849   $db->close();
   850   
   850   
   851   if ( ob_get_status() )
   851   if ( @ob_get_status() )
   852     ob_end_clean();
   852     ob_end_clean();
   853 
   853 
   854   // If the config hasn't been fetched yet, call grinding_halt.
   854   // If the config hasn't been fetched yet, call grinding_halt.
   855   if ( !defined('ENANO_CONFIG_FETCHED') )
   855   if ( !defined('ENANO_CONFIG_FETCHED') )
   856   {
   856   {
   887 
   887 
   888 function die_friendly($t, $p)
   888 function die_friendly($t, $p)
   889 {
   889 {
   890   global $db, $session, $paths, $template, $plugins; // Common objects
   890   global $db, $session, $paths, $template, $plugins; // Common objects
   891 
   891 
   892   if ( ob_get_status() )
   892   if ( @ob_get_status() )
   893     ob_end_clean();
   893     ob_end_clean();
   894 
   894 
   895   $paths->cpage['name'] = $t;
   895   $paths->cpage['name'] = $t;
   896   $template->tpl_strings['PAGE_NAME'] = $t;
   896   $template->tpl_strings['PAGE_NAME'] = $t;
   897   $template->header();
   897   $template->header();
   916     require( ENANO_ROOT . '/config.php' );
   916     require( ENANO_ROOT . '/config.php' );
   917 
   917 
   918   if ( is_object($db) )
   918   if ( is_object($db) )
   919     $db->close();
   919     $db->close();
   920   
   920   
   921   if ( ob_get_status() )
   921   if ( @ob_get_status() )
   922     ob_end_clean();
   922     ob_end_clean();
   923   
   923   
   924   if ( defined('ENANO_CLI') )
   924   if ( defined('ENANO_CLI') )
   925   {
   925   {
   926     // set console color
   926     // set console color