Commit b397bf52 authored by remi's avatar remi

GLPI_ROOT is now defined in include.php, see #4179

parent 5b9aeec2
......@@ -31,12 +31,11 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
// Include plugin if it is a plugin table
if (!strstr($_POST['itemtype'],"Plugin")) {
$AJAX_INCLUDE = 1;
}
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -31,9 +31,8 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
$AJAX_INCLUDE = 1;
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT . "/inc/includes.php");
include ('../inc/includes.php');
if (isset($_POST['full_page_tab'])) {
Html::header('Only tab for debug', $_SERVER['PHP_SELF']);
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownConnect.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -34,8 +34,7 @@
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownDelegationUsers.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownFieldsBlacklist.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief List of device for tracking.
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT . "/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -33,8 +33,7 @@
if (strpos($_SERVER['PHP_SELF'],"dropdownInstallVersion.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
*/
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
*/
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownNetpoint.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownNotificationEvent.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownNotificationTemplate.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
if (strpos($_SERVER['PHP_SELF'],"dropdownRubDocument.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownRules.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
if (strpos($_SERVER['PHP_SELF'],"dropdownSelectSoftware.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
if (strpos($_SERVER['PHP_SELF'],"dropdownSelectSoftwareLicense.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -33,8 +33,7 @@
if (strpos($_SERVER['PHP_SELF'],"dropdownSoftwareLicense.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownTicketCategories.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"dropdownUnicityFields.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownUsers.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"dropdownValue.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'], "dropdownValuesBlacklist.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
*/
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -33,8 +33,7 @@
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -31,9 +31,8 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
$AJAX_INCLUDE = 1;
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
......
......@@ -33,8 +33,7 @@
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"ldapdaterestriction.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,8 +32,7 @@
* @since version 0.84
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -35,8 +35,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"planningcheck.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,9 +31,8 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
$AJAX_INCLUDE = 1;
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
......
......@@ -32,8 +32,7 @@
*/
if (strpos($_SERVER['PHP_SELF'],"private_public.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -32,9 +32,8 @@
* @since version 0.84
*/
define('GLPI_ROOT', realpath('..'));
$AJAX_INCLUDE = 1;
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
// Send UTF8 Headers
header("Content-Type: text/html; charset=UTF-8");
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"ruleaction.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"ruleactionvalue.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"rulecriteria.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strstr($_SERVER['PHP_SELF'],"rulecriteriavalue.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"searchoption.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"searchoptionvalue.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"subvisibility.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -33,8 +33,7 @@
$AJAX_INCLUDE=1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"ticketassigninformation.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"ticketiteminformation.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -34,8 +34,7 @@
// Direct access to file
if (strpos($_SERVER['PHP_SELF'],"ticketsatisfaction.php")) {
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -33,8 +33,7 @@
$AJAX_INCLUDE = 1;
if (strpos($_SERVER['PHP_SELF'],"uemailUpdate.php")) {
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
......
......@@ -31,8 +31,7 @@
* @brief
*/
define('GLPI_ROOT', realpath('..'));
include (GLPI_ROOT."/inc/includes.php");
include ('../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
......
......@@ -32,9 +32,8 @@
*/
$AJAX_INCLUDE = 1;
define('GLPI_ROOT', realpath('..'));
include ('../inc/includes.php');