FIX: if we stop for security purpose, we must exit a non zero value.

This commit is contained in:
Laurent Destailleur 2024-03-16 23:08:15 +01:00
parent 00ab361fcf
commit de58435ef1
98 changed files with 98 additions and 98 deletions

View File

@ -24,7 +24,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
$code = getDolGlobalString('MAIN_INFO_ACCOUNTANT_CODE');

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -21,7 +21,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
echo "<!-- BEGIN PHP TEMPLATE adherents/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -27,7 +27,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -27,7 +27,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -27,7 +27,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE commande/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -21,7 +21,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE bom/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php";
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this

View File

@ -36,7 +36,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this

View File

@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this

View File

@ -26,7 +26,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE commande/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE compta/facture/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -30,7 +30,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -29,7 +29,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($langs) || !is_object($langs)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $action, $form, $langs;

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// Require

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($blocname)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
$hide = true; // Hide by default

View File

@ -32,7 +32,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
$fileparams = array();

View File

@ -25,7 +25,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -25,7 +25,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {
$form = new Form($db);

View File

@ -26,7 +26,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {
$form = new Form($db);

View File

@ -27,7 +27,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($preselectedtypeofcontact)) {

View File

@ -32,7 +32,7 @@
// Protection to avoid direct call of template
if (empty($langs) || !is_object($langs)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -11,7 +11,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($extrafieldsobjectkey) && is_object($object)) {

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($extrafieldsobjectkey) && is_object($object)) {

View File

@ -5,7 +5,7 @@ print '<!-- extrafields_list_search_input.tpl.php -->'."\n";
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($extrafieldsobjectkey) && is_object($object)) {

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// Loop to complete $param for extrafields

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($extrafieldsobjectkey) && is_object($object)) {

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (empty($extrafieldsobjectkey) && is_object($object)) {

View File

@ -29,7 +29,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!is_object($form)) {

View File

@ -27,7 +27,7 @@ if (!defined('NOBROWSERNOTIF')) {
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// DDOS protection

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// $permissionnote must be defined by caller. For example $permissionnote=$user->rights->module->create

View File

@ -36,7 +36,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -37,7 +37,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this

View File

@ -41,7 +41,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
$objectUrl = $object->getNomUrl(0, '', 0, 1);

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -23,7 +23,7 @@ if (!defined('NOBROWSERNOTIF')) {
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// DDOS protection

View File

@ -25,7 +25,7 @@ if (!defined('NOBROWSERNOTIF')) {
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// DDOS protection

View File

@ -4,7 +4,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE delivery/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
echo "<!-- BEGIN PHP TEMPLATE eventorganization/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -21,7 +21,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -40,7 +40,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE hrm/core/tpl/objectline_title.tpl.php -->\n";

View File

@ -45,7 +45,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $mysoc;

View File

@ -3,7 +3,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
if (!empty($object->table_element_line)) {

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -21,7 +21,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE mrp/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this';

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -28,7 +28,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -22,7 +22,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -22,7 +22,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $langs;

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print '

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $langs;

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $langs;

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $langs;

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $conf, $langs;

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -2,7 +2,7 @@
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
global $conf, $hookmanager, $langs;

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
$contact = $GLOBALS['objcanvas']->control->object;

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -19,7 +19,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
?>

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print '<!-- linesalesrepresentative.tpl.php -->';

View File

@ -20,7 +20,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}

View File

@ -18,7 +18,7 @@
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE ticket/tpl/linkedobjectblock.tpl.php -->\n";

View File

@ -29,7 +29,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
// Define colspan for the button 'Add'

View File

@ -30,7 +30,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
print "<!-- BEGIN PHP TEMPLATE productattributevalueline_title.tpl.php -->\n";

View File

@ -35,7 +35,7 @@
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
exit(1);
}
'@phan-var-force CommonObject $this