From 19e41f75f27fd6a56729422f84526f28895b7866 Mon Sep 17 00:00:00 2001 From: luizlaydner Date: Sat, 4 Aug 2007 01:51:18 +0000 Subject: [PATCH] - added tag_cron() to cron.php --- admin/cron.php | 5 +++++ tag/lib.php | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/admin/cron.php b/admin/cron.php index 2bc3cd32e9..edef75348e 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -268,6 +268,11 @@ } } + if(!empty($CFG->usetags)){ + require_once($CFG->dirroot.'/tag/lib.php'); + tag_cron(); + } + } // End of occasional clean-up tasks diff --git a/tag/lib.php b/tag/lib.php index 88802cbfae..e9230c8d11 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -1076,7 +1076,18 @@ function rand_tags_count($nr_of_tags=20, $tag_type = 'default') { } -/*-------------------- Printing functions -------------------- */ +function tag_cron(){ + + tag_instance_table_cleanup(); + + $tags = get_all_tags('*'); + + foreach ($tags as $tag){ + cache_correlated_tags($tag->id); + } + +} +/*-------------------- Printçing functions -------------------- */ /** * Prints a box that contains the management links of a tag -- 2.39.5