Commit 741467b4 authored by Erick Hitter's avatar Erick Hitter
Browse files

Not everyone uses HyperDB or some other master-slave arrangement

parent 116760c1
......@@ -543,10 +543,16 @@ class Events_Store extends Singleton {
// Skip count if already performed
if ( $count_first ) {
$srtm = $wpdb->srtm;
$wpdb->srtm = true;
if ( property_exists( $wpdb, 'srtm' ) ) {
$srtm = $wpdb->srtm;
$wpdb->srtm = true;
}
$count = $this->count_events_by_status( self::STATUS_COMPLETED );
$wpdb->srtm = $srtm;
if ( isset( $srtm ) ) {
$wpdb->srtm = $srtm;
}
} else {
$count = 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment