diff -r 9d29f7e101d6 -r 8079b0288e8e includes/dbal.php --- a/includes/dbal.php Sun Aug 12 14:56:52 2007 -0400 +++ b/includes/dbal.php Tue Aug 14 15:13:40 2007 -0400 @@ -83,8 +83,17 @@ $bt = $this->latest_query; // $this->sql_backtrace(); $e = htmlspecialchars(mysql_error()); if($e=='') $e='<none>'; - if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', '
'.$t.'
Error returned by MySQL: '.$e.'
SQL Backtrace:
'.$bt.''); - else grinding_halt('Database error', '
'.$t.'
Error returned by MySQL: '.$e.'
SQL Backtrace:
'.$bt.''); + $t = ( !empty($t) ) ? $t : '<No error description provided>'; + global $email; + $email_info = ( defined('ENANO_CONFIG_FETCHED') && is_object($email) ) ? ', at <' . $email->jscode() . $email->encryptEmail(getConfig('contact_email')) . '>' : ''; + $internal_text = '
We apologize for the inconveience, but an error occurred in the Enano database layer. Please report the full text of this page to the administrator of this site' . $email_info . '.
+Description or location of error: '.$t.'
+ Error returned by MySQL extension: ' . $e . '
+ Most recent SQL query:
'.$bt.''; + if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', $internal_text); + else grinding_halt('Database error', $internal_text); exit; } @@ -101,8 +110,15 @@ $bt = $this->sql_backtrace(); $e = htmlspecialchars(mysql_error()); if($e=='') $e='<none>'; - $text = '
'.$t.'
Error returned by MySQL: '.$e.'
SQL Backtrace:
'.$bt.''; - return $text; + global $email; + $email_info = ( defined('ENANO_CONFIG_FETCHED') && is_object($email) ) ? ', at <' . $email->jscode() . $email->encryptEmail(getConfig('contact_email')) . '>' : ''; + $internal_text = '
We apologize for the inconveience, but an error occurred in the Enano database layer. Please report the full text of this page to the administrator of this site' . $email_info . '.
+Description or location of error: '.$t.'
+ Error returned by MySQL extension: ' . $e . '
+ Most recent SQL query:
'.$bt.''; + return $internal_text; } function connect() {