Skip to content

Commit 48c37ab

Browse files
author
Matthias Opitz
committed
fixed another required paramter following an optional one
1 parent 02e8b4b commit 48c37ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

classes/controller/edit_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function update_post_action() {
228228
$timestart = $timestart === 0 ? $discussion->timestart : 0;
229229
$timeend = $timeend === 0 ? $discussion->timeend : 0;
230230

231-
return $this->postservice->handle_update_post($course, $cm, $forum, $context, $discussion, $post, $files, array(
231+
return $this->postservice->handle_update_post($course, $cm, $forum, $context, $discussion, $post, array(
232232
'subject' => $subject,
233233
'name' => $subject,
234234
'groupid' => $groupid,
@@ -239,7 +239,7 @@ public function update_post_action() {
239239
'privatereply' => $privatereply,
240240
'timestart' => $timestart,
241241
'timeend' => $timeend
242-
));
242+
), $files);
243243
} catch (\Exception $e) {
244244
return new json_response($e);
245245
}

classes/service/post_service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function handle_user_autosubscription($forum, $post) {
132132
* @param array $options These override default post values, EG: set the post message with this
133133
* @return json_response
134134
*/
135-
public function handle_update_post($course, $cm, $forum, $context, $discussion, $post, array $deletefiles, array $options) {
135+
public function handle_update_post($course, $cm, $forum, $context, $discussion, $post, array $options, array $deletefiles = array()) {
136136

137137
$this->require_can_edit_post($forum, $context, $discussion, $post);
138138

0 commit comments

Comments
 (0)