@@ -126,8 +126,6 @@ function hidecontent(content){
126
126
127
127
$ logInfo = [
128
128
'tool ' => TOOL_FORUM ,
129
- 'tool_id ' => 0 ,
130
- 'tool_id_detail ' => 0 ,
131
129
'action ' => $ action ,
132
130
'info ' => isset ($ _GET ['content ' ]) ? $ _GET ['content ' ] : '' ,
133
131
];
@@ -181,7 +179,7 @@ function hidecontent(content){
181
179
182
180
$ forum_categories_list = [];
183
181
$ forumId = $ forum_category ['cat_id ' ];
184
- $ forumTitle = $ forum_category ['cat_title ' ];
182
+ $ forumTitle = Security:: remove_XSS ( $ forum_category ['cat_title ' ]) ;
185
183
$ linkForumCategory = 'viewforumcategory.php? ' .api_get_cidreq ().'&forumcategory= ' .strval (intval ($ forumId ));
186
184
$ descriptionCategory = $ forum_category ['cat_comment ' ];
187
185
$ icoCategory = Display::return_icon (
@@ -271,32 +269,26 @@ function hidecontent(content){
271
269
// you are teacher => show forum
272
270
273
271
if (api_is_allowed_to_edit (false , true )) {
274
- //echo 'teacher';
275
272
$ show_forum = true ;
276
273
} else {
277
274
// you are not a teacher
278
- //echo 'student';
279
275
// it is not a group forum => show forum
280
276
// (invisible forums are already left out see get_forums function)
281
277
if ($ forum ['forum_of_group ' ] == '0 ' ) {
282
- //echo '-gewoon forum';
283
278
$ show_forum = true ;
284
279
} else {
285
280
// it is a group forum
286
281
//echo '-groepsforum';
287
282
// it is a group forum but it is public => show
288
283
if ($ forum ['forum_group_public_private ' ] == 'public ' ) {
289
284
$ show_forum = true ;
290
- //echo '-publiek';
291
285
} else {
292
286
// it is a group forum and it is private
293
287
//echo '-prive';
294
288
// it is a group forum and it is private but the user is member of the group
295
289
if (in_array ($ forum ['forum_of_group ' ], $ groups_of_user )) {
296
- //echo '-is lid';
297
290
$ show_forum = true ;
298
291
} else {
299
- //echo '-is GEEN lid';
300
292
$ show_forum = false ;
301
293
}
302
294
}
@@ -360,14 +352,14 @@ function hidecontent(content){
360
352
$ html .= '<div class="col-md-9"> ' ;
361
353
$ iconForum = Display::return_icon (
362
354
'forum_yellow.png ' ,
363
- get_lang ($ forum_category ['cat_title ' ]),
355
+ Security:: remove_XSS ( get_lang ($ forum_category ['cat_title ' ]) ),
364
356
null ,
365
357
ICON_SIZE_MEDIUM
366
358
);
367
359
368
360
$ linkForum = Display::tag (
369
361
'a ' ,
370
- $ forum ['forum_title ' ].$ session_displayed ,
362
+ Security:: remove_XSS ( $ forum ['forum_title ' ]) .$ session_displayed ,
371
363
[
372
364
'href ' => 'viewforum.php? ' .api_get_cidreq (true , false )."&gidReq= {$ forum ['forum_of_group ' ]}&forum= {$ forum ['forum_id ' ]}&search= " .Security::remove_XSS (urlencode (isset ($ _GET ['search ' ]) ? $ _GET ['search ' ] : '' )),
373
365
'class ' => empty ($ forum ['visibility ' ]) ? 'text-muted ' : null ,
@@ -382,7 +374,7 @@ function hidecontent(content){
382
374
);
383
375
$ html .= Display::tag (
384
376
'p ' ,
385
- strip_tags ($ forum ['forum_comment ' ]),
377
+ Security:: remove_XSS ( strip_tags ($ forum ['forum_comment ' ]) ),
386
378
[
387
379
'class ' => 'description ' ,
388
380
]
0 commit comments