mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-10-13 20:24:34 +02:00
Feature GLP11 (#88)
* Feature GLP11 * phpstan * enable CI and fix phstanneon * Update .github/workflows/continuous-integration.yml Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Update phpstan.neon Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Pass all paramters to parent call * move query -> doQuery * fix direct query * release GLPI 11.0 * Clean composer.json * psalm + rector * fix --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> Co-authored-by: Johan Cwiklinski <johan@x-tnd.be> Co-authored-by: Rom1-B <rom1.biot@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
//header("Location:../../central.php");
|
||||
|
||||
// Entry menu case
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
|
||||
Session::checkRight('config', UPDATE);
|
||||
|
||||
@@ -45,5 +45,5 @@ Session::checkRight('config', UPDATE);
|
||||
Plugin::load('example');
|
||||
|
||||
Html::header('TITRE', $_SERVER['PHP_SELF'], 'config', 'plugins');
|
||||
echo __('This is the plugin config page', 'example');
|
||||
echo __s('This is the plugin config page', 'example');
|
||||
Html::footer();
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\DeviceCamera;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$dropdown = new DeviceCamera();
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$dropdown = new DeviceCamera();
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\Dropdown;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
Plugin::load('example', true);
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\Dropdown;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
Plugin::load('example', true);
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\Example;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\Example;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkRight(Example::$rightname, READ);
|
||||
|
||||
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
|
||||
|
@@ -28,7 +28,7 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
|
||||
Session::checkLoginUser();
|
||||
|
||||
@@ -39,21 +39,16 @@ if (isset($_GET['popup'])) {
|
||||
if (isset($_SESSION['glpipopup']['name'])) {
|
||||
switch ($_SESSION['glpipopup']['name']) {
|
||||
case 'test_rule':
|
||||
Html::popHeader(__('Test'), $_SERVER['PHP_SELF']);
|
||||
include '../../../front/rule.test.php';
|
||||
Html::popHeader(__s('Test'), $_SERVER['PHP_SELF']);
|
||||
include __DIR__ . '/../../../front/rule.test.php';
|
||||
break;
|
||||
|
||||
case 'test_all_rules':
|
||||
Html::popHeader(__('Test rules engine'), $_SERVER['PHP_SELF']);
|
||||
include '../../../front/rulesengine.test.php';
|
||||
break;
|
||||
|
||||
case 'show_cache':
|
||||
Html::popHeader(__('Cache information'), $_SERVER['PHP_SELF']);
|
||||
include '../../../front/rule.cache.php';
|
||||
Html::popHeader(__s('Test rules engine'), $_SERVER['PHP_SELF']);
|
||||
include __DIR__ . '/../../../front/rulesengine.test.php';
|
||||
break;
|
||||
}
|
||||
echo "<div class='center'><br><a href='javascript:window.close()'>" . __('Back') . '</a>';
|
||||
echo "<div class='center'><br><a href='javascript:window.close()'>" . __s('Back') . '</a>';
|
||||
echo '</div>';
|
||||
Html::popFooter();
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\RuleTestCollection;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$rulecollection = new RuleTestCollection();
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
use GlpiPlugin\Example\RuleTestCollection;
|
||||
|
||||
include('../../../inc/includes.php');
|
||||
include(__DIR__ . '/../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$rulecollection = new RuleTestCollection();
|
||||
|
Reference in New Issue
Block a user