Skip to content

Commit b4f7089

Browse files
committed
feat: drop layout : no longer exists in GLPI 10
1 parent 604416d commit b4f7089

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

front/issue.form.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@
5353
Html::redirect($CFG_GLPI['root_doc']."/front/helpdesk.public.php");
5454
}
5555

56-
// force layout of glpi
57-
PluginFormcreatorCommon::saveLayout();
58-
$_SESSION['glpilayout'] = "lefttab";
59-
6056
/** @var PluginFormcreatorIssue $issue */
6157
$issue = PluginFormcreatorIssue::getById((int) $_REQUEST['id']);
6258

@@ -91,7 +87,6 @@
9187
} else {
9288
Html::header($header);
9389
}
94-
PluginFormcreatorCommon::restoreLayout();
9590
Html::displayNotFoundError();
9691
}
9792

@@ -100,5 +95,3 @@
10095
} else {
10196
Html::footer();
10297
}
103-
104-
PluginFormcreatorCommon::restoreLayout();

inc/common.class.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,6 @@ public static function checkRegex($regex) {
598598
return $isValid;
599599
}
600600

601-
public static function saveLayout() {
602-
$_SESSION['plugin_formcreator']['layout_backup'] = $_SESSION['glpilayout'];
603-
}
604-
605-
public static function restoreLayout() {
606-
$_SESSION['glpilayout'] = $_SESSION['plugin_formcreator']['layout_backup'] ?? $_SESSION['glpilayout'];
607-
}
608-
609601
/**
610602
* Find documents data matching the tags found in the string
611603
* Tags are deduplicated

inc/issue.class.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,10 @@ public function displayExtended($options = []) {
288288
}
289289
$itemtype = $this->fields['itemtype'];
290290
if (!class_exists($itemtype)) {
291-
PluginFormcreatorCommon::restoreLayout();
292291
Html::displayNotFoundError();
293292
}
294293
$item = new $itemtype();
295294
if (!$item->getFromDB($this->fields['items_id'])) {
296-
PluginFormcreatorCommon::restoreLayout();
297295
Html::displayNotFoundError();
298296
}
299297

@@ -321,7 +319,6 @@ public function displayExtended($options = []) {
321319
$this->showNavigationHeader($options);
322320

323321
if (!$item->canViewItem()) {
324-
PluginFormcreatorCommon::restoreLayout();
325322
Html::displayNotFoundError();
326323
}
327324

@@ -337,12 +334,10 @@ public function displaySimplified($options = []) {
337334
}
338335
$itemtype = $this->fields['itemtype'];
339336
if (!class_exists($itemtype)) {
340-
PluginFormcreatorCommon::restoreLayout();
341337
Html::displayNotFoundError();
342338
}
343339
$item = new $itemtype();
344340
if (!$item->getFromDB($this->fields['items_id'])) {
345-
PluginFormcreatorCommon::restoreLayout();
346341
Html::displayNotFoundError();
347342
}
348343

@@ -398,10 +393,6 @@ public function displaySimplified($options = []) {
398393
}
399394
unset($options['_item']);
400395

401-
// force recall of ticket in layout
402-
PluginFormcreatorCommon::saveLayout();
403-
$_SESSION['glpilayout'] = "lefttab";
404-
405396
if ($item instanceof Ticket) {
406397
//Tickets without form associated or single ticket for an answer
407398
$satisfaction = new TicketSatisfaction();
@@ -428,9 +419,6 @@ public function displaySimplified($options = []) {
428419
$item->showTabsContent($options);
429420
echo '</div>';
430421
}
431-
432-
// restore layout
433-
PluginFormcreatorCommon::restoreLayout();
434422
}
435423

436424
/**

0 commit comments

Comments
 (0)