From: scyrma Date: Thu, 24 Apr 2008 03:07:59 +0000 (+0000) Subject: MDL-3381 - Remove all remaining core calls to ctype_* functions in 1.9, and make... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bbbfc0579fb6a137f4ee1cede9a82d2f674ce6dd;p=moodle.git MDL-3381 - Remove all remaining core calls to ctype_* functions in 1.9, and make ctype required for 2.0. (merge from 1.9) --- diff --git a/admin/environment.xml b/admin/environment.xml index ecb0260b75..8f17d3bf3f 100644 --- a/admin/environment.xml +++ b/admin/environment.xml @@ -177,6 +177,11 @@ + + + + + @@ -249,6 +254,11 @@ + + + + + diff --git a/course/lib.php b/course/lib.php index f40e9d969c..909de26771 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 (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)) . "%'"; diff --git a/install/lang/en_utf8/installer.php b/install/lang/en_utf8/installer.php index e3f24c7750..b2ecbc40dd 100644 --- a/install/lang/en_utf8/installer.php +++ b/install/lang/en_utf8/installer.php @@ -65,6 +65,8 @@ $string['configurationcompletesub'] = 'Moodle made an attempt to save your confi $string['configurationfileexist']='Configuration file already exist!'; $string['continue'] = 'Continue'; $string['creatingconfigfile'] =' Creating configuration file ...'; +$string['ctyperecommended'] = 'Installing the optional ctype PHP extension is highly recommended in order to improve site performance, particularly if your site is supporting non-latin languages.'; +$string['ctyperequired'] = 'The ctype PHP extension is now required by Moodle, in order to improve site performance and to offer multilingual compatibility.'; $string['curlrecommended'] = 'Installing the optional cURL library is highly recommended in order to enable Moodle Networking functionality.'; $string['customcheck'] = 'Other Checks'; $string['database'] = 'Database'; diff --git a/install/stringnames.txt b/install/stringnames.txt index d1936c5234..f8c07c130e 100644 --- a/install/stringnames.txt +++ b/install/stringnames.txt @@ -45,6 +45,8 @@ configurationcompletesub configurationfileexist continue creatingconfigfile +ctyperecommended +ctyperequired curlrecommended customcheck database diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index 77a016ac90..db437f0fc6 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -258,6 +258,8 @@ $string['cronerrorclionly'] = 'Sorry, internet access to this page has been disa $string['cronerrorpassword'] = 'Sorry, you have not provided a valid password to access this page'; $string['cronremotepassword'] = 'Cron password for remote access'; $string['cronwarning'] = 'The cron.php maintenance script has not been run for at least 24 hours.'; +$string['ctyperecommended'] = 'Installing the optional ctype PHP extension is highly recommended in order to improve site performance, particularly if your site is supporting non-latin languages.'; +$string['ctyperequired'] = 'The ctype PHP extension is now required by Moodle, in order to improve site performance and to offer multilingual compatibility.'; $string['csvdelimiter'] = 'CSV delimiter'; $string['curlrecommended'] = 'Installing the optional cURL library is highly recommended in order to enable Moodle Networking functionality.'; $string['customcheck'] = 'Other Checks';