equal
deleted
inserted
replaced
81 $this->connect(); |
81 $this->connect(); |
82 } |
82 } |
83 } |
83 } |
84 |
84 |
85 function _die($t = '') { |
85 function _die($t = '') { |
86 if(defined('ENANO_HEADERS_SENT')) { |
86 if ( defined('ENANO_HEADERS_SENT') ) |
|
87 { |
87 ob_clean(); |
88 ob_clean(); |
88 } |
89 } |
89 header('HTTP/1.1 500 Internal Server Error'); |
90 |
|
91 if ( !headers_sent() ) |
|
92 header('HTTP/1.1 500 Internal Server Error'); |
|
93 |
90 $bt = $this->latest_query; // $this->sql_backtrace(); |
94 $bt = $this->latest_query; // $this->sql_backtrace(); |
91 $e = htmlspecialchars(mysql_error()); |
95 $e = htmlspecialchars(mysql_error()); |
92 if($e=='') $e='<none>'; |
96 if($e=='') $e='<none>'; |
93 $t = ( !empty($t) ) ? $t : '<No error description provided>'; |
97 $t = ( !empty($t) ) ? $t : '<No error description provided>'; |
94 global $email; |
98 global $email; |
97 <p>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 . '.</p> |
101 <p>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 . '.</p> |
98 <p>Description or location of error: '.$t.'<br /> |
102 <p>Description or location of error: '.$t.'<br /> |
99 Error returned by MySQL extension: ' . $e . '<br /> |
103 Error returned by MySQL extension: ' . $e . '<br /> |
100 Most recent SQL query:</p> |
104 Most recent SQL query:</p> |
101 <pre>'.$bt.'</pre>'; |
105 <pre>'.$bt.'</pre>'; |
|
106 if ( defined('IN_ENANO_INSTALL') && is_object(@$GLOBALS['ui']) ) |
|
107 { |
|
108 global $ui; |
|
109 echo '<h2>Database error!</h2>'; |
|
110 echo $internal_text; |
|
111 $ui->show_footer(); |
|
112 |
|
113 exit; |
|
114 } |
102 if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', $internal_text); |
115 if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', $internal_text); |
103 else grinding_halt('Database error', $internal_text); |
116 else grinding_halt('Database error', $internal_text); |
104 exit; |
117 exit; |
105 } |
118 } |
106 |
119 |