Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ajax/dropdownAllItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
*/

header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
Session::checkLoginUser();
\Html::header_nocache();
\Session::checkLoginUser();

global $CFG_GLPI;

Expand All @@ -47,15 +47,15 @@

$rand = mt_rand();

$field_id = Html::cleanId("dropdown_" . $_POST["name"] . $rand);
$field_id = \Html::cleanId("dropdown_" . $_POST["name"] . $rand);

$p = [
'value' => 0,
'valuename' => Dropdown::EMPTY_VALUE,
'itemtype' => $_POST["idtable"],
'display_emptychoice' => true,
'displaywith' => ['otherserial', 'serial'],
'_idor_token' => Session::getNewIDORToken($_POST["idtable"]),
'_idor_token' => \Session::getNewIDORToken($_POST["idtable"]),
];
if (isset($_POST['value'])) {
$p['value'] = $_POST['value'];
Expand All @@ -75,7 +75,7 @@
$p['condition'] = Dropdown::addNewCondition(["id" =>$user_groups]);
}

echo Html::jsAjaxDropdown(
echo \Html::jsAjaxDropdown(
$_POST["name"],
$field_id,
$CFG_GLPI['root_doc'] . "/ajax/" . $link,
Expand Down
4 changes: 2 additions & 2 deletions ajax/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
use GlpiPlugin\Consumables\Request;
use GlpiPlugin\Consumables\Validation;

Session::checkRight('plugin_consumables_request', 1);
Session::checkLoginUser();
\Session::checkRight('plugin_consumables_request', 1);
\Session::checkLoginUser();

switch ($_POST['action']) {
case 'addToCart':
Expand Down
4 changes: 2 additions & 2 deletions front/option.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

use GlpiPlugin\Consumables\Option;

Session::checkLoginUser();
\Session::checkLoginUser();

$option = new Option();

if (isset($_POST["add_groups"])
|| isset($_POST["delete_groups"])
|| isset($_POST["update"])) {
$option->update($_POST);
Html::back();
\Html::back();
}
16 changes: 8 additions & 8 deletions front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
use GlpiPlugin\Consumables\Wizard;
use GlpiPlugin\Servicecatalog\Main;

Session::checkLoginUser();
\Session::checkLoginUser();

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
\Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
} else {
if (Plugin::isPluginActive('servicecatalog')) {
if (\Plugin::isPluginActive('servicecatalog')) {
Main::showDefaultHeaderHelpdesk(Wizard::getTypeName(2));
} else {
Html::helpHeader(Wizard::getTypeName(2));
\Html::helpHeader(Wizard::getTypeName(2));
}
}

Expand All @@ -60,14 +60,14 @@
];
Search::showList(Validation::class,$p);

if (Session::getCurrentInterface() != 'central'
&& Plugin::isPluginActive('servicecatalog')) {
if (\Session::getCurrentInterface() != 'central'
&& \Plugin::isPluginActive('servicecatalog')) {

Main::showNavBarFooter('consumables');
}

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::footer();
\Html::footer();
} else {
Html::helpFooter();
\Html::helpFooter();
}
16 changes: 8 additions & 8 deletions front/wizard.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
use GlpiPlugin\Consumables\Wizard;
use GlpiPlugin\Servicecatalog\Main;

Session::checkRight('plugin_consumables_request', READ);
\Session::checkRight('plugin_consumables_request', READ);

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
\Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
} else {
if (Plugin::isPluginActive('servicecatalog')) {
if (\Plugin::isPluginActive('servicecatalog')) {
Main::showDefaultHeaderHelpdesk(Wizard::getTypeName(2));
} else {
Html::helpHeader(Wizard::getTypeName(2));
\Html::helpHeader(Wizard::getTypeName(2));
}
}

Expand Down Expand Up @@ -76,14 +76,14 @@
}
}

if (Session::getCurrentInterface() != 'central'
&& Plugin::isPluginActive('servicecatalog')) {
if (\Session::getCurrentInterface() != 'central'
&& \Plugin::isPluginActive('servicecatalog')) {

Main::showNavBarFooter('consumables');
}

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::footer();
\Html::footer();
} else {
Html::helpFooter();
\Html::helpFooter();
}
16 changes: 8 additions & 8 deletions front/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@
use GlpiPlugin\Consumables\Wizard;
use GlpiPlugin\Servicecatalog\Main;

Session::checkRight('plugin_consumables_request', READ);
\Session::checkRight('plugin_consumables_request', READ);

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
\Html::header(Wizard::getTypeName(2), '', "management", Menu::class);
} else {
if (Plugin::isPluginActive('servicecatalog')) {
if (\Plugin::isPluginActive('servicecatalog')) {
Main::showDefaultHeaderHelpdesk(Wizard::getTypeName(2));
} else {
Html::helpHeader(Wizard::getTypeName(2));
\Html::helpHeader(Wizard::getTypeName(2));
}
}

$wizard = new Wizard();
$wizard->showMenu();

if (Session::getCurrentInterface() != 'central'
&& Plugin::isPluginActive('servicecatalog')) {
if (\Session::getCurrentInterface() != 'central'
&& \Plugin::isPluginActive('servicecatalog')) {

Main::showNavBarFooter('consumables');
}

if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::footer();
\Html::footer();
} else {
Html::helpFooter();
\Html::helpFooter();
}
Loading