]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-3381 - Remove all remaining core calls to ctype_* functions in 1.9, and make...
authorscyrma <scyrma>
Thu, 24 Apr 2008 03:07:59 +0000 (03:07 +0000)
committerscyrma <scyrma>
Thu, 24 Apr 2008 03:07:59 +0000 (03:07 +0000)
admin/environment.xml
course/lib.php
install/lang/en_utf8/installer.php
install/stringnames.txt
lang/en_utf8/admin.php

index ecb0260b759ffeed2f8a9d28736f74770d88e9ba..8f17d3bf3fd4339954ba3f3e80831a2ddf88231d 100644 (file)
           <ON_CHECK message="xmlrpcrecommended" />
         </FEEDBACK>
       </PHP_EXTENSION>
+      <PHP_EXTENSION name="ctype" level="optional">
+        <FEEDBACK>
+          <ON_CHECK message="ctyperecommended" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
     </PHP_EXTENSIONS>
     <CUSTOM_CHECKS>
       <CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
           <ON_CHECK message="xmlrpcrecommended" />
         </FEEDBACK>
       </PHP_EXTENSION>
+     <PHP_EXTENSION name="ctype" level="required">
+        <FEEDBACK>
+          <ON_ERROR message="ctyperequired" />
+        </FEEDBACK>
+      </PHP_EXTENSION>
     </PHP_EXTENSIONS>
     <CUSTOM_CHECKS>
       <CUSTOM_CHECK file="question/upgrade.php" function="question_check_no_rqp_questions" level="optional">
index f40e9d969c84f3e1448b8bd9283628b32ad5a354..909de26771d4d0f8b41af45d04d9d35a542df48f 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 (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)) . "%'";
index e3f24c775081a7aaf075e5442811c64e39ea17cd..b2ecbc40dd60a030e84d8fc5f2e6b14d794baa2e 100644 (file)
@@ -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';
index d1936c52345a6f02bb37d65545e1ef718da81edd..f8c07c130e7c5d872c5032749cf94db51ddb9ce0 100644 (file)
@@ -45,6 +45,8 @@ configurationcompletesub
 configurationfileexist
 continue
 creatingconfigfile
+ctyperecommended
+ctyperequired
 curlrecommended
 customcheck
 database
index 77a016ac90355a550754561868fff3b0d9aed210..db437f0fc651ab9341f07cbabf77780214bd842f 100644 (file)
@@ -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 <a href=\"cron.php\">cron.php maintenance script</a> 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';