Skip to content

Commit 017a358

Browse files
committed
Merge branch '10.0/bugfixes'
2 parents 9dda5a3 + e92f6a9 commit 017a358

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2644
-2090
lines changed

.github/workflows/audit_dependencies.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
include:
22-
- {branch: "9.5/bugfixes", php-version: "7.2"}
2322
- {branch: "10.0/bugfixes", php-version: "7.4"}
2423
env:
2524
COMPOSE_FILE: ".github/actions/docker-compose-app.yml"

.webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ var filesToCopy = [
183183
// SCSS files
184184
{
185185
package: '@fontsource/inter',
186-
from: '{scss/mixins.scss,files/*[0-9]00*.woff2}',
186+
from: '{scss/mixins.scss,files/*all-[0-9]00*.woff,files/*[0-9]00*.woff2}',
187187
to: scssOutputPath,
188188
},
189189
{

ajax/knowbase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
exit;
4848
}
4949

50+
$_SESSION['kb_cat_id'] = $_REQUEST['cat_id'] ?? 0;
51+
5052
switch ($_REQUEST['action']) {
5153
case "getItemslist":
5254
header("Content-Type: application/json; charset=UTF-8");

ajax/reservations.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
include('../inc/includes.php');
3737

38-
Session::checkRight('reservation', ReservationItem::RESERVEANITEM);
38+
Session::checkRightsOr('reservation', [READ, ReservationItem::RESERVEANITEM]);
3939

4040
if (!isset($_REQUEST["action"])) {
4141
exit;
@@ -47,6 +47,8 @@
4747
exit;
4848
}
4949

50+
Session::checkRight('reservation', ReservationItem::RESERVEANITEM);
51+
5052
if ($_REQUEST["action"] == "get_resources") {
5153
header("Content-Type: application/json; charset=UTF-8");
5254
echo json_encode(Reservation::getResources());

composer.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/includes/components/_debug-toolbar.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,14 @@
3939
box-shadow: none;
4040
}
4141

42-
.debug-toolbar-widgets .debug-toolbar-widget > button {
43-
box-shadow: none;
42+
.debug-toolbar-widgets .debug-toolbar-widget {
43+
&.active, &:hover {
44+
border-top: 3px solid $primary !important;
45+
margin-top : -3px;
46+
}
4447

45-
&.active {
46-
color: $primary;
48+
button {
49+
box-shadow: none;
4750
}
4851
}
4952

front/css.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@
4747
include_once GLPI_ROOT . "/inc/db.function.php";
4848
include_once GLPI_ROOT . '/inc/config.php';
4949

50-
if (Toolbox::getMemoryLimit() < (128 * 1024 * 1024)) {
51-
// Main CSS compilation requires about 90MB of memory.
52-
// Increase it a bit to ensure it will not reach memory limit.
53-
ini_set('memory_limit', '128M');
50+
// Main CSS compilation requires about 140MB of memory on PHP 7.4 (110MB on PHP 8.2).
51+
// Ensure to have enough memory to not reach memory limit.
52+
$max_memory = 192;
53+
if (Toolbox::getMemoryLimit() < ($max_memory * 1024 * 1024)) {
54+
ini_set('memory_limit', sprintf('%dM', $max_memory));
5455
}
5556

5657
// Ensure warnings will not break CSS output.

front/helpdesk.public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
])
8484
) {
8585
Html::redirect($CFG_GLPI['root_doc'] . "/front/ticket.php");
86-
} else if (Session::haveRight('reservation', ReservationItem::RESERVEANITEM)) {
86+
} else if (Session::haveRightsOr('reservation', [READ, ReservationItem::RESERVEANITEM])) {
8787
Html::redirect($CFG_GLPI['root_doc'] . "/front/reservationitem.php");
8888
} else if (Session::haveRight('knowbase', KnowbaseItem::READFAQ)) {
8989
Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.faq.php");

front/reservation.form.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
ksort($dates_to_add);
118118
if (
119119
count($dates_to_add)
120+
&& isset($_POST['items'])
120121
&& count($_POST['items'])
121122
&& isset($_POST['users_id'])
122123
) {

inc/relation.constant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@
10491049
],
10501050

10511051
'glpi_operatingsystems' => [
1052-
'_glpi_items_operatingsystems' => 'operatingsystems_id',
1052+
'glpi_items_operatingsystems' => 'operatingsystems_id',
10531053
'glpi_softwareversions' => 'operatingsystems_id',
10541054
],
10551055

0 commit comments

Comments
 (0)