mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-08-24 06:35:49 +02:00
Add php-cs-fixer
This commit is contained in:
@@ -37,13 +37,13 @@
|
||||
//header("Location:../../central.php");
|
||||
|
||||
// Entry menu case
|
||||
include ("../../../inc/includes.php");
|
||||
include('../../../inc/includes.php');
|
||||
|
||||
Session::checkRight("config", UPDATE);
|
||||
Session::checkRight('config', UPDATE);
|
||||
|
||||
// To be available when plugin in not activated
|
||||
Plugin::load('example');
|
||||
|
||||
Html::header("TITRE", $_SERVER['PHP_SELF'], "config", "plugins");
|
||||
echo __("This is the plugin config page", 'example');
|
||||
Html::header('TITRE', $_SERVER['PHP_SELF'], 'config', 'plugins');
|
||||
echo __('This is the plugin config page', 'example');
|
||||
Html::footer();
|
||||
|
@@ -35,8 +35,8 @@
|
||||
|
||||
use GlpiPlugin\Example\DeviceCamera;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$dropdown = new DeviceCamera();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
include(GLPI_ROOT . '/front/dropdown.common.form.php');
|
||||
|
@@ -33,8 +33,8 @@
|
||||
// Purpose of file:
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$dropdown = new DeviceCamera();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.php");
|
||||
include(GLPI_ROOT . '/front/dropdown.common.php');
|
||||
|
@@ -35,10 +35,10 @@
|
||||
|
||||
use GlpiPlugin\Example\Dropdown;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
Plugin::load('example', true);
|
||||
|
||||
$dropdown = new Dropdown();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||
include(GLPI_ROOT . '/front/dropdown.common.form.php');
|
||||
|
@@ -35,10 +35,10 @@
|
||||
|
||||
use GlpiPlugin\Example\Dropdown;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
Plugin::load('example', true);
|
||||
|
||||
$dropdown = new Dropdown();
|
||||
include (GLPI_ROOT . "/front/dropdown.common.php");
|
||||
include(GLPI_ROOT . '/front/dropdown.common.php');
|
||||
|
@@ -35,13 +35,13 @@
|
||||
|
||||
use GlpiPlugin\Example\Example;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
|
||||
Html::header("TITRE", $_SERVER['PHP_SELF'], "plugins", Example::class, "");
|
||||
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
|
||||
Html::header('TITRE', $_SERVER['PHP_SELF'], 'plugins', Example::class, '');
|
||||
} else {
|
||||
Html::helpHeader("TITRE", $_SERVER['PHP_SELF']);
|
||||
Html::helpHeader('TITRE', $_SERVER['PHP_SELF']);
|
||||
}
|
||||
|
||||
$example = new Example();
|
||||
|
@@ -35,13 +35,13 @@
|
||||
|
||||
use GlpiPlugin\Example\Example;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkRight(Example::$rightname, READ);
|
||||
|
||||
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
|
||||
Html::header("TITRE", $_SERVER['PHP_SELF'], "plugins", Example::class, "");
|
||||
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
|
||||
Html::header('TITRE', $_SERVER['PHP_SELF'], 'plugins', Example::class, '');
|
||||
} else {
|
||||
Html::helpHeader("TITRE", $_SERVER['PHP_SELF']);
|
||||
Html::helpHeader('TITRE', $_SERVER['PHP_SELF']);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -28,32 +28,32 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
|
||||
Session::checkLoginUser();
|
||||
|
||||
if (isset($_GET["popup"])) {
|
||||
$_SESSION["glpipopup"]["name"] = $_GET["popup"];
|
||||
if (isset($_GET['popup'])) {
|
||||
$_SESSION['glpipopup']['name'] = $_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";
|
||||
break;
|
||||
if (isset($_SESSION['glpipopup']['name'])) {
|
||||
switch ($_SESSION['glpipopup']['name']) {
|
||||
case 'test_rule':
|
||||
Html::popHeader(__('Test'), $_SERVER['PHP_SELF']);
|
||||
include '../../../front/rule.test.php';
|
||||
break;
|
||||
|
||||
case "test_all_rules" :
|
||||
Html::popHeader(__('Test rules engine'), $_SERVER['PHP_SELF']);
|
||||
include "../../../front/rulesengine.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";
|
||||
break;
|
||||
}
|
||||
echo "<div class='center'><br><a href='javascript:window.close()'>".__('Back')."</a>";
|
||||
echo "</div>";
|
||||
Html::popFooter();
|
||||
case 'show_cache':
|
||||
Html::popHeader(__('Cache information'), $_SERVER['PHP_SELF']);
|
||||
include '../../../front/rule.cache.php';
|
||||
break;
|
||||
}
|
||||
echo "<div class='center'><br><a href='javascript:window.close()'>" . __('Back') . '</a>';
|
||||
echo '</div>';
|
||||
Html::popFooter();
|
||||
}
|
||||
|
@@ -35,9 +35,9 @@
|
||||
|
||||
use GlpiPlugin\Example\RuleTestCollection;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$rulecollection = new RuleTestCollection();
|
||||
|
||||
include (GLPI_ROOT . "/front/rule.common.form.php");
|
||||
include(GLPI_ROOT . '/front/rule.common.form.php');
|
||||
|
@@ -35,9 +35,9 @@
|
||||
|
||||
use GlpiPlugin\Example\RuleTestCollection;
|
||||
|
||||
include ('../../../inc/includes.php');
|
||||
include('../../../inc/includes.php');
|
||||
Session::checkLoginUser();
|
||||
|
||||
$rulecollection = new RuleTestCollection();
|
||||
|
||||
include (GLPI_ROOT . "/front/rule.common.php");
|
||||
include(GLPI_ROOT . '/front/rule.common.php');
|
||||
|
Reference in New Issue
Block a user