includes/paths.php
changeset 915 91f4da84966f
parent 876 aed15c337b72
child 935 9e124177c9a4
equal deleted inserted replaced
914:f808e55fb92a 915:91f4da84966f
   425   }
   425   }
   426   
   426   
   427   function sysmsg($n)
   427   function sysmsg($n)
   428   {
   428   {
   429     global $db, $session, $paths, $template, $plugins; // Common objects
   429     global $db, $session, $paths, $template, $plugins; // Common objects
       
   430     
       
   431     // sometimes this gets called during die_semicritical()...
       
   432     if ( !is_object($db) )
       
   433       return false;
       
   434     
       
   435     if ( !@$db->_conn )
       
   436       return false;
       
   437     
   430     $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\''.$db->escape(sanitize_page_id($n)).'\' AND namespace=\'System\'');
   438     $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\''.$db->escape(sanitize_page_id($n)).'\' AND namespace=\'System\'');
   431     if( !$q )
   439     if( !$q )
   432     {
   440     {
   433       $db->_die('Error during generic selection of system page data.');
   441       $db->_die('Error during generic selection of system page data.');
   434     }
   442     }