Merge pull request #8346 from hregis/develop_api

Fix: travis
This commit is contained in:
Laurent Destailleur 2018-03-11 18:16:23 +01:00 committed by GitHub
commit 0f4f844ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) - 2013-2016 Jean-François FERRY <jfefe@aternatik.fr> /* Copyright (C) 2013-2016 Jean-François FERRY <jfefe@aternatik.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -34,28 +34,10 @@ if (!defined("NOLOGIN")) {
} }
// If this page is public (can be called outside logged session) // If this page is public (can be called outside logged session)
// Change this following line to use the correct relative path (../, ../../, etc) require '../../main.inc.php';
$res = 0; require_once DOL_DOCUMENT_ROOT.'/ticketsup/class/actions_ticketsup.class.php';
if (!$res && file_exists("../main.inc.php")) { require_once DOL_DOCUMENT_ROOT.'/ticketsup/class/html.formticketsup.class.php';
$res = @include '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticketsup/lib/ticketsup.lib.php';
}
if (!$res && file_exists("../../main.inc.php")) {
$res = @include '../../main.inc.php';
}
if (!$res && file_exists("../../../main.inc.php")) {
$res = @include '../../../main.inc.php';
}
if (!$res) {
die("Include of main fails");
}
// Change this following line to use the correct relative path from htdocs
dol_include_once('/ticketsup/class/actions_ticketsup.class.php');
dol_include_once('/ticketsup/class/html.formticketsup.class.php');
dol_include_once('/ticketsup/lib/ticketsup.lib.php');
// Load traductions files requiredby by page // Load traductions files requiredby by page
$langs->load("companies"); $langs->load("companies");
@ -671,7 +653,7 @@ if ($action == "view_ticketlist") {
} }
} }
} else { } else {
print '<div class="error">Not Allowed<br /><a href="' . $_SERVER['PHP_SELF'] . '?track_id=' . $object->dao->track_id . '">' . $langs->trans('Back') . '</a></div>'; print '<div class="error">Not Allowed<br><a href="' . $_SERVER['PHP_SELF'] . '?track_id=' . $object->dao->track_id . '">' . $langs->trans('Back') . '</a></div>';
} }
} else { } else {
print '<p style="text-align: center">' . $langs->trans("TicketPublicMsgViewLogIn") . '</p>'; print '<p style="text-align: center">' . $langs->trans("TicketPublicMsgViewLogIn") . '</p>';