Don't cache pages with DB errors.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-11-19 02:18:23 +00:00
parent 88efcfd20d
commit f4dcbb2a3b
2 changed files with 5 additions and 2 deletions

View File

@ -67,6 +67,9 @@ function StaticizeCallback($buffer) {
return $buffer;
endif;
if ( strstr($buffer, 'wpdberror') )
return $buffer;
$fr = fopen(CACHE_PATH . $staticFileName, 'a');
chmod(CACHE_PATH . $staticFileName, 0666);
if (!$fr)
@ -141,7 +144,7 @@ function staticize_header() {
}
}
if(function_exists('add_action')) {
if( function_exists('add_action') ) {
StaticizeInit();
add_action('publish_post', 'postChange', 0);

View File

@ -93,7 +93,7 @@ class wpdb {
if ( $this->show_errors ) {
// If there is an error then take note of it
print "<div id='error'>
<p><strong>Database error:</strong> [$str]<br />
<p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br />
<code>$this->last_query</code></p>
</div>";
} else {