diff --git a/upload/includes/datastore/build_cat_forums.php b/upload/includes/datastore/build_cat_forums.php index 53eec0366..74c903bb4 100644 --- a/upload/includes/datastore/build_cat_forums.php +++ b/upload/includes/datastore/build_cat_forums.php @@ -144,10 +144,10 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum // // Ads // -$ad_html = $ad_block_assignment = array(); - if ($bb_cfg['show_ads']) { + $ad_html = $ad_block_assignment = array(); + $active_ads = DB()->fetch_rowset(" SELECT * FROM ". BB_ADS ." @@ -168,7 +168,6 @@ if ($bb_cfg['show_ads']) $ad_html[$ad['ad_id']] = $ad['ad_html']; } + $this->store('ads', $ad_html); + bb_update_config(array('active_ads' => serialize($ad_block_assignment))); } - -$this->store('ads', $ad_html); -bb_update_config(array('active_ads' => serialize($ad_block_assignment))); diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php index 2c3075764..cec86dcf2 100644 --- a/upload/includes/init_bb.php +++ b/upload/includes/init_bb.php @@ -533,6 +533,11 @@ $html = new html_common(); $log_action = new log_action(); $ads = new ads_common(); +// !!! Temporarily (??) 'cat_forums' always enqueued +$datastore->enqueue(array( + 'cat_forums', +)); + // Cron if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && ($bb_cfg['cron_enabled'] || defined('START_CRON'))) || defined('FORCE_CRON')) {