Skip to content

Commit 5b9f76a

Browse files
committed
merge
2 parents eabbcdc + 55a1ca2 commit 5b9f76a

File tree

6 files changed

+27
-29
lines changed

6 files changed

+27
-29
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
"ext-xml": "*",
4242
"ext-json": "*",
4343
"ext-mbstring": "*",
44+
"ext-libxml": "*",
45+
"ext-dom": "*",
46+
"ext-fileinfo": "*",
4447
"ext-bcmath": "*",
4548
"twig/twig": "2.*",
4649
"doctrine/orm": "~2.6",

main/forum/download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181

8282
if ($result === false) {
8383
api_not_allowed(true);
84+
}
8485
}
8586
}
86-
}
8787

8888
api_not_allowed();

main/forum/forumfunction.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5377,8 +5377,8 @@ function getAllAttachment($postId)
53775377
/**
53785378
* Delete the all the attachments from the DB and the file according to the post's id or attach id(optional).
53795379
*
5380-
* @param int $post_id
5381-
* @param int $id_attach
5380+
* @param int $post_id
5381+
* @param int $id_attach
53825382
*
53835383
* @return int
53845384
*

main/forum/viewthread.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
$template = new Template('', false, false, true, true, false);
198198
} else {
199199
$template = new Template();
200-
}
200+
}
201201

202202
$actions = '<span style="float:right;">'.search_link().'</span>';
203203
if ($origin != 'learnpath') {
@@ -288,7 +288,7 @@
288288
isset($_GET['id_attach'])
289289
) {
290290
delete_attachment(0, $_GET['id_attach']);
291-
}
291+
}
292292

293293
$origin = api_get_origin();
294294
$sessionId = api_get_session_id();
@@ -320,19 +320,19 @@
320320
$username = '';
321321
if (isset($post['username'])) {
322322
$username = sprintf(get_lang('LoginX'), $post['username']);
323-
}
323+
}
324324

325325
$name = $post['complete_name'];
326326
if (empty($posterId)) {
327327
$name = $post['poster_name'];
328328
}
329329

330330
$post['user_data'] = '';
331-
if ($origin != 'learnpath') {
331+
if ($origin != 'learnpath') {
332332
if ($allowUserImageForum) {
333333
$post['user_data'] = '<div class="thumbnail">'.
334334
display_user_image($posterId, $name, $origin).'</div>';
335-
}
335+
}
336336

337337
$post['user_data'] .= Display::tag(
338338
'h4',

main/inc/lib/glossary.lib.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -397,51 +397,50 @@ public static function display_glossary()
397397
// action links
398398
$actionsLeft = '';
399399
if (api_is_allowed_to_edit(null, true)) {
400-
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=addglossary&msg=add?' . api_get_cidreq() . '">' .
401-
Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM) . '</a>';
400+
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=addglossary&msg=add?'.api_get_cidreq().'">'.
401+
Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>';
402402
}
403403

404404
if (api_is_allowed_to_edit(null, true)) {
405-
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=import">' .
406-
Display::return_icon('import.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM) . '</a>';
405+
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=import">'.
406+
Display::return_icon('import.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>';
407407
}
408408

409409
if (!api_is_anonymous()) {
410-
$actionsLeft .= '<a id="export-glossary" href="' . api_get_self() . '?' . api_get_cidreq() . '&action=export" class="btn btn-link btn-export" data-toggle="modal" data-target="#modal-export">' .
411-
Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
410+
$actionsLeft .= '<a id="export-glossary" href="'.api_get_self().'?'.api_get_cidreq().'&action=export" class="btn btn-link btn-export" data-toggle="modal" data-target="#modal-export">'.
411+
Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
412412
}
413413

414414
if (!api_is_anonymous()) {
415415
$actionsLeft .= Display::url(
416416
Display::return_icon('export_to_documents.png', get_lang('ExportToDocArea'), [], ICON_SIZE_MEDIUM),
417-
api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query(['action' => 'export_documents'])
417+
api_get_self().'?'.api_get_cidreq().'&'.http_build_query(['action' => 'export_documents'])
418418
);
419419
}
420420

421421
$orderList = isset($_GET['order']) ? Database::escape_string($_GET['order']) : '';
422-
if(empty($orderList)){
422+
if (empty($orderList)) {
423423
$orderList = 'ASC';
424424
}
425425
if (!api_is_anonymous()) {
426-
if($orderList ==='ASC'){
426+
if ($orderList === 'ASC') {
427427
$actionsLeft .= Display::url(
428428
Display::return_icon('falling.png', get_lang('Sort Descending'), [], ICON_SIZE_MEDIUM),
429-
api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query(['order' => 'DESC'])
429+
api_get_self().'?'.api_get_cidreq().'&'.http_build_query(['order' => 'DESC'])
430430
);
431431
} else {
432432
$actionsLeft .= Display::url(
433433
Display::return_icon('upward.png', get_lang('Sort Ascending'), [], ICON_SIZE_MEDIUM),
434-
api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query(['order' => 'ASC'])
434+
api_get_self().'?'.api_get_cidreq().'&'.http_build_query(['order' => 'ASC'])
435435
);
436436
}
437437
}
438438

439-
440439
/* BUILD SEARCH FORM */
441440
$form = new FormValidator(
442441
'search',
443442
'get',
444-
api_get_self() . '?' . api_get_cidreq(),
443+
api_get_self().'?'.api_get_cidreq(),
445444
'',
446445
[],
447446
FormValidator::LAYOUT_INLINE
@@ -459,7 +458,7 @@ public static function display_glossary()
459458

460459
$content = $toolbar;
461460

462-
$list = self::getListGlossary(1000,0,$orderList);
461+
$list = self::getListGlossary(1000, 0, $orderList);
463462

464463
$tpl = new Template(null);
465464
$tpl->assign('data', $list);
@@ -523,7 +522,8 @@ public static function get_number_glossary_terms($session_id = 0)
523522
return $obj->total;
524523
}
525524

526-
public static function getListGlossary($numberOfItems, $column, $direction){
525+
public static function getListGlossary($numberOfItems, $column, $direction)
526+
{
527527
$_user = api_get_user_info();
528528

529529
// Database table definition
@@ -592,7 +592,6 @@ public static function getListGlossary($numberOfItems, $column, $direction){
592592
}
593593

594594
return $list;
595-
596595
}
597596

598597
/**

main/inc/lib/link.lib.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,6 @@ public static function getLinksPerCategory(
974974
* @param int $session_id
975975
*
976976
* @return array
977-
*
978977
*/
979978
public static function showLinksPerCategory($catid, $courseId, $session_id)
980979
{
@@ -987,11 +986,9 @@ public static function showLinksPerCategory($catid, $courseId, $session_id)
987986
$listLink = [];
988987

989988
if (!empty($links)) {
990-
991989
$i = 1;
992990
$linksAdded = [];
993991
foreach ($links as $myrow) {
994-
995992
$linkId = $myrow['id'];
996993
$linksAdded['id'] = $linkId;
997994
$categoryId = $myrow['category_id'];
@@ -1667,12 +1664,11 @@ public static function listLinksAndCategories(
16671664
}
16681665
echo '</div>';
16691666

1670-
16711667
$counter = 0;
16721668
$category = [];
16731669
$listCategory = [];
16741670

1675-
$list['not_category'] = self::showLinksPerCategory(0, $course_id, $session_id);;
1671+
$list['not_category'] = self::showLinksPerCategory(0, $course_id, $session_id);
16761672

16771673
foreach ($categories as $myrow) {
16781674
// Student don't see invisible categories.

0 commit comments

Comments
 (0)