Skip to content

Commit

Permalink
Merge branch 'w40_MDL-41999_m25_userpw' of https://github.com/skodak/…
Browse files Browse the repository at this point in the history
…moodle into MOODLE_25_STABLE
  • Loading branch information
stronk7 committed Oct 1, 2013
2 parents 31f1464 + e404da0 commit 3ee1a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion calendar/export.php
Expand Up @@ -125,7 +125,7 @@
$weekend = intval($CFG->calendar_weekend);
}

$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
$authtoken = sha1($USER->id . $DB->get_field('user', 'password', array('id'=>$USER->id)). $CFG->calendar_exportsalt);
// Let's populate some vars to let "common tasks" be somewhat smart...
// If today it's weekend, give the "next week" option
$allownextweek = $weekend & (1 << $now['wday']);
Expand Down
2 changes: 1 addition & 1 deletion calendar/view.php
Expand Up @@ -153,7 +153,7 @@
echo $OUTPUT->single_button(new moodle_url('/calendar/managesubscriptions.php', array('course'=>$courseid)), get_string('managesubscriptions', 'calendar'));
}
if (isloggedin()) {
$authtoken = sha1($USER->id . $USER->password . $CFG->calendar_exportsalt);
$authtoken = sha1($USER->id . $DB->get_field('user', 'password', array('id'=>$USER->id)) . $CFG->calendar_exportsalt);
$link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'userid' => $USER->id, 'authtoken'=>$authtoken));
$icon = html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('i/ical'), 'height'=>'14', 'width'=>'36', 'alt'=>get_string('ical', 'calendar'), 'title'=>get_string('quickdownloadcalendar', 'calendar')));
echo html_writer::tag('a', $icon, array('href'=>$link));
Expand Down

0 comments on commit 3ee1a66

Please sign in to comment.