]> git.mjollnir.org Git - moodle.git/commitdiff
Allow load average to be displayed in servers using the comma as
authorstronk7 <stronk7>
Sat, 7 Oct 2006 10:33:58 +0000 (10:33 +0000)
committerstronk7 <stronk7>
Sat, 7 Oct 2006 10:33:58 +0000 (10:33 +0000)
decimal separator.

lib/moodlelib.php

index 16fabf8d0c2f594a663b36aeba62c934a083454c..29bb598ff81297c172a1cffa7b0c303d0431bf01 100644 (file)
@@ -6548,7 +6548,7 @@ function get_performance_info() {
         list($server_load) = explode(' ', $loadavg[0]);
         unset($loadavg);
     } else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
-        if (preg_match('/load averages?: (\d+[\.:]\d+)/', $loadavg, $matches)) {
+        if (preg_match('/load averages?: (\d+[\.,:]\d+)/', $loadavg, $matches)) {
             $server_load = $matches[1];
         } else {
             trigger_error('Could not parse uptime output!');