Skip to content

Commit 8c0761f

Browse files
Fixed array syntax issues.
1 parent 55bb2b3 commit 8c0761f

39 files changed

+255
-255
lines changed

backup/moodle2/backup_hsuforum_activity_task.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function get_comment_file_annotation_info() {
7070
static public function encode_content_links($content) {
7171
global $CFG;
7272

73-
$base = preg_quote($CFG->wwwroot,"/");
73+
$base = preg_quote($CFG->wwwroot,"/",);
7474

7575
// Link to the list of forums
7676
$search="/(".$base."\/mod\/hsuforum\/index.php\?id\=)([0-9]+)/";

backup/moodle2/restore_hsuforum_stepslib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ protected function after_restore() {
275275
$sd->reveal = 0;
276276
$sdid = hsuforum_add_discussion($sd, null, null, $this->task->get_userid());
277277
// Mark the post as mailed
278-
$DB->set_field ('hsuforum_posts','mailed', '1', array('discussion' => $sdid));
278+
$DB->set_field ('hsuforum_posts','mailed', '1', array('discussion' => $sdid,));
279279
// Copy all the files from mod_foum/intro to mod_hsuforum/post
280280
$fs = get_file_storage();
281281
$files = $fs->get_area_files($this->task->get_contextid(), 'mod_hsuforum', 'intro');

classes/controller/edit_controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function reply_action() {
119119
'message' => $message,
120120
'messageformat' => $messageformat,
121121
'reveal' => $reveal,
122-
'mailnow' => $mailnow
122+
'mailnow' => $mailnow,
123123
);
124124
if (!empty($subject)) {
125125
$data['subject'] = $subject;
@@ -175,7 +175,7 @@ public function add_discussion_action() {
175175
'reveal' => $reveal,
176176
'timestart' => $timestart,
177177
'timeend' => $timeend,
178-
'mailnow' => $mailnow
178+
'mailnow' => $mailnow,
179179
);
180180
return $this->discussionservice->handle_add_discussion($course, $cm, $forum, $context, $options, $posttomygroups);
181181
} catch (\Exception $e) {
@@ -238,7 +238,7 @@ public function update_post_action() {
238238
'reveal' => $reveal,
239239
'privatereply' => $privatereply,
240240
'timestart' => $timestart,
241-
'timeend' => $timeend
241+
'timeend' => $timeend,
242242
));
243243
} catch (\Exception $e) {
244244
return new json_response($e);
@@ -281,7 +281,7 @@ public function edit_post_form_action() {
281281
'isdiscussion' => true,
282282
'timestart' => $discussion->timestart,
283283
'timeend' => $discussion->timeend,
284-
'offset' => $offset
284+
'offset' => $offset,
285285
]);
286286
}
287287
}

classes/message/inbound/reply_handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function process_message(\stdClass $record, \stdClass $messagedata) {
253253
'discussionid' => $discussion->id,
254254
'forumid' => $forum->id,
255255
'forumtype' => $forum->type,
256-
)
256+
),
257257
);
258258
$event = \mod_hsuforum\event\post_created::create($params);
259259
$event->add_record_snapshot('hsuforum_posts', $addpost);

classes/output/big_search_form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct($course) {
7373
$this->forumoptions = array_map(function($option) use ($forumoptions) {
7474
return [
7575
'value' => $option,
76-
'name' => $forumoptions[$option]
76+
'name' => $forumoptions[$option],
7777
];
7878
}, array_keys($forumoptions));
7979
}
@@ -200,7 +200,7 @@ public function export_for_template(renderer_base $output) {
200200
foreach ($tags as $tag) {
201201
$data->tagoptions[] = ['value' => $tag->rawname,
202202
'text' => $tag->fieldname,
203-
'selected' => in_array($tag->rawname, $this->tags)
203+
'selected' => in_array($tag->rawname, $this->tags),
204204
];
205205
}
206206

classes/post_form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function attachment_options($forum) {
5252
'maxbytes' => $maxbytes,
5353
'maxfiles' => $forum->maxattachments,
5454
'accepted_types' => '*',
55-
'return_types' => FILE_INTERNAL | FILE_CONTROLLED_LINK
55+
'return_types' => FILE_INTERNAL | FILE_CONTROLLED_LINK,
5656
);
5757
}
5858

@@ -72,7 +72,7 @@ public static function editor_options(context_module $context, $postid) {
7272
'maxbytes' => $maxbytes,
7373
'trusttext'=> true,
7474
'return_types'=> FILE_INTERNAL | FILE_EXTERNAL,
75-
'subdirs' => file_area_contains_subdirs($context, 'mod_hsuforum', 'post', $postid)
75+
'subdirs' => file_area_contains_subdirs($context, 'mod_hsuforum', 'post', $postid),
7676
);
7777
}
7878

classes/privacy/provider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function get_metadata(collection $items) : collection {
9898
'userid' => 'privacy:metadata:hsuforum_queue:userid',
9999
'discussionid' => 'privacy:metadata:hsuforum_queue:discussionid',
100100
'postid' => 'privacy:metadata:hsuforum_queue:postid',
101-
'timemodified' => 'privacy:metadata:hsuforum_queue:timemodified'
101+
'timemodified' => 'privacy:metadata:hsuforum_queue:timemodified',
102102
], 'privacy:metadata:hsuforum_queue');
103103

104104
// The 'hsuforum_read' table stores data about which forum posts have been read by each user.
@@ -561,7 +561,7 @@ protected static function export_discussion_data(int $userid, array $mappings) {
561561
'pinned' => transform::yesno((bool)$discussion->pinned),
562562
'timemodified' => transform::datetime($discussion->timemodified),
563563
'usermodified' => transform::datetime($discussion->usermodified),
564-
'creator_was_you' => transform::yesno($discussion->userid == $userid)
564+
'creator_was_you' => transform::yesno($discussion->userid == $userid),
565565
];
566566

567567
$discussionarea = static::get_discussion_area($discussion);

classes/renderables/advanced_editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function get_data($draftid = 0){
110110
'editor' => $editor,
111111
'options' => $options,
112112
'fpoptions' => $fpoptions,
113-
'draftitemid' => $draftitemid
113+
'draftitemid' => $draftitemid,
114114
];
115115
}
116116
}

classes/search/post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function uses_file_indexing() {
144144
public function get_search_fileareas() {
145145
$fileareas = array(
146146
'attachment',
147-
'post'
147+
'post',
148148
);
149149

150150
return $fileareas;
@@ -315,7 +315,7 @@ protected function get_discussion($discussionid) {
315315
protected function get_contexts_to_reindex_extra_sql() {
316316
return [
317317
'JOIN {hsuforum_discussions} fd ON fd.course = cm.course AND fd.forum = cm.instance',
318-
'MAX(fd.timemodified) DESC'
318+
'MAX(fd.timemodified) DESC',
319319
];
320320
}
321321

classes/service/discussion_service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function trigger_discussion_created($course, \context_module $context, $c
242242
'objectid' => $discussion->id,
243243
'other' => array(
244244
'forumid' => $forum->id,
245-
)
245+
),
246246
);
247247
$event = discussion_created::create($params);
248248
$event->add_record_snapshot('hsuforum_discussions', $discussion);

0 commit comments

Comments
 (0)