Skip to content

Commit 641f2d5

Browse files
committed
Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x
2 parents d367c9b + f6d961b commit 641f2d5

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

main/admin/user_edit.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function confirmation(name) {
6565
}
6666
</script>';
6767

68+
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#password');
6869
$htmlHeadXtra[] = api_get_css_asset('cropper/dist/cropper.min.css');
6970
$htmlHeadXtra[] = api_get_asset('cropper/dist/cropper.min.js');
7071
$tool_name = get_lang('ModifyUserInfo');
@@ -226,7 +227,13 @@ function confirmation(name) {
226227
'password',
227228
'password',
228229
null,
229-
['onkeydown' => 'javascript: password_switch_radio_button();', 'autocomplete' => 'new-password']
230+
[
231+
'id' => 'password',
232+
'autocomplete' => 'new-password',
233+
'onkeydown' => 'javascript: password_switch_radio_button();',
234+
'show_hide' => true,
235+
//'required' => 'required'
236+
]
230237
);
231238

232239
$form->addGroup($group, 'password', null, null, false);

main/inc/lib/agenda.lib.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -528,28 +528,31 @@ public function generateDatesByType($type, $startEvent, $endEvent, $repeatUntilD
528528
break;
529529
}
530530

531-
// @todo remove comment code
532-
$startDateInLocal = new DateTime($newStartDate, new DateTimeZone($timeZone));
531+
// @todo remove comment code
532+
// The code below was not adpating to saving light time but was doubling the difference with UTC time.
533+
// Might be necessary to adapt to update saving light time difference.
534+
/* $startDateInLocal = new DateTime($newStartDate, new DateTimeZone($timeZone));
533535
if ($startDateInLocal->format('I') == 0) {
534536
// Is saving time? Then fix UTC time to add time
535537
$seconds = $startDateInLocal->getOffset();
536538
$startDate->add(new DateInterval("PT".$seconds."S"));
537539
//$startDateFixed = $startDate->format('Y-m-d H:i:s');
538-
/*$startDateInLocalFixed = new DateTime($startDateFixed, new DateTimeZone($timeZone));
539-
$newStartDate = $startDateInLocalFixed->format('Y-m-d H:i:s');*/
540+
//$startDateInLocalFixed = new DateTime($startDateFixed, new DateTimeZone($timeZone));
541+
//$newStartDate = $startDateInLocalFixed->format('Y-m-d H:i:s');
540542
//$newStartDate = $startDate->setTimezone(new DateTimeZone($timeZone))->format('Y-m-d H:i:s');
541543
}
542-
$newStartDate = $startDate->setTimezone(new DateTimeZone($timeZone))->format('Y-m-d H:i:s');
543-
$endDateInLocal = new DateTime($newEndDate, new DateTimeZone($timeZone));
544544
545+
$endDateInLocal = new DateTime($newEndDate, new DateTimeZone($timeZone));
545546
if ($endDateInLocal->format('I') == 0) {
546547
// Is saving time? Then fix UTC time to add time
547548
$seconds = $endDateInLocal->getOffset();
548549
$endDate->add(new DateInterval("PT".$seconds."S"));
549550
//$endDateFixed = $endDate->format('Y-m-d H:i:s');
550551
//$endDateInLocalFixed = new DateTime($endDateFixed, new DateTimeZone($timeZone));
551552
//$newEndDate = $endDateInLocalFixed->format('Y-m-d H:i:s');
552-
}
553+
}
554+
*/
555+
$newStartDate = $startDate->setTimezone(new DateTimeZone($timeZone))->format('Y-m-d H:i:s');
553556
$newEndDate = $endDate->setTimezone(new DateTimeZone($timeZone))->format('Y-m-d H:i:s');
554557
$list[] = ['start' => $newStartDate, 'end' => $newEndDate];
555558
$counter++;

0 commit comments

Comments
 (0)