move include_once to include when it's a tpl

This commit is contained in:
Alexandre SPANGARO 2021-04-12 21:25:58 +02:00
parent 80995c34b5
commit 4b9bf40a8f
36 changed files with 36 additions and 36 deletions

View File

@ -152,7 +152,7 @@ if ($id > 0) {
$permission = $user->rights->adherent->creer;
$permtoedit = $user->rights->adherent->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
print "<br><br>";
} else {
dol_print_error($db);

View File

@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->asset->write;
$permtoedit = $user->rights->asset->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -139,7 +139,7 @@ if ($object->id)
//$relativepathwithnofile='bom/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'bom/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -260,7 +260,7 @@ if ($object->id > 0)
$modulepart = 'actions';
$permission = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -178,7 +178,7 @@ if ($object->id > 0)
$permission = $user->rights->propal->creer;
$permtoedit = $user->rights->propal->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -181,7 +181,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->commande->creer;
$permtoedit = $user->rights->commande->creer;
$param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity);
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -191,7 +191,7 @@ if ($id > 0 || !empty($ref)) {
$param = '&id='.$object->id.'&num='.urlencode($numref);
$moreparam = '&num='.urlencode($numref); ;
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/";
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -130,7 +130,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -148,7 +148,7 @@ if ($object->id)
$modulepart = 'banque';
$permission = $user->rights->banque->modifier;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -122,7 +122,7 @@ if ($object->id)
$modulepart = 'deplacement';
$permission = $user->rights->deplacement->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -180,7 +180,7 @@ if ($id > 0 || !empty($ref))
$permission = $user->rights->facture->creer;
$permtoedit = $user->rights->facture->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -162,7 +162,7 @@ if ($object->id)
$permission = $user->rights->tax->charges->creer;
$permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -147,7 +147,7 @@ if ($object->id)
$permission = $user->rights->tax->charges->creer;
$permtoedit = $user->rights->tax->charges->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -168,7 +168,7 @@ if ($object->id)
$permission = $user->rights->societe->contact->creer;
$permtoedit = $user->rights->societe->contact->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -192,7 +192,7 @@ if ($object->id)
$permission = $user->rights->contrat->creer;
$permtoedit = $user->rights->contrat->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -185,7 +185,7 @@ if ($object->id)
$permission = $user->rights->don->creer;
$permtoedit = $user->rights->don->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -175,7 +175,7 @@ if ($id > 0 || !empty($ref)) {
$permission = $user->rights->expedition->creer;
$permtoedit = $user->rights->expedition->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error($db);
}

View File

@ -149,7 +149,7 @@ if ($object->id)
$permission = $user->rights->expensereport->creer;
$permtoedit = $user->rights->expensereport->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -169,7 +169,7 @@ if ($object->id)
$permission = $user->rights->ficheinter->creer;
$permtoedit = $user->rights->ficheinter->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -176,7 +176,7 @@ if ($object->id > 0)
$permission = $user->rights->fournisseur->commande->creer;
$permtoedit = $user->rights->fournisseur->commande->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
header('Location: index.php');
exit;

View File

@ -300,7 +300,7 @@ if ($object->id)
$permission = $user->rights->holiday->write;
$permtoedit = $user->rights->holiday->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -157,7 +157,7 @@ if ($object->id)
$permission = $user->rights->loan->write;
$permtoedit = $user->rights->loan->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -218,7 +218,7 @@ if ($object->id)
//$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -181,7 +181,7 @@ if ($object->id)
//$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -237,7 +237,7 @@ if ($object->id)
print dol_get_fiche_end();
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
// Merge propal PDF document PDF files

View File

@ -153,7 +153,7 @@ if ($object->id)
$permission = ($user->rights->produit->creer);
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -156,7 +156,7 @@ if ($object->id > 0)
$modulepart = 'project';
$permission = ($userWrite > 0);
$permtoedit = ($userWrite > 0);
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
dol_print_error('', 'NoRecordFound');
}

View File

@ -314,7 +314,7 @@ if ($object->id > 0)
$permission = $user->rights->projet->creer;
$permtoedit = $user->rights->projet->creer;
$relativepathwithnofile = dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
header('Location: index.php');
exit;

View File

@ -195,7 +195,7 @@ if ($object->id)
$relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -196,7 +196,7 @@ if ($object->id)
//$relativepathwithnofile='recruitmentjobposition/' . dol_sanitizeFileName($object->id).'/';
$relativepathwithnofile = 'recruitmentjobposition/'.dol_sanitizeFileName($object->ref).'/';
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -135,7 +135,7 @@ if ($object->id > 0)
$modulepart = 'dolresource';
$permission = $user->rights->resource->write;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -127,7 +127,7 @@ if ($object->id)
$modulepart = 'salaries';
$permission = $user->rights->salaries->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -171,7 +171,7 @@ if ($object->id)
$permission = $user->rights->societe->creer;
$permtoedit = $user->rights->societe->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 0);
}

View File

@ -165,7 +165,7 @@ if ($object->id > 0)
$permission = $user->rights->supplier_proposal->creer;
$permtoedit = $user->rights->supplier_proposal->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
print $langs->trans("ErrorUnknown");
}

View File

@ -194,7 +194,7 @@ if ($object->id)
$permtoedit = $user->rights->ticket->write;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}

View File

@ -170,7 +170,7 @@ if ($object->id)
$permission = $user->rights->user->user->creer;
$permtoedit = $user->rights->user->user->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
} else {
accessforbidden('', 0, 1);
}