Skip to content

Commit

Permalink
MDL-39374 log only real folder edits
Browse files Browse the repository at this point in the history
Credit goes to Florian Zillner, thanks.
  • Loading branch information
skodak committed May 15, 2013
1 parent e2637d1 commit d6c60a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod/folder/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
require_login($course, false, $cm);
require_capability('mod/folder:managefiles', $context);

add_to_log($course->id, 'folder', 'edit', 'edit.php?id='.$cm->id, $folder->id, $cm->id);

$PAGE->set_url('/mod/folder/edit.php', array('id' => $cm->id));
$PAGE->set_title($course->shortname.': '.$folder->name);
$PAGE->set_heading($course->fullname);
Expand All @@ -64,6 +62,9 @@
} else if ($formdata = $mform->get_data()) {
$formdata = file_postupdate_standard_filemanager($formdata, 'files', $options, $context, 'mod_folder', 'content', 0);
$DB->set_field('folder', 'revision', $folder->revision+1, array('id'=>$folder->id));

add_to_log($course->id, 'folder', 'edit', 'edit.php?id='.$cm->id, $folder->id, $cm->id);

redirect($redirecturl);
}

Expand Down

0 comments on commit d6c60a7

Please sign in to comment.