Skip to content

Commit

Permalink
Merge pull request #1 from ILIAS-eLearning/release_6
Browse files Browse the repository at this point in the history
Release 6
  • Loading branch information
Uwe Tesche authored Aug 19, 2021
2 parents 3104e17 + 9fe8600 commit d995cae
Show file tree
Hide file tree
Showing 4,670 changed files with 134,009 additions and 381,022 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ jobs:

- name: PHP Unit Test
run: CI/PHPUnit/run_tests.sh

- name: Install PHP CS Fixer
run: composer require friendsofphp/php-cs-fixer --no-interaction --no-progress
env:
GHRUN: "yes"

- name: PHP CS Fixer
run: CI/PHP-CS-Fixer/run_check.sh
env:
GHRUN: "yes"
PR_NUMBER: ${{ github.event.pull_request.number }}

- name: Special Char Checker
run: CI/Special-Char-Checker/special-char-checker.sh
env:
GHRUN: "yes"
PR_NUMBER: ${{ github.event.pull_request.number }}
41 changes: 28 additions & 13 deletions CI/PHP-CS-Fixer/run_check.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
#!/bin/bash

source CI/Import/Functions.sh

CHANGED_FILES=$(get_changed_files)
for FILE in ${CHANGED_FILES}
do
echo "Check file: ${FILE}"
RUNCSFIXER=$(libs/composer/vendor/bin/php-cs-fixer fix --using-cache=no --diff --config=./CI/PHP-CS-Fixer/code-format.php_cs ${FILE})
RESULT=$?
if [[ ${RESULT} -ne 0 ]]
then
exit ${RESULT}
if [[ -z ${GHRUN} ]]
then
RUNCSFIXER=$(libs/composer/vendor/bin/php-cs-fixer fix --using-cache=no --dry-run -vvv --config=./CI/PHP-CS-Fixer/code-format.php_cs)
RESULT=$?
if [[ ${RESULT} -ne 0 ]]
then
exit ${RESULT}
fi
done
exit 0
exit 0
else
# run at github actions
source CI/Import/Functions.sh

CHANGED_FILES=$(get_changed_files)
for FILE in ${CHANGED_FILES}
do
if [ -f ${FILE} ]
then
echo "Check file: ${FILE}"
RUNCSFIXER=$(libs/composer/vendor/bin/php-cs-fixer fix --using-cache=no --diff --config=./CI/PHP-CS-Fixer/code-format.php_cs ${FILE})
RESULT=$?
if [[ ${RESULT} -ne 0 ]]
then
exit ${RESULT}
fi
fi
done
exit 0
fi
49 changes: 48 additions & 1 deletion CI/Special-Char-Checker/special-char-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
source CI/Import/Functions.sh

# get the files from this PR to the last head
CHANGED_FILES=$(get_changed_files)

if [[ -z ${GHRUN} ]]
then
CHANGED_FILES=$(find . -path ./libs -prune -o -type f -name '*.php')
else
CHANGED_FILES=$(get_changed_files)
fi

echo "Scanning changed files for special chars ..."

Expand All @@ -36,49 +42,90 @@ do
continue
fi

if [[ -z ${GHRUN} ]]
then
echo -ne "."
fi

TWOB=$(grep -n -C 0 "$(printf %b '\u200b')" $FELONE) | cut -d: -f1;
if [ "$TWOB" ]; then
FILES+=("u200b found in $PHPFILE see line(s) $TWOB")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

TWOC=$(grep -n -C 0 "$(printf %b '\u200c')" $FELONE) | cut -d: -f1;
if [ "$TWOC" ]; then
FILES+=("u200c found in $PHPFILE see line(s) $TWOC")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

TWOD=$(grep -n -C 0 "$(printf %b '\u200d')" $FELONE) | cut -d: -f1;
if [ "$TWOD" ]; then
FILES+=("u200d found in $PHPFILE see line(s) $TWOD")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

TWOE=$(grep -n -C 0 "$(printf %b '\u200e')" $FELONE) | cut -d: -f1;
if [ "$TWOE" ]; then
FILES+=("u200e found in $PHPFILE see line(s) $TWOE")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

TWOF=$(grep -n -C 0 "$(printf %b '\u200f')" $FELONE | cut -d: -f1);
if [ "$TWOF" ]; then
FILES+=("u200f found in $PHPFILE see line(s) $TWOF")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

FEFF=$(grep -n -C 0 "$(printf %b '\ufeff')" $FELONE | cut -d: -f1);
if [ "$FEFF" ]; then
FILES+=("ufeff found in $PHPFILE see line(s) $FEFF")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

OOOT=$(grep -n -C 0 "$(printf %b '\u0003')" $FELONE | cut -d: -f1);
if [ "$OOOT" ]; then
FILES+=("u0003 found in $PHPFILE see line(s) $OOOT")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

OTWOE=$(grep -n -C 0 "$(printf %b '\u2028')" $FELONE | cut -d: -f1);
if [ "$OTWOE" ]; then
FILES+=("u2028 found in $PHPFILE see line(s) $OTWOE")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi

OOAO=$(grep -n -C 0 "$(printf %b '\u00A0' | tr -d '\n')" $FELONE | cut -d: -f1);
if [ "$OOAO" ]; then
FILES+=("u00A0 found in $PHPFILE see line(s) $OOAO")
if [[ -z ${GHRUN} ]]
then
echo -ne "F"
fi
fi
done;

Expand Down
3 changes: 2 additions & 1 deletion Modules/Blog/classes/class.ilObjBlogAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public static function _checkGoto($a_target)
}

// #12648
if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
if ($ilAccess->checkAccess("read", "", $t_arr[1]) ||
$ilAccess->checkAccess("visible", "", $t_arr[1])) {
return true;
}
return false;
Expand Down
8 changes: 7 additions & 1 deletion Modules/Blog/classes/class.ilObjBlogGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -2994,6 +2994,7 @@ public static function _goto($a_target)
global $DIC;

$ilCtrl = $DIC->ctrl();
$access = $DIC->access();

if (substr($a_target, -3) == "wsp") {
$id = explode("_", $a_target);
Expand Down Expand Up @@ -3031,7 +3032,12 @@ public static function _goto($a_target)
$ilCtrl->setParameterByClass("ilRepositoryGUI", "edt", $id[2]);
}
}
$ilCtrl->redirectByClass("ilRepositoryGUI", "preview");
if ($access->checkAccess("read", "", $id[0])) {
$ilCtrl->redirectByClass("ilRepositoryGUI", "preview");
}
if ($access->checkAccess("visible", "", $id[0])) {
$ilCtrl->redirectByClass("ilRepositoryGUI", "infoScreen");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ protected function fillRow($a_set)
}

if ($this->may_assign && $assign_possible) {
if (!empty(ilBookingParticipant::getAssignableParticipants($a_set["booking_object_id"]))) {
// note: this call is currently super expensive
// see #26388, it has been performed even for users without edit permissions before
// now the call has been moved here, but still this needs improvement
// EDIT: deactivated for now due to performance reasons
//if (!empty(ilBookingParticipant::getAssignableParticipants($a_set["booking_object_id"]))) {
if (is_object($this->filter['period']['from'])) {
$ilCtrl->setParameterByClass(
"ilbookingprocessgui",
Expand All @@ -406,7 +410,7 @@ protected function fillRow($a_set)
);

$ilCtrl->setParameterByClass("ilbookingprocessgui", 'sseed', '');
}
//}
}

if ($a_set['info_file']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public static function _checkGoto($a_target)
return false;
}

if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
if ($ilAccess->checkAccess("read", "", $t_arr[1]) ||
$ilAccess->checkAccess("visible", "", $t_arr[1])) {
return true;
}
return false;
Expand Down
2 changes: 2 additions & 0 deletions Modules/BookingManager/classes/class.ilObjBookingPoolGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ public static function _goto($a_target)

if ($ilAccess->checkAccess("read", "", $a_target)) {
ilObjectGUI::_gotoRepositoryNode($a_target, "render");
} elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
} elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
ilUtil::sendFailure(sprintf(
$lng->txt("msg_no_perm_read_item"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function checkInput()
public static function getPostData($a_post_var, $a_remove_invalid = true)
{
$res = array();
for ($loop = 0; $loop < 24; $loop++) {
for ($loop = 0; $loop < 240; $loop++) {
$days = $_POST[$a_post_var . "_days~" . $loop];
$from = self::parseTime(
$_POST[$a_post_var . "_from_hh~" . $loop],
Expand Down
3 changes: 2 additions & 1 deletion Modules/Category/classes/class.ilObjCategoryAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public static function _checkGoto($a_target)
return false;
}

if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
if ($ilAccess->checkAccess("read", "", $t_arr[1]) ||
$ilAccess->checkAccess("visible", "", $t_arr[1])) {
return true;
}
return false;
Expand Down
2 changes: 2 additions & 0 deletions Modules/Category/classes/class.ilObjCategoryGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,8 @@ public static function _goto($a_target)

if ($ilAccess->checkAccess("read", "", $a_target)) {
ilObjectGUI::_gotoRepositoryNode($a_target);
} elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
} elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
ilUtil::sendFailure(sprintf(
$lng->txt("msg_no_perm_read_item"),
Expand Down
1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/_mocha

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/esparse

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/esvalidate

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/flat

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/he

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/js-yaml

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/mkdirp

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/mocha

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/semver

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Chatroom/chat/node_modules/.bin/which

This file was deleted.

Loading

0 comments on commit d995cae

Please sign in to comment.