]> git.mjollnir.org Git - moodle.git/commitdiff
Revert "datalib: Introducing sql_intarray_to_in()"
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:47:26 +0000 (07:47 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:47:26 +0000 (07:47 +0000)
We don't need sql_intarray_to_in(), use implode() instead.

This reverts commit 3ef7fc54d9df780c837c64a8ace1fc565d6d7744.

lib/datalib.php

index 1bd6b3daa357b2699c52322a9589e0cc4214ee95..49835aef6e01994f5e8645accdb02aac584e05a5 100644 (file)
@@ -2170,21 +2170,5 @@ function get_creatable_categories() {
     return $creatablecats;
 }
 
-/**
- * Turn an array of ints into a string usable in an IN sql clause...
- *
- **/
-function sql_intarray_to_in($array) {
-
-    $na = array();
-    $c = count($array);
-    for ($n=0;$n<$c;$n++) {
-        if (isset($array[$n]) && is_int($array[$n])) {
-            $na[] = $array[$n];
-        }
-    }
-    return join(',',$array);
-}
-
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>