Skip to content
Snippets Groups Projects
Commit e836fb8d authored by Graham Cole's avatar Graham Cole
Browse files

in which the chckens should have read the strstr() documentation to avoid looking stupid

parent fa7675d0
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,11 @@
function parseIdleTime($idletime) {
$idlearray = preg_split("/[hms]/",$idletime);
if (strstr('h', $idletime)) {
if (strstr($idletime,'h')) {
$hours = $idlearray[0];
$minutes = $idlearray[1];
$seconds = 0;
} elseif (strstr('m', $idletime)) {
} elseif (strstr($idletime,'m')) {
$hours = 0;
$minutes = $idlearray[0];
$seconds = $idlearray[1];
......@@ -39,6 +39,7 @@ foreach ($wholist as $person) {
if ($person['idleseconds'] > 3600) {
$idlers[] = $person;
} else {
print_r($person);
$people[] = $person;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment