diff options
| -rwxr-xr-x | includes/refresh.php | 5 | ||||
| -rwxr-xr-x | includes/refresh_functions.php | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/includes/refresh.php b/includes/refresh.php index 1d55429..0ce1184 100755 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -39,6 +39,11 @@ function refresh_search_index() { // 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"); diff --git a/includes/refresh_functions.php b/includes/refresh_functions.php index a201910..3f62674 100755 --- a/includes/refresh_functions.php +++ b/includes/refresh_functions.php @@ -33,6 +33,9 @@ function random_refresh_index($pContentType = "") { case "wiki" : $table = "wiki_pages"; break; + case "fisheye" : + $table = "fisheye_image"; + break; case "blogs" : $table = "blogs"; break; @@ -50,7 +53,9 @@ function random_refresh_index($pContentType = "") { if($cant > 0) { $query = "SELECT `content_id` FROM `" . BIT_DB_PREFIX . $table . "`"; $contentId = $gBitSystem->mDb->getOne($query, [], 1, rand(0, $cant - 1)); - refresh_index($contentId); + $contentObject = new LibertyContent(); + $contentObject = $contentObject->getLibertyObject($contentId); + refresh_index($contentObject); } } } |
