]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15345: prevent problem while running tag_compute_correlations under pgsql. (merge...
authorscyrma <scyrma>
Mon, 23 Jun 2008 04:31:41 +0000 (04:31 +0000)
committerscyrma <scyrma>
Mon, 23 Jun 2008 04:31:41 +0000 (04:31 +0000)
tag/lib.php

index 5450d821feaaf1d7ddeac72e0e510e1511e3c7f7..14c9a26efc75810375bc3b8329d4421c001ba99c 100644 (file)
@@ -786,7 +786,7 @@ function tag_compute_correlations($min_correlation=2) {
                    WHERE ta.tagid = ? AND tb.tagid <> ?
                 GROUP BY tb.tagid
                   HAVING nr > ?
-                ORDER BY nr DESC";
+                ORDER BY COUNT(*) DESC";
         $params = array($tag->id, $tag->id, $min_correlation);
 
         $correlated = array();