Skip to content

Commit

Permalink
MDL-26822 fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Mar 21, 2011
1 parent d587f07 commit ae8c1f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/enrollib.php
Expand Up @@ -1015,12 +1015,11 @@ public function enrol_user(stdClass $instance, $userid, $roleid = NULL, $timesta
$inserted = false;
if ($ue = $DB->get_record('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$userid))) {
//only update if timestart or timeend or status are different.
if ($ue->timestart != $timestart or $ue->timeend != $timeend or
(!is_null($status) and $ue->status != $status)) {
$ue->timestart = $timestart;
if ($ue->timestart != $timestart or $ue->timeend != $timeend or (!is_null($status) and $ue->status != $status)) {
$ue->timestart = $timestart;
$ue->timeend = $timeend;
if (!is_null($status)) {
$ue->status = $status;
$ue->status = $status;
}
$ue->modifier = $USER->id;
$ue->timemodified = time();
Expand All @@ -1029,7 +1028,7 @@ public function enrol_user(stdClass $instance, $userid, $roleid = NULL, $timesta
} else {
$ue = new stdClass();
$ue->enrolid = $instance->id;
$ue->status = is_null($status)?ENROL_USER_ACTIVE:$status;
$ue->status = is_null($status) ? ENROL_USER_ACTIVE : $status;
$ue->userid = $userid;
$ue->timestart = $timestart;
$ue->timeend = $timeend;
Expand Down

0 comments on commit ae8c1f3

Please sign in to comment.