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( 'fisheye' ) ) { // if blogs is active, let's always refresh random_refresh_index("fisheye"); $locs['random_refresh_index']="fisheye_image"; } if( $gBitSystem->isPackageActive( 'blogs' ) ) { // if blogs is active, let's always refresh random_refresh_index("blogs"); $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( "\\Bitweaver\\Liberty\\$key", $locs[$key] ); } }