]> git.mjollnir.org Git - moodle.git/commitdiff
- added tag_cron() to cron.php
authorluizlaydner <luizlaydner>
Sat, 4 Aug 2007 01:51:18 +0000 (01:51 +0000)
committerluizlaydner <luizlaydner>
Sat, 4 Aug 2007 01:51:18 +0000 (01:51 +0000)
admin/cron.php
tag/lib.php

index 2bc3cd32e98a7a6a2954e23c2c6e986c7236c465..edef75348e32afbc838118d766a04b2223819a27 100644 (file)
             }
         }
         
+        if(!empty($CFG->usetags)){
+            require_once($CFG->dirroot.'/tag/lib.php');
+            tag_cron();
+        }
+        
     } // End of occasional clean-up tasks
 
 
index 88802cbfae1e72a1f0dd66f5972c8071e8b7b9f6..e9230c8d115caa7fdc5154bd5e4f49433ac95710 100644 (file)
@@ -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