]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-3381 - Reverse broken commit
authorscyrma <scyrma>
Thu, 24 Apr 2008 03:24:42 +0000 (03:24 +0000)
committerscyrma <scyrma>
Thu, 24 Apr 2008 03:24:42 +0000 (03:24 +0000)
course/lib.php

index 909de26771d4d0f8b41af45d04d9d35a542df48f..f40e9d969c84f3e1448b8bd9283628b32ad5a354 100644 (file)
@@ -117,7 +117,7 @@ function build_mnet_logs_array($hostid, $course, $user=0, $date=0, $order="l.tim
 
     if ($modaction) {
         $firstletter = substr($modaction, 0, 1);
-        if (preg_match('/[[:alpha:]]/', $firstletter)) {
+        if (ctype_alpha($firstletter)) {
             $where .= " AND\n                lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
         } else if ($firstletter == '-') {
             $where .= " AND\n                lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";
@@ -180,7 +180,7 @@ function build_logs_array($course, $user=0, $date=0, $order="l.time ASC", $limit
 
     if ($modaction) {
         $firstletter = substr($modaction, 0, 1);
-        if (preg_match('/[[:alpha:]]/', $firstletter)) {
+        if (ctype_alpha($firstletter)) {
             $joins[] = "lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
         } else if ($firstletter == '-') {
             $joins[] = "lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";