Skip to content

Commit a87559a

Browse files
committed
Merge branch 'release/2.7.0'
2 parents be1122e + 4e376f3 commit a87559a

14 files changed

+369
-117
lines changed

composer.lock

+165-83
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fields/field.constant.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124

125125
$GO_FIELDS['groups_id']['name'] = __("Group");
126126
$GO_FIELDS['groups_id']['input_type'] = 'dropdown';
127-
$GO_FIELDS['groups_id']['condition'] = '`is_itemgroup`';
127+
$GO_FIELDS['groups_id']['condition'] = ['is_itemgroup' => 1];
128128

129129
$GO_FIELDS['manufacturers_id']['name'] = __("Manufacturer");
130130
$GO_FIELDS['manufacturers_id']['input_type'] = 'dropdown';
@@ -143,4 +143,4 @@
143143

144144
$GO_FIELDS['groups_id_tech']['name'] = __("Group in charge of the hardware");
145145
$GO_FIELDS['groups_id_tech']['input_type'] = 'dropdown';
146-
$GO_FIELDS['groups_id_tech']['condition'] = '`is_assign`';
146+
$GO_FIELDS['groups_id_tech']['condition'] = ['is_assign' => 1];

genericobject.xml

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<author>Walid Nouh</author>
2525
</authors>
2626
<versions>
27+
<version>
28+
<num>2.7.0</num>
29+
<compatibility>9.4</compatibility>
30+
</version>
2731
<version>
2832
<num>2.6.2</num>
2933
<compatibility>9.3</compatibility>

hook.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function plugin_genericobject_uninstall() {
198198
function plugin_datainjection_populate_genericobject() {
199199
global $INJECTABLE_TYPES;
200200
$type = new PluginGenericobjectType();
201-
foreach ($type->find("`use_plugin_datainjection`='1' AND `is_active`='1'") as $data) {
201+
foreach ($type->find(['use_plugin_datainjection' => 1, 'is_active' => 1]) as $data) {
202202
if (class_exists($data ['itemtype']."Injection")) {
203203
$INJECTABLE_TYPES[$data ['itemtype']."Injection"] = 'genericobject';
204204
}

inc/object.class.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -1027,17 +1027,16 @@ function transfer($new_entity) {
10271027
continue;
10281028
} else {
10291029
$tmp = [];
1030-
$where = "";
1030+
$where = [];
10311031
if ($dropdown instanceof CommonTreeDropdown) {
1032-
$tmp['completename'] = $dropdown->fields['completename'];
1033-
$where = "`completename`='".
1034-
Toolbox::addslashes_deep($tmp['completename'])."'";
1032+
$tmp['completename'] = $dropdown->fields['completename'];
1033+
$where['completename'] = Toolbox::addslashes_deep($tmp['completename']);
10351034
} else {
1036-
$tmp['name'] = $dropdown->fields['name'];
1037-
$where = "`name`='".Toolbox::addslashes_deep($tmp['name'])."'";
1035+
$tmp['name'] = $dropdown->fields['name'];
1036+
$where['name'] = Toolbox::addslashes_deep($tmp['name']);
10381037
}
1039-
$tmp['entities_id'] = $new_entity;
1040-
$where .= " AND `entities_id`='".$tmp['entities_id']."'";
1038+
$tmp['entities_id'] = $new_entity;
1039+
$where['entities_id'] = $tmp['entities_id'];
10411040
//There's a dropdown value in the target entity
10421041
if ($found = $dropdown->find($where)) {
10431042
$myfound = array_pop($found);

inc/type.class.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ public static function removeDataInjectionModels($itemtype) {
14841484
//Delete if exists datainjection models
14851485
if ($plugin->isInstalled("datainjection") && $plugin->isActivated("datainjection")) {
14861486
$model = new PluginDatainjectionModel();
1487-
foreach ($model->find("`itemtype`='$itemtype'") as $data) {
1487+
foreach ($model->find(['itemtype' => $itemtype]) as $data) {
14881488
$model->delete($data);
14891489
}
14901490
}
@@ -1498,7 +1498,7 @@ public static function removeDataInjectionModels($itemtype) {
14981498
*/
14991499
public static function deleteLoans($itemtype) {
15001500
$reservation_item = new ReservationItem();
1501-
foreach ($reservation_item->find("`itemtype`='$itemtype'") as $data) {
1501+
foreach ($reservation_item->find(['itemtype' => $itemtype]) as $data) {
15021502
$reservation_item->delete($data);
15031503
}
15041504
}
@@ -1533,7 +1533,7 @@ public static function deleteNotepad($itemtype) {
15331533
*/
15341534
static function deleteNetworking($itemtype) {
15351535
$networkport = new NetworkPort();
1536-
foreach ($networkport->find("`itemtype`='$itemtype'") as $port) {
1536+
foreach ($networkport->find(['itemtype' => $itemtype]) as $port) {
15371537
$networkport->delete($port);
15381538
}
15391539
}

locales/fi_FI.mo

3 KB
Binary file not shown.

locales/fi_FI.po

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
#
5+
# Translators:
6+
# Markku Vepsä, 2018
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: GLPI Plugin - Genericobject\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2018-06-22 13:21+0000\n"
12+
"PO-Revision-Date: 2018-11-13 19:30+0000\n"
13+
"Last-Translator: Markku Vepsä\n"
14+
"Language-Team: Finnish (Finland) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/fi_FI/)\n"
15+
"MIME-Version: 1.0\n"
16+
"Content-Type: text/plain; charset=UTF-8\n"
17+
"Content-Transfer-Encoding: 8bit\n"
18+
"Language: fi_FI\n"
19+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20+
21+
#: front/type.php:38 front/object.php:33 inc/profile.class.php:287
22+
#: inc/type.class.php:66
23+
msgid "Type of objects"
24+
msgstr "Kohteiden tyyppi"
25+
26+
#: front/type.form.php:73 front/familylist.php:33 front/familylist.php:41
27+
#: index.php:58 inc/object_item.class.php:109 inc/profile.class.php:39
28+
#: inc/type.class.php:289 inc/type.class.php:415 setup.php:193
29+
msgid "Objects management"
30+
msgstr "Kohteiden hallinta"
31+
32+
#: front/field.form.php:41
33+
msgid "Field(s) deleted successfully"
34+
msgstr "Kenttä/kentät poistettu onnistuneesti"
35+
36+
#: front/field.form.php:51
37+
msgid "Field added successfully"
38+
msgstr "Kenttä lisätty onnistuneesti"
39+
40+
#: front/commondropdown.php:11 front/commontreedropdown.form.php:36
41+
#: front/commondropdown.form.php:36
42+
msgid "The requested dropdown does not exists"
43+
msgstr "Pyydettyä alasvetovalikkoa ei ole olemassa"
44+
45+
#: front/familylist.php:37 index.php:68
46+
msgid "Empty family"
47+
msgstr "Tyhjä perhe"
48+
49+
#: inc/profile.class.php:141
50+
msgid "General"
51+
msgstr "Yleinen"
52+
53+
#: inc/profile.class.php:147
54+
msgid "Objects"
55+
msgstr "Kohteet"
56+
57+
#: inc/profile.class.php:149
58+
msgid "(No types defined yet)"
59+
msgstr "(Tyyppejä ei ole vielä määritelty)"
60+
61+
#: inc/field.class.php:64
62+
msgid "Fields associated with the object"
63+
msgstr "Kohteeseen liittyvät kentät"
64+
65+
#: inc/field.class.php:70
66+
msgid "Label"
67+
msgstr "Etiketti"
68+
69+
#: inc/field.class.php:71
70+
msgid "Name in DB"
71+
msgstr "Nimi tietokannassa"
72+
73+
#: inc/field.class.php:126
74+
msgid "Add new field"
75+
msgstr "Lisää uusi kenttä"
76+
77+
#: inc/field.class.php:317
78+
msgid "Read-only field"
79+
msgstr "Vain luku kenttä"
80+
81+
#: inc/type.class.php:153
82+
msgid "Type name is missing"
83+
msgstr "Tyyppinimi puuttuu"
84+
85+
#: inc/type.class.php:159
86+
msgid "Type name must be longer"
87+
msgstr "Tyyppinimen on oltava pidempi"
88+
89+
#: inc/type.class.php:165
90+
msgid ""
91+
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
92+
msgstr "Tyypit \"kenttä\", \"kohde\" ja \"tyyppi\" ovat varattuja. Valitse joku toinen"
93+
94+
#: inc/type.class.php:172
95+
msgid "Type must start with a letter"
96+
msgstr "Tyypin täytyy alkaa kirjaimella"
97+
98+
#: inc/type.class.php:179
99+
msgid "A type already exists with the same name"
100+
msgstr "Samanniminen tyyppi on jo olemassa"
101+
102+
#: inc/type.class.php:376 inc/type.class.php:505 inc/typefamily.class.php:36
103+
msgid "Family of type of objects"
104+
msgstr "Kohteiden tyypin perhe"
105+
106+
#: inc/type.class.php:466
107+
msgid "Internal identifier"
108+
msgstr "Sisäinen tunniste"
109+
110+
#: inc/type.class.php:520
111+
msgid "Behaviour"
112+
msgstr "Käyttäytyminen"
113+
114+
#: inc/type.class.php:539
115+
msgid "Network connections"
116+
msgstr "Verkkoyhteydet"
117+
118+
#: inc/type.class.php:543
119+
msgid "injection file plugin"
120+
msgstr "Tiedoston tuonti -liitännäinen"
121+
122+
#: inc/type.class.php:545
123+
msgid "geninventorynumber plugin"
124+
msgstr "Inventaarinumeron luonti liitännäinen"
125+
126+
#: inc/type.class.php:546
127+
msgid "order plugin"
128+
msgstr "Tilaus -liitännäinen"
129+
130+
#: inc/type.class.php:547
131+
msgid "item's uninstallation plugin"
132+
msgstr "Kohteen poisto -liitännäinen"
133+
134+
#: inc/type.class.php:548
135+
msgid "simcard plugin"
136+
msgstr "SIM-kortti -liitännäinen"
137+
138+
#: inc/type.class.php:700
139+
msgid "Regenerate files"
140+
msgstr "Luo tiedostot uudelleen"
141+
142+
#: inc/type.class.php:713
143+
msgid "Link to other objects"
144+
msgstr "Linkki muihin kohteisiin"
145+
146+
#. TRANS: %1$s is itemtype name
147+
#: inc/type.class.php:2017
148+
#, php-format
149+
msgid "Unable to load the class %1$s."
150+
msgstr "Ei voida ladata luokkaa %1$s."
151+
152+
#. TRANS: %1$s is itemtype name
153+
#: inc/type.class.php:2019
154+
#, php-format
155+
msgid ""
156+
"You probably have garbage data in your database for this plugin and missing "
157+
"files in %1$s"
158+
msgstr "Tietokannassa on ongelma liittyen liitännäiseen ja puuttuvia tiedostoja %1$s"
159+
160+
#: inc/object.class.php:471
161+
msgid "Object preview"
162+
msgstr "Kohteen esikatselu"
163+
164+
#: inc/object.class.php:751
165+
msgid "You must configure rights to enable the preview"
166+
msgstr "Oikeudet on määritettävä, jotta esikatselu voidaan ottaa käyttöön"

locales/it_IT.mo

217 Bytes
Binary file not shown.

locales/it_IT.po

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
# This file is distributed under the same license as the PACKAGE package.
44
#
55
# Translators:
6+
# Pierfrancesco Passerini <[email protected]>, 2018
67
# Salvatore Russo <[email protected]>, 2016
78
# Giudy <[email protected]>, 2018
89
msgid ""
910
msgstr ""
1011
"Project-Id-Version: GLPI Plugin - Genericobject\n"
1112
"Report-Msgid-Bugs-To: \n"
1213
"POT-Creation-Date: 2018-06-22 13:21+0000\n"
13-
"PO-Revision-Date: 2018-06-21 11:16+0000\n"
14-
"Last-Translator: Giudy <[email protected]>\n"
14+
"PO-Revision-Date: 2018-09-25 13:46+0000\n"
15+
"Last-Translator: Pierfrancesco Passerini <[email protected]>\n"
1516
"Language-Team: Italian (Italy) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/it_IT/)\n"
1617
"MIME-Version: 1.0\n"
1718
"Content-Type: text/plain; charset=UTF-8\n"
@@ -32,7 +33,7 @@ msgstr "Gestione degli Oggetti"
3233

3334
#: front/field.form.php:41
3435
msgid "Field(s) deleted successfully"
35-
msgstr "Campo(i) rimosso/i con successo"
36+
msgstr "Campi rimossi con successo"
3637

3738
#: front/field.form.php:51
3839
msgid "Field added successfully"
@@ -94,7 +95,7 @@ msgstr "I tipi 'field', 'object' e 'type' sono riservati. Sceglierne un altro"
9495

9596
#: inc/type.class.php:172
9697
msgid "Type must start with a letter"
97-
msgstr "Il nome del tipo deve cominciare con una lettera"
98+
msgstr "Il nome del tipo deve iniziare con una lettera"
9899

99100
#: inc/type.class.php:179
100101
msgid "A type already exists with the same name"
@@ -156,7 +157,7 @@ msgstr "Impossibile caricare la classe %1$s ."
156157
msgid ""
157158
"You probably have garbage data in your database for this plugin and missing "
158159
"files in %1$s"
159-
msgstr ""
160+
msgstr "Per questo plugin hai, probabilmente, dei dati inutili nel tuo database e file mancanti in %1$s"
160161

161162
#: inc/object.class.php:471
162163
msgid "Object preview"

locales/pt_BR.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This file is distributed under the same license as the PACKAGE package.
44
#
55
# Translators:
6-
# polar147 <[email protected]>, 2017
6+
# Andrei Bernardo Simoni <[email protected]>, 2017
77
# Arthur Ramos Schaefer <[email protected]>, 2017
88
msgid ""
99
msgstr ""

locales/sv_SE.mo

-22 Bytes
Binary file not shown.

locales/sv_SE.po

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
# This file is distributed under the same license as the PACKAGE package.
44
#
55
# Translators:
6-
# Johan Hörnqvist <[email protected]>, 2018
6+
# jchan <[email protected]>, 2018
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: GLPI Plugin - Genericobject\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2018-06-22 13:21+0000\n"
12-
"PO-Revision-Date: 2018-09-06 22:04+0000\n"
13-
"Last-Translator: Johan Hörnqvist <[email protected]>\n"
12+
"PO-Revision-Date: 2018-09-10 09:31+0000\n"
13+
"Last-Translator: jchan <[email protected]>\n"
1414
"Language-Team: Swedish (Sweden) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/sv_SE/)\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
@@ -31,7 +31,7 @@ msgstr "Hantera tillgångar"
3131

3232
#: front/field.form.php:41
3333
msgid "Field(s) deleted successfully"
34-
msgstr "Attribut raderat"
34+
msgstr "Fältet(en) raderades"
3535

3636
#: front/field.form.php:51
3737
msgid "Field added successfully"
@@ -60,7 +60,7 @@ msgstr "(Inga typer har skapats ännu)"
6060

6161
#: inc/field.class.php:64
6262
msgid "Fields associated with the object"
63-
msgstr "Attribut kopplade till tillgången"
63+
msgstr "Fält kopplade till tillgången"
6464

6565
#: inc/field.class.php:70
6666
msgid "Label"
@@ -72,15 +72,15 @@ msgstr "Namn i DB"
7272

7373
#: inc/field.class.php:126
7474
msgid "Add new field"
75-
msgstr "Lägg till nytt attribut"
75+
msgstr "Lägg till nytt fält"
7676

7777
#: inc/field.class.php:317
7878
msgid "Read-only field"
79-
msgstr "Skrivskyddat attribut"
79+
msgstr "Skrivskyddat fält"
8080

8181
#: inc/type.class.php:153
8282
msgid "Type name is missing"
83-
msgstr "Typnamnet saknas"
83+
msgstr "Typnamn saknas"
8484

8585
#: inc/type.class.php:159
8686
msgid "Type name must be longer"
@@ -89,7 +89,7 @@ msgstr "Typnamnet måste vara längre"
8989
#: inc/type.class.php:165
9090
msgid ""
9191
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
92-
msgstr "Typnamnen 'attribut', 'objekt' och 'typ' är reserverade av systemet. Var vänlig välj ett annat namn."
92+
msgstr "Typnamnen 'fält, 'objekt' och 'typ' är reserverade av systemet. Var vänlig välj ett annat namn."
9393

9494
#: inc/type.class.php:172
9595
msgid "Type must start with a letter"
@@ -101,7 +101,7 @@ msgstr "Typnamnet existerar redan"
101101

102102
#: inc/type.class.php:376 inc/type.class.php:505 inc/typefamily.class.php:36
103103
msgid "Family of type of objects"
104-
msgstr "Tillhör typfamilj"
104+
msgstr "Ingår i typfamilj"
105105

106106
#: inc/type.class.php:466
107107
msgid "Internal identifier"
@@ -155,7 +155,7 @@ msgstr "Kunde inte läsa in klass %1$s-"
155155
msgid ""
156156
"You probably have garbage data in your database for this plugin and missing "
157157
"files in %1$s"
158-
msgstr "Du har troligtvis skräpdata i databasen för denna plug-in och saknade filer i %1$s"
158+
msgstr "Du har troligtvis skräpdata i databasen för denna plug-in och saknar filer i %1$s"
159159

160160
#: inc/object.class.php:471
161161
msgid "Object preview"

0 commit comments

Comments
 (0)