682 | | global $page; |
683 | | static $bb_latest_topics_count; |
684 | | if ( !$bb_latest_topics_count) { |
685 | | global $bbdb; |
686 | | $bb_latest_topics_count = $bbdb->get_var('SELECT COUNT(`topic_id`) FROM `' . $bbdb->topics . '` WHERE `topic_status` = 0 AND `topic_sticky` != 2;'); |
| 682 | global $page, $bb_db_override; |
| 683 | |
| 684 | if ( !$bb_db_override ) { |
| 685 | static $bb_latest_topics_count; |
| 686 | |
| 687 | if ( !$bb_latest_topics_count ) { |
| 688 | global $bbdb; |
| 689 | $bb_latest_topics_count = $bbdb->get_var('SELECT COUNT(`topic_id`) FROM `' . $bbdb->topics . '` WHERE `topic_status` = 0 AND `topic_sticky` != 2;'); |
| 690 | } |