From: scyrma Date: Thu, 24 Apr 2008 03:24:42 +0000 (+0000) Subject: MDL-3381 - Reverse broken commit X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e12e0ee717bb9d512bf2082d45f2b9595202e898;p=moodle.git MDL-3381 - Reverse broken commit --- diff --git a/course/lib.php b/course/lib.php index 909de26771..f40e9d969c 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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)) . "%'";