From 7967104140a4a01872864806b7e509011838ca07 Mon Sep 17 00:00:00 2001 From: "bitweaver.org" Date: Sun, 19 Jun 2005 05:04:25 +0000 Subject: IMPORT TikiPro CLYDE FINAL --- refresh.php | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 refresh.php (limited to 'refresh.php') diff --git a/refresh.php b/refresh.php new file mode 100644 index 0000000..e55ca62 --- /dev/null +++ b/refresh.php @@ -0,0 +1,67 @@ +isPackageActive( 'wiki' ) ) { + // if wiki is active, let's always refresh + random_refresh_index_wiki(); + } + if( $gBitSystem->isPackageActive( 'forums' ) ) { + $locs[]="random_refresh_index_forum"; + } + if( $gBitSystem->isPackageActive( 'trackers' ) ) { + $locs[]="random_refresh_index_trackers"; + $locs[]="random_refresh_index_tracker_items"; + } + if( $gBitSystem->isPackageActive( 'articles' ) ) { + $locs[]="random_refresh_index_articles"; + } + if( $gBitSystem->isPackageActive( 'blogs' ) ) { + $locs[]="random_refresh_index_blogs"; + $locs[]="random_refresh_index_blog_posts"; + } + if( $gBitSystem->isPackageActive( 'faqs' ) ) { + $locs[]="random_refresh_index_faqs"; + $locs[]="random_refresh_index_faq_questions"; + } + if( $gBitSystem->isPackageActive( 'directory' ) ) { + $locs[]="random_refresh_index_dir_cats"; + $locs[]="random_refresh_index_dir_sites"; + } + if( $gBitSystem->isPackageActive( 'imagegals' ) ) { + $locs[]="random_refresh_imggals"; + $locs[]="random_refresh_img"; + } + + // comments can be everywhere? + $locs[]="random_refresh_index_comments"; + // some refreshes to enhance the refreshing stats + $locs[]="refresh_index_oldest"; + //print_r($locs); + $location=$locs[rand(0,count($locs)-1)]; + // 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 + global $gBitSystem, $gBitDbName; + $gBitSystem->mDb->mDb->SelectDB( $gBitDbName ); + + //echo "$location"; + call_user_func ($location); + } +} + +?> -- cgit v1.3