mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Codechecker fixes and removed other comments.
This commit is contained in:
committed by
Brendan Heywood
parent
0bff6f5145
commit
ffda33329c
@@ -136,7 +136,7 @@ class edit extends moodleform {
|
||||
}
|
||||
$outagedata = [
|
||||
'id' => ($data->id === 0) ? null : $data->id,
|
||||
// 'autostart' => (isset($data->autostart) && ($data->autostart == 1)),
|
||||
'autostart' => (isset($data->autostart) && ($data->autostart == 1)),
|
||||
'starttime' => $data->starttime,
|
||||
'stoptime' => $data->starttime + $data->outageduration,
|
||||
'warntime' => $data->starttime - $data->warningduration,
|
||||
@@ -161,7 +161,7 @@ class edit extends moodleform {
|
||||
if ($outage instanceof outage) {
|
||||
$this->_form->setDefaults([
|
||||
'id' => $outage->id,
|
||||
// 'autostart' => $outage->autostart,
|
||||
'autostart' => $outage->autostart,
|
||||
'starttime' => $outage->starttime,
|
||||
'outageduration' => $outage->get_duration_planned(),
|
||||
'warningduration' => $outage->get_warning_duration(),
|
||||
|
||||
@@ -371,7 +371,8 @@ EOT;
|
||||
'{{YOURIP}}', '{{COOKIESECURE}}', '{{COOKIEHTTPONLY}}', '{{METADATA}}'];
|
||||
// Note that var_export is required because (string) false == '', not 'false'.
|
||||
$replace = [$starttime, $stoptime, var_export(!empty($allowedips), true), $allowedips, var_export(!empty($accesskey), true),
|
||||
$accesskey, getremoteaddr('n/a'), var_export($cookiesecure, true), var_export($cookiehttponly, true), var_export($metadata, true)];
|
||||
$accesskey, getremoteaddr('n/a'), var_export($cookiesecure, true),
|
||||
var_export($cookiehttponly, true), var_export($metadata, true)];
|
||||
return str_replace($search, $replace, $code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user