Skip to content

Commit

Permalink
Minor: Format code - refs chamilo#4622
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Mar 4, 2023
1 parent 24ae904 commit db42118
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
26 changes: 13 additions & 13 deletions main/inc/lib/api.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -9130,19 +9130,19 @@ function api_get_configuration_value($variable)
if (is_array($_configuration[$variable]) && api_is_multiple_url_enabled() && is_int(array_keys($_configuration[$variable])[0])) {
// It has been configured for at least one sub URL so we will not return the complete variable
/*
* The idea is that if the first level key of the configuration variable is an int
* then it is a multiURL configuration and if it's a string then it's a configuration that is not multiURL.
* For example if in app/config/configuration.php you have set :
* $_configuration['ticket_project_user_roles'] = [
* 'permissions' => [
* 1 => [17] // project_id = 1, STUDENT_BOSS = 17
* ]
* ];
* You do not want to enter in this bloc even if multiURL is activated because the option is configured globaly
* and you want to return the full array.
* The is_int is to consider only the option that are array and configured for multiURL
* which means there is an int as the first level key of the array.
*/
* The idea is that if the first level key of the configuration variable is an int
* then it is a multiURL configuration and if it's a string then it's a configuration that is not multiURL.
* For example if in app/config/configuration.php you have set :
* $_configuration['ticket_project_user_roles'] = [
* 'permissions' => [
* 1 => [17] // project_id = 1, STUDENT_BOSS = 17
* ]
* ];
* You do not want to enter in this bloc even if multiURL is activated because the option is configured globaly
* and you want to return the full array.
* The is_int is to consider only the option that are array and configured for multiURL
* which means there is an int as the first level key of the array.
*/
// Check if it exists for the sub portal
if (array_key_exists($urlId, $_configuration[$variable])) {
return $_configuration[$variable][$urlId];
Expand Down
3 changes: 1 addition & 2 deletions plugin/text2speech/convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

$document = $documentRepo->findOneBy([
'cId' => $course->getId(),
'iid' => $item->getPath()
'iid' => $item->getPath(),
]);

if (!$document) {
Expand All @@ -68,4 +68,3 @@
}

$httpResponse->send();

0 comments on commit db42118

Please sign in to comment.