Skip to content

Commit 4d66d9a

Browse files
committed
Prepare v11
1 parent 7eca946 commit 4d66d9a

9 files changed

Lines changed: 9 additions & 19 deletions

ajax/getEntitiesRights.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
use GlpiPlugin\Transferticketentity\Entity;
3333

34-
include("../../../inc/includes.php");
35-
3634
header("Content-Type: text/html; charset=UTF-8");
3735
Html::header_nocache();
3836

ajax/showentitygroups.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use GlpiPlugin\Transferticketentity\Ticket;
3535

3636
if (strpos($_SERVER['PHP_SELF'], "showentitygroups.php")) {
37-
include('../../../inc/includes.php');
3837
header("Content-Type: text/html; charset=UTF-8");
3938
Html::header_nocache();
4039
} elseif (!defined('GLPI_ROOT')) {

ajax/showentitymandatorygroup.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use GlpiPlugin\Transferticketentity\Entity;
3535

3636
if (strpos($_SERVER['PHP_SELF'], "showentitymandatorygroup.php")) {
37-
include('../../../inc/includes.php');
3837
header("Content-Type: text/html; charset=UTF-8");
3938
Html::header_nocache();
4039
} elseif (!defined('GLPI_ROOT')) {

ajax/showentitymandatoryjustification.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use GlpiPlugin\Transferticketentity\Entity;
3535

3636
if (strpos($_SERVER['PHP_SELF'], "showentitymandatoryjustification.php")) {
37-
include('../../../inc/includes.php');
3837
header("Content-Type: text/html; charset=UTF-8");
3938
Html::header_nocache();
4039
} elseif (!defined('GLPI_ROOT')) {

front/entity.form.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@
2929
* --------------------------------------------------------------------------
3030
*/
3131

32-
include('../../../inc/includes.php');
33-
3432
use GlpiPlugin\Transferticketentity\Entity;
3533
use GlpiPlugin\Transferticketentity\Ticket;
3634

37-
3835
Session::checkRight("entity", UPDATE);
3936

4037
$config = new Entity();

front/ticket.form.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
* --------------------------------------------------------------------------
3030
*/
3131

32-
33-
include('../../../inc/includes.php');
34-
3532
use GlpiPlugin\Transferticketentity\Ticket;
3633

3734
Session::checkRight("plugin_transferticketentity_use", READ);
File renamed without changes.

setup.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@
3333
use GlpiPlugin\Transferticketentity\Profile;
3434
use GlpiPlugin\Transferticketentity\Ticket;
3535

36+
Global $CFG_GLPI;
3637

37-
define('TRANSFERTICKETENTITY_VERSION', '1.1.4');
38+
define('TRANSFERTICKETENTITY_VERSION', '1.2.0');
3839

3940
if (!defined("PLUGIN_TRANSFERTICKETENTITY_DIR")) {
40-
define("PLUGIN_TRANSFERTICKETENTITY_WEBDIR", Plugin::getWebDir("transferticketentity", false));
41-
define("PLUGIN_TRANSFERTICKETENTITY_FULLWEBDIR", Plugin::getWebDir("transferticketentity"));
41+
$root = $CFG_GLPI['root_doc'] . '/plugins/transferticketentity';
42+
define("PLUGIN_TRANSFERTICKETENTITY_WEBDIR", $root);
4243
}
4344
function plugin_init_transferticketentity()
4445
{
@@ -68,8 +69,8 @@ function plugin_version_transferticketentity()
6869
'homepage' => 'https://github.com/InfotelGLPI/transferticketentity',
6970
'requirements' => [
7071
'glpi' => [
71-
'min' => '10.0',
72-
'max' => '11.0',
72+
'min' => '11.0',
73+
'max' => '12.0',
7374
'dev' => false
7475
]
7576
]];

templates/ticket.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
{% do call('Ajax::updateItemOnSelectEvent', [
7272
'dropdown_entity_choice' ~ rand,
7373
'show_entitygroup',
74-
config('root_doc') ~ '/' ~ root_plugin ~ '/ajax/showentitygroups.php',
74+
root_plugin ~ '/ajax/showentitygroups.php',
7575
{
7676
'entity_selection': '__VALUE__',
7777
'rand': rand
@@ -81,7 +81,7 @@
8181
{% do call('Ajax::updateItemOnSelectEvent', [
8282
'dropdown_entity_choice' ~ rand,
8383
'showmandatoryjustification',
84-
config('root_doc') ~ '/' ~ root_plugin ~ '/ajax/showentitymandatoryjustification.php',
84+
root_plugin ~ '/ajax/showentitymandatoryjustification.php',
8585
{
8686
'entity_selection': '__VALUE__',
8787
'rand': rand
@@ -91,7 +91,7 @@
9191
{% do call('Ajax::updateItemOnSelectEvent', [
9292
'dropdown_entity_choice' ~ rand,
9393
'showmandatorygroup',
94-
config('root_doc') ~ '/' ~ root_plugin ~ '/ajax/showentitymandatorygroup.php',
94+
root_plugin ~ '/ajax/showentitymandatorygroup.php',
9595
{
9696
'entity_selection': '__VALUE__',
9797
'rand': rand

0 commit comments

Comments
 (0)