mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
move include_once to include when it's a tpl
This commit is contained in:
parent
80995c34b5
commit
4b9bf40a8f
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user