Skip to content

Commit 8a4821f

Browse files
MyvTsvRom1-B
authored andcommitted
GLPI11 Compatibility
1 parent 4515c53 commit 8a4821f

72 files changed

Lines changed: 528 additions & 741 deletions

Some content is hidden

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

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
name: "Generate CI matrix"
2121
uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1"
2222
with:
23-
glpi-version: "10.0.x"
23+
glpi-version: "11.0.x"
2424
ci:
2525
name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
2626
needs: "generate-ci-matrix"

ajax/common.tabs.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include('../../../inc/includes.php');
3231
header('Content-Type: text/html; charset=UTF-8');
3332
Html::header_nocache();
3433

3534
Session::checkLoginUser();
3635

3736
$common = new PluginMreportingCommon();
3837
$common->showCentral($_REQUEST);
39-
40-
Html::ajaxFooter();

ajax/dashboard.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include('../../../inc/includes.php');
3231
Html::header_nocache();
3332

3433
Session::checkLoginUser();

ajax/dropdownExport.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include('../../../inc/includes.php');
3231
header('Content-Type: text/html; charset=UTF-8');
3332
Html::header_nocache();
3433

@@ -59,7 +58,7 @@
5958
Html::Closeform();
6059
echo "<script type='text/javascript'>
6160
$('#export_svg_link').on('click', function () {
62-
var svg_content = vis{$randname}.scene[0].canvas.innerHTML;
61+
var svg_content = vis{" . htmlspecialchars($randname) . "}.scene[0].canvas.innerHTML;
6362
6463
var form = document.getElementById('export_svg_form');
6564
form.svg_content.value = svg_content;

ajax/dropdownGraphs.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
if (strpos($_SERVER['PHP_SELF'], 'dropdownGraphs.php')) {
32-
include('../../../inc/includes.php');
3332
header('Content-Type: text/html; charset=UTF-8');
3433
Html::header_nocache();
3534
}
@@ -42,5 +41,5 @@
4241
$_POST['name'] = $test[1];
4342

4443
$config = new PluginMreportingConfig();
45-
echo "&nbsp;<a href='" . $config->getFormURL() . '?name=' . $_POST['name'] . '&classname=' . $_POST['classname'] . "'>" . __('Send') . '</a>';
44+
echo "&nbsp;<a href='" . htmlspecialchars($config->getFormURL()) . '?name=' . htmlspecialchars($_POST['name']) . '&classname=' . htmlspecialchars($_POST['classname']) . "'>" . __('Send') . '</a>';
4645
}

ajax/get_new_crsf_token.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
$AJAX_INCLUDE = 1;
32-
include('../../../inc/includes.php');
3332

3433
header('Content-Type: text/html; charset=UTF-8');
3534
Html::header_nocache();

ajax/homepage_link.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include('../../../inc/includes.php');
31+
/** @var array $CFG_GLPI */
32+
global $CFG_GLPI;
3233

3334
Session::checkLoginUser();
3435

35-
echo '<li id="menu99"><a href="' . Plugin::getWebDir('mreporting') .
36+
echo '<li id="menu99"><a href="' . $CFG_GLPI['root_doc'] . '/plugins/mreporting' .
3637
'/front/dashboard.form.php" class="itemP">&nbsp;&nbsp;' .
3738
__('Dashboard', 'mreporting') . '&nbsp;&nbsp;</a></li>';

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"php": ">=7.4",
3+
"php": ">=8.2",
44
"masnathan/odtphp": "dev-teclib"
55
},
66
"require-dev": {
@@ -14,7 +14,7 @@
1414
"config": {
1515
"optimize-autoloader": true,
1616
"platform": {
17-
"php": "7.4.0"
17+
"php": "8.2.99"
1818
},
1919
"sort-packages": true,
2020
"allow-plugins": {

0 commit comments

Comments
 (0)