mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-3381 - Remove all remaining core calls to ctype_* functions in 1.9, and make ctype required for 2.0. (merge from 1.9)
This commit is contained in:
parent
5832a6f34b
commit
bbbfc0579f
5 changed files with 18 additions and 2 deletions
|
@ -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 (ctype_alpha($firstletter)) {
|
||||
if (preg_match('/[[: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 (ctype_alpha($firstletter)) {
|
||||
if (preg_match('/[[:alpha:]]/', $firstletter)) {
|
||||
$joins[] = "lower(l.action) LIKE '%" . strtolower($modaction) . "%'";
|
||||
} else if ($firstletter == '-') {
|
||||
$joins[] = "lower(l.action) NOT LIKE '%" . strtolower(substr($modaction, 1)) . "%'";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue