isPackageActive( 'wiki' ) ) { // if wiki is active, let's always refresh random_refresh_index("wiki"); } if( $gBitSystem->isPackageActive( 'articles' ) ) { $locs[''] = ARTICLES_PKG_NAME; } if( $gBitSystem->isPackageActive( 'blogs' ) ) { //Can't use the new random function with blogs - they aren'tin liberty_content yet. $locs['random_refresh_index_blogs'] = ''; //Can use new function for blog_posts though ... $locs['random_refresh_index']="blog_posts"; } // comments can be everywhere? $locs['random_refresh_index'] = "comments"; // some refreshes to enhance the refreshing stats $locs['refresh_index_oldest'] = ""; $key = array_rand( $locs ); // random refresh // hack around php database driver issues when a different database from bitweaver is accessed elsewhere during page render // this happens in the phpBB package when phpBB is in a different db from bitweaver in MySQL // This only works on some databases global $gBitSystem, $gBitDbName; $gBitSystem->mDb->mDb->SelectDB( $gBitDbName ); if ( !empty ($key) ) call_user_func( $key, $locs[$key] ); } } ?>