Permalink
Browse files

MDL-24803 fixed tagid typo in tag correlation table update

  • Loading branch information...
1 parent 120604f commit ad5644829fc24702ce3956f9887b20c494195871 @skodak skodak committed Oct 23, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 tag/lib.php
View
@@ -798,10 +798,11 @@ function tag_compute_correlations($min_correlation=2) {
//var_dump($correlated);
//saves correlation info in the caching table
- if ($tag_correlation_obj = get_record('tag_correlation', 'tagid', $tag->id, '', '', '', '', 'tagid')) {
+ if ($tag_correlation_obj = get_record('tag_correlation', 'tagid', $tag->id, '', '', '', '', 'id')) {
$tag_correlation_obj->correlatedtags = $correlated;
update_record('tag_correlation', $tag_correlation_obj);
} else {
+ $tag_correlation_obj = new stdClass();
$tag_correlation_obj->tagid = $tag->id;
$tag_correlation_obj->correlatedtags = $correlated;
insert_record('tag_correlation', $tag_correlation_obj);

0 comments on commit ad56448

Please sign in to comment.