define.php 28.3 KB
Newer Older
1
<?php
2 3 4
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
5
 * Copyright (C) 2015-2018 Teclib' and contributors.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
31 32
*/

remi's avatar
remi committed
33
// Current version of GLPI
34
define('GLPI_VERSION', '10.0.0-dev');
35 36 37 38 39 40 41 42 43
if (substr(GLPI_VERSION, -4) === '-dev') {
   //for dev version
   define('GLPI_PREVER', str_replace('-dev', '', GLPI_VERSION));
   define(
      'GLPI_SCHEMA_VERSION',
      GLPI_PREVER . '@' . sha1_file(GLPI_ROOT . '/install/mysql/glpi-empty.sql')
   );
} else {
   //for stable version
44
   define("GLPI_SCHEMA_VERSION", '10.0.0');
45
}
Cédric Anne's avatar
Cédric Anne committed
46
define('GLPI_MIN_PHP', '7.0.8'); // Must also be changed in top of index.php
Johan Cwiklinski's avatar
Johan Cwiklinski committed
47
define('GLPI_YEAR', '2019');
48 49 50 51 52 53
if (!defined('GLPI_DEMO_MODE')) {
   define('GLPI_DEMO_MODE', '0');
}
if (!defined('GLPI_USE_CSRF_CHECK')) {
   define('GLPI_USE_CSRF_CHECK', '1');
}
54 55 56 57 58 59
if (!defined('GLPI_CSRF_EXPIRES')) {
   define("GLPI_CSRF_EXPIRES", "7200");
}
if (!defined('GLPI_CSRF_MAX_TOKENS')) {
   define("GLPI_CSRF_MAX_TOKENS", "100");
}
remi's avatar
remi committed
60

61 62 63
//Define a global recipient address for email notifications
//define('GLPI_FORCE_MAIL', 'me@localhost');

64 65
// for compatibility with mysql 5.7
// TODO: this var need to be set to 0 after review of all sql queries)
Johan Cwiklinski's avatar
Johan Cwiklinski committed
66 67 68
if (!defined('GLPI_FORCE_EMPTY_SQL_MODE')) {
   define("GLPI_FORCE_EMPTY_SQL_MODE", "1");
}
69

moyooo's avatar
moyooo committed
70
// rights
71 72 73 74 75
define("READ", 1);
define("UPDATE", 2);
define("CREATE", 4);
define("DELETE", 8);
define("PURGE", 16);
moyooo's avatar
moyooo committed
76
define("ALLSTANDARDRIGHT", 31);
77
define("READNOTE", 32);
moyooo's avatar
moyooo committed
78
define("UPDATENOTE", 64);
79
define("UNLOCK", 128);
moyooo's avatar
moyooo committed
80

remi's avatar
remi committed
81
// dictionnaries
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
$CFG_GLPI['languages'] = [
   //Code       Name in native lang          LANG FILE      jquery tinymce english name            standard plural number
   'ar_SA'  => ['العَرَبِيَّةُ',                   'ar_SA.mo',    'ar',    'ar', 'arabic',               103],
   'bg_BG'  => ['Български',                 'bg_BG.mo',    'bg',    'bg', 'bulgarian',            2],
   'id_ID'  => ['Bahasa Indonesia',          'id_ID.mo',    'id',    'id', 'indonesian',           2],
   'ms_MY'  => ['Bahasa Melayu',             'ms_MY.mo',    'ms',    'ms', 'malay',                2],
   'ca_ES'  => ['Català',                    'ca_ES.mo',    'ca',    'ca', 'catalan',              2], // ca_CA
   'cs_CZ'  => ['Čeština',                   'cs_CZ.mo',    'cs',    'cs', 'czech',                10],
   'de_DE'  => ['Deutsch',                   'de_DE.mo',    'de',    'de', 'german',               2],
   'da_DK'  => ['Dansk',                     'da_DK.mo',    'da',    'da', 'danish',               2]     , // dk_DK
   'et_EE'  => ['Eesti',                     'et_EE.mo',    'et',    'et', 'estonian',             2], // ee_ET
   'en_GB'  => ['English',                   'en_GB.mo',    'en-GB', 'en', 'english',              2],
   'en_US'  => ['English (US)',              'en_US.mo',    'en-GB', 'en', 'english',              2],
   'es_AR'  => ['Español (Argentina)',       'es_AR.mo',    'es',    'es', 'spanish',              2],
   'es_CO'  => ['Español (Colombia)',        'es_CO.mo',    'es',    'es', 'spanish',              2],
   'es_ES'  => ['Español (España)',          'es_ES.mo',    'es',    'es', 'spanish',              2],
   'es_419' => ['Español (América Latina)',  'es_419.mo',   'es',    'es', 'spanish',              2],
   'es_MX'  => ['Español (Mexico)',          'es_MX.mo',    'es',    'es', 'spanish',              2],
   'es_VE'  => ['Español (Venezuela)',       'es_VE.mo',    'es',    'es', 'spanish',              2],
Cédric Anne's avatar
Cédric Anne committed
101
   'eu_ES'  => ['Euskara',                   'eu_ES.mo',    'eu',    'eu', 'basque',               2],
102
   'fr_FR'  => ['Français',                  'fr_FR.mo',    'fr',    'fr', 'french',               2],
103
   'fr_CA'  => ['Français (Canada)',         'fr_CA.mo',    'fr',    'fr', 'french',               2],
104 105 106
   'gl_ES'  => ['Galego',                    'gl_ES.mo',    'gl',    'gl', 'galician',             2],
   'el_GR'  => ['Ελληνικά',                  'el_GR.mo',    'el',    'el', 'greek',                2], // el_EL
   'he_IL'  => ['עברית',                     'he_IL.mo',    'he',    'he', 'hebrew',               2], // he_HE
Johan Cwiklinski's avatar
Johan Cwiklinski committed
107
   'hi_IN'  => ['हिन्दी',                     'hi_IN.mo',    'hi',    'hi_IN', 'hindi' ,            2],
108 109 110
   'hr_HR'  => ['Hrvatski',                  'hr_HR.mo',    'hr',    'hr', 'croatian',             2],
   'hu_HU'  => ['Magyar',                    'hu_HU.mo',    'hu',    'hu', 'hungarian',            2],
   'it_IT'  => ['Italiano',                  'it_IT.mo',    'it',    'it', 'italian',              2],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
111
   'kn'     => ['ಕನ್ನಡ',                      'kn.mo',       'en-GB', 'en', 'kannada',              2],
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
   'lv_LV'  => ['Latviešu',                  'lv_LV.mo',    'lv',    'lv', 'latvian',              2],
   'lt_LT'  => ['Lietuvių',                  'lt_LT.mo',    'lt',    'lt', 'lithuanian',           2],
   'nl_NL'  => ['Nederlands',                'nl_NL.mo',    'nl',    'nl', 'dutch',                2],
   'nb_NO'  => ['Norsk (Bokmål)',            'nb_NO.mo',    'no',    'nb', 'norwegian',            2], // no_NB
   'nn_NO'  => ['Norsk (Nynorsk)',           'nn_NO.mo',    'no',    'nn', 'norwegian',            2], // no_NN
   'fa_IR'  => ['فارسی',                     'fa_IR.mo',    'fa',    'fa', 'persian',              2],
   'pl_PL'  => ['Polski',                    'pl_PL.mo',    'pl',    'pl', 'polish',               2],
   'pt_PT'  => ['Português',                 'pt_PT.mo',    'pt',    'pt', 'portuguese',           2],
   'pt_BR'  => ['Português do Brasil',       'pt_BR.mo',    'pt-BR', 'pt', 'brazilian portuguese', 2],
   'ro_RO'  => ['Română',                    'ro_RO.mo',    'ro',    'en', 'romanian',             2],
   'ru_RU'  => ['Русский',                   'ru_RU.mo',    'ru',    'ru', 'russian',              2],
   'sk_SK'  => ['Slovenčina',                'sk_SK.mo',    'sk',    'sk', 'slovak',               10],
   'sl_SI'  => ['Slovenščina',               'sl_SI.mo',    'sl',    'sl', 'slovenian slovene',    2],
   'sr_RS'  => ['Srpski',                    'sr_RS.mo',    'sr',    'sr', 'serbian',              2],
   'fi_FI'  => ['Suomi',                     'fi_FI.mo',    'fi',    'fi', 'finish',               2],
   'sv_SE'  => ['Svenska',                   'sv_SE.mo',    'sv',    'sv', 'swedish',              2],
   'vi_VN'  => ['Tiếng Việt',                'vi_VN.mo',    'vi',    'vi', 'vietnamese',           2],
   'th_TH'  => ['ภาษาไทย',                   'th_TH.mo',    'th',    'th', 'thai',                 2],
   'tr_TR'  => ['Türkçe',                    'tr_TR.mo',    'tr',    'tr', 'turkish',              2],
   'uk_UA'  => ['Українська',                'uk_UA.mo',    'uk',    'en', 'ukrainian',            2], // ua_UA
   'ja_JP'  => ['日本語',                    'ja_JP.mo',    'ja',    'ja', 'japanese',             2],
   'zh_CN'  => ['简体中文',                  'zh_CN.mo',    'zh-CN', 'zh', 'chinese',              2],
   'zh_TW'  => ['繁體中文',                  'zh_TW.mo',    'zh-TW', 'zh', 'chinese',              2],
   'ko_KR'  => ['한국/韓國',                 'ko_KR.mo',    'ko',    'ko', 'korean',               1],
   'zh_HK'  => ['香港',                      'zh_HK.mo',    'zh-HK', 'zh', 'chinese',              2],
   'be_BY'  => ['Belarussian',               'be_BY.mo',    'be',    'be', 'belarussian',          3],
   'is_IS'  => ['íslenska',                  'is_IS.mo',    'is',    'en', 'icelandic',            2],
   'eo'     => ['Esperanto',                 'eo.mo',       'eo',    'en', 'esperanto',            2],
   'es_CL'  => ['Español chileno',           'es_CL',       'es',    'es', 'spanish chilean',      2]
];
moyooo's avatar
moyooo committed
142 143

$DEFAULT_PLURAL_NUMBER = 2;
yllen's avatar
yllen committed
144

moyooo's avatar
moyooo committed
145
// Init to store glpi itemtype / tables link
146
$CFG_GLPI['glpitables'] = [];
remi's avatar
remi committed
147

148
define("NOT_AVAILABLE", 'N/A');
149

moyooo's avatar
moyooo committed
150 151 152
// key used to crypt passwords in DB for external access : proxy / smtp / ldap /  mailcollectors
// This key is not used to crypt user's passwords
// If you hav to define passwords again
153
define("GLPIKEY", "GLPI£i'snarss'ç");
154

Johan Cwiklinski's avatar
Johan Cwiklinski committed
155 156
//Telemetry
if (!defined('GLPI_TELEMETRY_URI')) {
157
   define('GLPI_TELEMETRY_URI', 'https://telemetry.glpi-project.org');
Johan Cwiklinski's avatar
Johan Cwiklinski committed
158 159
}

160 161 162 163 164
// GLPI Network
if (!defined('GLPI_NETWORK_SERVICES')) {
   define('GLPI_NETWORK_SERVICES', 'https://services.glpi-network.com');
}

remi's avatar
remi committed
165
// TIMES
166 167 168 169 170
define("MINUTE_TIMESTAMP", 60);
define("HOUR_TIMESTAMP", 3600);
define("DAY_TIMESTAMP", 86400);
define("WEEK_TIMESTAMP", 604800);
define("MONTH_TIMESTAMP", 2592000);
remi's avatar
remi committed
171 172


173
//Management modes
174 175
define("MANAGEMENT_UNITARY", 0);
define("MANAGEMENT_GLOBAL", 1);
remi's avatar
remi committed
176 177 178


//Mail send methods
179 180 181 182
define("MAIL_MAIL", 0);
define("MAIL_SMTP", 1);
define("MAIL_SMTPSSL", 2);
define("MAIL_SMTPTLS", 3);
remi's avatar
remi committed
183 184

// MESSAGE TYPE
185 186 187
define("INFO", 0);
define("ERROR", 1);
define("WARNING", 2);
moyooo's avatar
moyooo committed
188 189 190

// ACTIONS_ERROR

191 192 193 194 195
define("ERROR_NOT_FOUND", 1);
define("ERROR_RIGHT", 2);
define("ERROR_COMPAT", 3);
define("ERROR_ON_ACTION", 4);
define("ERROR_ALREADY_DEFINED", 5);
remi's avatar
remi committed
196 197


yllen's avatar
yllen committed
198
// For plugins
199 200 201
$PLUGIN_HOOKS     = [];
$CFG_GLPI_PLUGINS = [];
$LANG             = [];
remi's avatar
remi committed
202

203
$CFG_GLPI["unicity_types"]                = ['Budget', 'Computer', 'Contact', 'Contract',
yllen's avatar
yllen committed
204 205
                                                  'Infocom', 'Monitor', 'NetworkEquipment',
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
Johan Cwiklinski's avatar
Johan Cwiklinski committed
206
                                                  'SoftwareLicense', 'Supplier','User', 'Certicate', 'Rack', 'Enclosure', 'PDU'];
remi's avatar
remi committed
207

208
$CFG_GLPI["state_types"]                  = ['Computer', 'Monitor', 'NetworkEquipment',
209
                                                  'Peripheral', 'Phone', 'Printer', 'SoftwareLicense',
Johan Cwiklinski's avatar
Johan Cwiklinski committed
210
                                                  'Certificate', 'Enclosure', 'PDU', 'Line',
211
                                                   'Rack', 'SoftwareVersion'];
remi's avatar
remi committed
212

213
$CFG_GLPI["asset_types"]                  = ['Computer', 'Monitor', 'NetworkEquipment',
214 215
                                                  'Peripheral', 'Phone', 'Printer', 'SoftwareLicense',
                                                  'Certificate'];
moyooo's avatar
moyooo committed
216

217
$CFG_GLPI["project_asset_types"]          = ['Computer', 'Monitor', 'NetworkEquipment',
218 219 220 221
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
                                                  'DeviceMotherboard', 'DeviceProcessor', 'DeviceMemory',
                                                  'DeviceHardDrive', 'DeviceNetworkCard', 'DeviceDrive',
                                                  'DeviceControl', 'DeviceGraphicCard', 'DeviceSoundCard',
222
                                                  'DevicePci', 'DeviceCase', 'DevicePowerSupply', 'DeviceGeneric',
223 224
                                                  'DeviceBattery', 'DeviceFirmware',
                                                  'Certificate'];
moyooo's avatar
moyooo committed
225

Johan Cwiklinski's avatar
Johan Cwiklinski committed
226 227 228 229 230 231
$CFG_GLPI['device_types']                 = ['DeviceMotherboard', 'DeviceFirmware', 'DeviceProcessor',
                                                  'DeviceMemory', 'DeviceHardDrive', 'DeviceNetworkCard',
                                                  'DeviceDrive', 'DeviceBattery', 'DeviceGraphicCard',
                                                  'DeviceSoundCard', 'DeviceControl', 'DevicePci',
                                                  'DeviceCase', 'DevicePowerSupply', 'DeviceGeneric',
                                                  'DeviceSimcard', 'DeviceSensor'];
yllen's avatar
yllen committed
232

233
$CFG_GLPI["document_types"]               = ['Budget', 'CartridgeItem', 'Change', 'Computer',
yllen's avatar
yllen committed
234 235 236
                                                  'ConsumableItem', 'Contact', 'Contract',
                                                  'Document', 'Entity', 'KnowbaseItem', 'Monitor',
                                                  'NetworkEquipment', 'Peripheral', 'Phone',
237
                                                  'Printer', 'Problem', 'Project', 'ProjectTask',
Thierry Bugier Pineau's avatar
Thierry Bugier Pineau committed
238
                                                  'Reminder', 'Software', 'Line',
239
                                                  'SoftwareLicense', 'Supplier', 'Ticket','User',
240
                                                  'Certificate', 'DeviceBattery', 'Rack', 'PDU'] + $CFG_GLPI['device_types'];
remi's avatar
remi committed
241

242
$CFG_GLPI["consumables_types"]            = ['Group', 'User'];
243

244
$CFG_GLPI["itemdevices"]                  = ['Item_DevicePowerSupply', 'Item_DevicePci',
245
                                                  'Item_DeviceCase', 'Item_DeviceGraphicCard',
246 247 248
                                                  'Item_DeviceMotherBoard', 'Item_DeviceNetworkCard',
                                                  'Item_DeviceSoundCard', 'Item_DeviceControl',
                                                  'Item_DeviceHardDrive', 'Item_DeviceDrive', 'Item_DeviceMemory',
249
                                                  'Item_DeviceProcessor', 'Item_DeviceGeneric',
btry's avatar
btry committed
250 251
                                                  'Item_DeviceBattery', 'Item_DeviceFirmware', 'Item_DeviceSimcard',
                                                  'Item_DeviceSensor'];
remi's avatar
remi committed
252

253
$CFG_GLPI["contract_types"]               = array_merge(['Computer', 'Monitor', 'NetworkEquipment',
Thierry Bugier Pineau's avatar
Thierry Bugier Pineau committed
254
                                                  'Peripheral', 'Phone', 'Printer', 'Project', 'Line',
Johan Cwiklinski's avatar
Johan Cwiklinski committed
255
                                                  'Software', 'SoftwareLicense', 'Certificate',
256
                                                  'DCRoom', 'Rack', 'Enclosure', 'PDU'],
257
                                                  $CFG_GLPI['itemdevices']);
258

259 260 261 262 263
$CFG_GLPI["report_types"]                 = ['Computer', 'Monitor', 'NetworkEquipment',
                                                  'Peripheral', 'Phone', 'Printer', 'Project',
                                                  'Software', 'SoftwareLicense', 'Certificate'];


264
$CFG_GLPI["directconnect_types"]          = ['Monitor', 'Peripheral', 'Phone', 'Printer'];
265

266
$CFG_GLPI["infocom_types"]                = ['Cartridge', 'CartridgeItem', 'Computer',
yllen's avatar
yllen committed
267 268
                                                  'Consumable', 'ConsumableItem', 'Monitor',
                                                  'NetworkEquipment', 'Peripheral', 'Phone',
Thierry Bugier Pineau's avatar
Thierry Bugier Pineau committed
269
                                                  'Printer', 'Software', 'SoftwareLicense',
270
                                                  'Line', 'Certificate', 'Rack', 'PDU'];
remi's avatar
remi committed
271

272 273
$CFG_GLPI["reservation_types"]            = ['Computer', 'Monitor', 'NetworkEquipment',
                                                  'Peripheral', 'Phone', 'Printer', 'Software'];
remi's avatar
remi committed
274

275
$CFG_GLPI["linkuser_types"]               = ['Computer', 'Monitor', 'NetworkEquipment',
276
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
277
                                                  'SoftwareLicense', 'Certificate'];
remi's avatar
remi committed
278

279
$CFG_GLPI["linkgroup_types"]              = ['Computer', 'Consumable', 'Monitor', 'NetworkEquipment',
280
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
281
                                                  'SoftwareLicense', 'Certificate'];
remi's avatar
remi committed
282

283
$CFG_GLPI["linkuser_tech_types"]          = ['Computer', 'ConsumableItem', 'Monitor', 'NetworkEquipment',
284
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
285
                                                  'SoftwareLicense', 'Certificate'];
286

287
$CFG_GLPI["linkgroup_tech_types"]         = ['Computer', 'ConsumableItem', 'Monitor', 'NetworkEquipment',
288
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
289
                                                  'SoftwareLicense', 'Certificate'];
remi's avatar
csà  
remi committed
290

291
$CFG_GLPI["location_types"]               = ['Budget', 'CartridgeItem', 'ConsumableItem',
292
                                                  'Computer', 'Monitor', 'Netpoint',
moyooo's avatar
moyooo committed
293
                                                  'NetworkEquipment', 'Peripheral', 'Phone',
294
                                                  'Printer', 'Software', 'SoftwareLicense',
295
                                                  'Ticket', 'User', 'Certificate'];
moyooo's avatar
moyooo committed
296

297
$CFG_GLPI['itil_types']                   = ['Computer', 'Monitor', 'NetworkEquipment',
298
                                                  'Peripheral', 'Phone', 'Printer', 'Software',
299
                                                  'SoftwareLicense', 'Certificate',
300 301 302 303
                                                  'Line', 'DCRoom', 'Rack', 'Enclosure', 'PDU'];
//kept for legacy
//@deprecated 10.0.0
$CFG_GLPI['ticket_types']                 = $CFG_GLPI['itil_types'];
remi's avatar
remi committed
304

305
$CFG_GLPI["link_types"]                   = ['Budget', 'CartridgeItem', 'Computer',
yllen's avatar
yllen committed
306 307
                                                  'ConsumableItem', 'Contact', 'Contract', 'Monitor',
                                                  'NetworkEquipment', 'Peripheral', 'Phone',
308
                                                  'Printer', 'Software', 'Supplier', 'User', 'Certificate'];
remi's avatar
remi committed
309

310
$CFG_GLPI["dictionnary_types"]            = ['ComputerModel', 'ComputerType', 'Manufacturer',
yllen's avatar
yllen committed
311 312 313 314 315 316
                                                  'MonitorModel', 'MonitorType',
                                                  'NetworkEquipmentModel', 'NetworkEquipmentType',
                                                  'OperatingSystem', 'OperatingSystemServicePack',
                                                  'OperatingSystemVersion', 'PeripheralModel',
                                                  'PeripheralType', 'PhoneModel', 'PhoneType',
                                                  'Printer', 'PrinterModel', 'PrinterType',
Johan Cwiklinski's avatar
Johan Cwiklinski committed
317 318
                                                  'Software', 'OperatingSystemArchitecture',
                                                  'OperatingSystemKernel', 'OperatingSystemKernelVersion',
319
                                                  'OperatingSystemEdition'];
Walid Nouh's avatar
Walid Nouh committed
320

321
$CFG_GLPI["helpdesk_visible_types"]       = ['Software'];
remi's avatar
remi committed
322

323
$CFG_GLPI["networkport_types"]            = ['Computer', 'NetworkEquipment', 'Peripheral',
Johan Cwiklinski's avatar
Johan Cwiklinski committed
324
                                                  'Phone', 'Printer', 'Enclosure', 'PDU'];
remi's avatar
remi committed
325

326
// Warning : the order is used for displaying different NetworkPort types ! Keep it !
327
$CFG_GLPI['networkport_instantiations']   = ['NetworkPortEthernet', 'NetworkPortWifi' ,
328
                                                  'NetworkPortAggregate', 'NetworkPortAlias',
329
                                                  'NetworkPortDialup',   'NetworkPortLocal',
330
                                                  'NetworkPortFiberchannel'];
331

332
$CFG_GLPI["itemdevices_types"]            = ['Computer', 'NetworkEquipment', 'Peripheral',
333
                                                  'Phone', 'Printer', 'Enclosure'];
amma35's avatar
amma35 committed
334

335
$CFG_GLPI["itemdevices_itemaffinity"]     = ['Computer'];
amma35's avatar
amma35 committed
336

337
$CFG_GLPI["itemdevicememory_types"]       = ['Computer', 'NetworkEquipment', 'Peripheral', 'Printer'];
amma35's avatar
amma35 committed
338

339
$CFG_GLPI["itemdevicepowersupply_types"]  = ['Computer', 'NetworkEquipment', 'Enclosure'];
amma35's avatar
amma35 committed
340

341
$CFG_GLPI["itemdevicenetworkcard_types"]  = ['Computer', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer'];
amma35's avatar
amma35 committed
342

Johan Cwiklinski's avatar
Johan Cwiklinski committed
343
$CFG_GLPI['itemdeviceharddrive_types']    = ['Computer', 'Peripheral', 'NetworkEquipment', 'Printer'];
amma35's avatar
amma35 committed
344

345
$CFG_GLPI['itemdevicebattery_types']      = ['Computer', 'Peripheral', 'Phone', 'Printer'];
346

347
$CFG_GLPI['itemdevicefirmware_types']     = ['Computer', 'Peripheral', 'Phone', 'NetworkEquipment', 'Printer'];
348

Thierry Bugier Pineau's avatar
Thierry Bugier Pineau committed
349 350
$CFG_GLPI['itemdevicesimcard_types']      = ['Computer', 'Peripheral', 'Phone', 'NetworkEquipment', 'Printer'];

351
$CFG_GLPI['itemdevicegeneric_types']      = ['*'];
352

353 354
$CFG_GLPI['itemdevicepci_types']          = ['*'];

btry's avatar
btry committed
355
$CFG_GLPI['itemdevicesensor_types']       = ['Computer', 'Peripheral'];
356

357 358 359 360 361 362 363
$CFG_GLPI['itemdeviceprocessor_types']    = ['Computer'];

$CFG_GLPI['itemdevicesoundcard_types']    = ['Computer'];

$CFG_GLPI['itemdevicegraphiccard_types']  = ['Computer'];

$CFG_GLPI['itemdevicemotherboard_types']  = ['Computer'];
364

365
$CFG_GLPI["notificationtemplates_types"]  = ['CartridgeItem', 'Change', 'ConsumableItem',
366 367 368 369 370 371
                                             'Contract', 'Crontask', 'DBConnection',
                                             'FieldUnicity', 'Infocom', 'MailCollector',
                                             'ObjectLock', 'PlanningRecall', 'Problem',
                                             'Project', 'ProjectTask', 'Reservation',
                                             'SoftwareLicense', 'Ticket', 'User',
                                             'SavedSearch_Alert', 'Certificate'];
372

373 374
$CFG_GLPI["union_search_type"]            = ['ReservationItem' => "reservation_types",
                                                  'AllAssets'       => "asset_types"];
moyooo's avatar
moyooo committed
375

376 377
$CFG_GLPI["systeminformations_types"]     = ['AuthLDAP', 'DBConnection', 'MailCollector',
                                                  'Plugin'];
remi's avatar
remi committed
378

379
$CFG_GLPI["rulecollections_types"]        = ['RuleImportEntityCollection',
380
                                                  'RuleImportComputerCollection',
yllen's avatar
yllen committed
381
                                                  'RuleMailCollectorCollection',
yllen's avatar
yllen committed
382 383
                                                  'RuleRightCollection',
                                                  'RuleSoftwareCategoryCollection',
Walid Nouh's avatar
Walid Nouh committed
384 385
                                                  'RuleTicketCollection',
                                                  'RuleAssetCollection'];
386

moyooo's avatar
moyooo committed
387
// Items which can planned something
388 389 390
$CFG_GLPI['planning_types']               = ['ChangeTask', 'ProblemTask', 'Reminder',
                                                  'TicketTask', 'ProjectTask'];
$CFG_GLPI['planning_add_types']           = ['Reminder'];
391

392
$CFG_GLPI["globalsearch_types"]           = ['Computer', 'Contact', 'Contract',
393 394 395 396 397
                                             'Document',  'Monitor',
                                             'NetworkEquipment', 'Peripheral', 'Phone',
                                             'Printer', 'Software', 'SoftwareLicense',
                                             'Ticket', 'Problem', 'Change',
                                             'User', 'Group', 'Project', 'Supplier',
398 399
                                             'Budget', 'Certificate', 'Line', 'Datacenter',
                                             'DCRoom', 'Enclosure', 'PDU', 'Rack'];
moyooo's avatar
moyooo committed
400

remi's avatar
remi committed
401
// New config options which can be missing during migration
yllen's avatar
yllen committed
402 403
$CFG_GLPI["number_format"]  = 0;
$CFG_GLPI["decimal_number"] = 2;
remi's avatar
remi committed
404

remi's avatar
remi committed
405
// Default debug options : may be locally overriden
yllen's avatar
yllen committed
406
$CFG_GLPI["debug_sql"] = $CFG_GLPI["debug_vars"] = $CFG_GLPI["debug_lang"] = 1;
407

408

remi's avatar
remi committed
409
// User Prefs fields which override $CFG_GLPI config
410
$CFG_GLPI['user_pref_field'] = ['backcreated', 'csv_delimiter', 'date_format',
yllen's avatar
CS  
yllen committed
411
                                     'default_requesttypes_id', 'display_count_on_home',
yllen's avatar
yllen committed
412
                                     'duedatecritical_color',
yllen's avatar
CS  
yllen committed
413 414 415 416
                                     'duedatecritical_less', 'duedatecritical_unit',
                                     'duedateok_color', 'duedatewarning_color',
                                     'duedatewarning_less', 'duedatewarning_unit',
                                     'followup_private', 'is_ids_visible',
yllen's avatar
CS  
yllen committed
417 418 419
                                     'keep_devices_when_purging_item', 'language', 'list_limit',
                                     'lock_autolock_mode', 'lock_directunlock_notification',
                                     'names_format', 'notification_to_myself',
yllen's avatar
CS  
yllen committed
420
                                     'number_format', 'pdffont', 'priority_1',
yllen's avatar
CS  
yllen committed
421 422
                                     'priority_2', 'priority_3', 'priority_4', 'priority_5',
                                     'priority_6', 'refresh_ticket_list', 'set_default_tech',
yllen's avatar
yllen committed
423 424
                                     'set_default_requester', 'show_count_on_tabs',
                                     'show_jobs_at_login', 'task_private', 'task_state',
425
                                     'use_flat_dropdowntree', 'layout', 'palette',
426
                                     'highcontrast_css'];
Alexandre Delaunay's avatar
Alexandre Delaunay committed
427

428
$CFG_GLPI['layout_excluded_pages'] = ["profile.form.php",
429
                                           "knowbaseitem.php",
yllen's avatar
yllen committed
430 431
                                           "knowbaseitem.form.php",
                                           "bookmark.php",
432
                                           "displaypreference.form.php",
433
                                           "central.php",
434 435 436
                                           "preference.php",
                                           "config.form.php",
                                           "common.tabs.php",
437
                                           "transfer.form.php",
438
                                           "entity.form.php",
439
                                           "queuednotification.form.php"];
Alexandre Delaunay's avatar
Alexandre Delaunay committed
440

441
$CFG_GLPI['lock_lockable_objects'] = ['Budget',  'Change', 'Contact', 'Contract', 'Document',
yllen's avatar
CS  
yllen committed
442
                                           'CartridgeItem', 'Computer', 'ConsumableItem', 'Entity',
443
                                           'Group', 'KnowbaseItem', 'Line', 'Link', 'Monitor',
yllen's avatar
CS  
yllen committed
444 445
                                           'NetworkEquipment', 'NetworkName', 'Peripheral', 'Phone',
                                           'Printer', 'Problem', 'Profile', 'Project', 'Reminder',
446
                                           'RSSFeed', 'Software', 'Supplier', 'Ticket', 'User',
447
                                           'SoftwareLicense', 'Certificate'];
Johan Cwiklinski's avatar
Johan Cwiklinski committed
448

tsmr's avatar
tsmr committed
449
$CFG_GLPI['inventory_lockable_objects'] = ['Computer_Item',  'Computer_SoftwareLicense',
450
                                           'Computer_SoftwareVersion', 'Item_Disk', 'ComputerVirtualMachine',
tsmr's avatar
tsmr committed
451 452
                                           'NetworkPort', 'NetworkName', 'IPAddress'];

453
$CFG_GLPI["kb_types"]              = ['Budget', 'Change', 'Computer',
454 455 456 457 458
                                           'Contract', 'Entity',
                                           'Monitor', 'NetworkEquipment',
                                           'Peripheral', 'Phone', 'Printer',
                                           'Problem', 'Project', 'Software',
                                           'SoftwareLicense', 'Supplier',
459 460 461 462 463
                                           'Ticket', 'Certificate'];
$CFG_GLPI["certificate_types"]     = ['Computer',
                                      'NetworkEquipment', 'Peripheral',
                                      'Phone', 'Printer',
                                      'SoftwareLicense', 'User'];
464

Johan Cwiklinski's avatar
Johan Cwiklinski committed
465
$CFG_GLPI["rackable_types"]        = ['Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Enclosure', 'PDU'];
Johan Cwiklinski's avatar
Johan Cwiklinski committed
466

Johan Cwiklinski's avatar
Johan Cwiklinski committed
467 468
$CFG_GLPI['javascript'] = [
   'central'   => [
469
      'central'   => ['fullcalendar', 'tinymce']
Johan Cwiklinski's avatar
Johan Cwiklinski committed
470
   ],
471 472 473
   'assets'    => [
      'rack'         => ['colorpicker', 'gridstack']
   ],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
474
   'helpdesk'  => [
Johan Cwiklinski's avatar
Johan Cwiklinski committed
475
      'planning'  => ['fullcalendar', 'colorpicker', 'tinymce'],
476
      'ticket'    => ['rateit', 'tinymce'],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
477
      'problem'   => ['tinymce'],
478 479
      'change'    => ['tinymce'],
      'stat'      => ['charts']
Johan Cwiklinski's avatar
Johan Cwiklinski committed
480 481 482
   ],
   'tools'     => [
      'project'      => ['gantt'],
Alexandre Delaunay's avatar
Alexandre Delaunay committed
483
      'knowbaseitem' => ['tinymce', 'jstree'],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
484 485
      'reminder'     => ['tinymce']
   ],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
486
   'management' => [
487 488 489
      'datacenter'       => [
         'dcroom' => ['colorpicker', 'gridstack']
      ]
Johan Cwiklinski's avatar
Johan Cwiklinski committed
490
   ],
Johan Cwiklinski's avatar
Johan Cwiklinski committed
491 492 493 494 495 496 497 498 499 500
   'config'    => [
      'config'    => ['colorpicker'],
      'commondropdown'  => [
         'ProjectState'       => ['colorpicker'],
         'SolutionTemplate'   => ['tinymce']
      ],
      'notification'    => [
         'notificationtemplate' => ['tinymce']
      ]
   ],
tomolimo's avatar
tomolimo committed
501
   'admin'     => ['colorpicker', 'clipboard'],
502
   'preference'=> ['colorpicker', 'clipboard'],
503
   'self-service' => ['colorpicker', 'tinymce']
Johan Cwiklinski's avatar
Johan Cwiklinski committed
504
];
Johan Cwiklinski's avatar
Johan Cwiklinski committed
505 506 507 508

//Maximum time, in miliseconds a saved search should not exeed
//so we count it on display (using automatic mode).
$CFG_GLPI['max_time_for_count'] = 200;