Qual: Uniformize code

This commit is contained in:
Laurent Destailleur 2010-09-12 21:07:45 +00:00
parent f56d60de76
commit bfd06a7dab
2 changed files with 11 additions and 10 deletions

View File

@ -301,7 +301,7 @@ if (GETPOST("action") == 'update')
//if ($_POST["admin"] == -1) $_POST["admin"]='0'; //if ($_POST["admin"] == -1) $_POST["admin"]='0';
$actioncomm = new Actioncomm($db); $actioncomm = new Actioncomm($db);
$actioncomm->fetch($_POST["id"]); $actioncomm->fetch($id);
$datep=dol_mktime($_POST["aphour"], $datep=dol_mktime($_POST["aphour"],
$_POST["apmin"], $_POST["apmin"],
@ -629,7 +629,7 @@ if ($id)
* Affichage onglets * Affichage onglets
*/ */
$head=actions_prepare_head(); $head=actions_prepare_head($act);
dol_fiche_head($head, 'card', $langs->trans("Action"),0,'task'); dol_fiche_head($head, 'card', $langs->trans("Action"),0,'task');
$now=dol_now(); $now=dol_now();

View File

@ -291,8 +291,8 @@ function show_array_last_actions_done($max=5)
/** /**
* \brief Define head array for tabs of agenda setup pages * Define head array for tabs of agenda setup pages
* \return Array of head * @return Array of head
*/ */
function agenda_prepare_head() function agenda_prepare_head()
{ {
@ -314,27 +314,28 @@ function agenda_prepare_head()
} }
/** /**
* \brief Define head array for tabs of agenda setup pages * Define head array for tabs of agenda setup pages
* \return Array of head * @param action Object action
* @return Array of head
*/ */
function actions_prepare_head() function actions_prepare_head($action)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$_GET["id"]; $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$action->id;
$head[$h][1] = $langs->trans("CardAction"); $head[$h][1] = $langs->trans("CardAction");
$head[$h][2] = 'card'; $head[$h][2] = 'card';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$_GET["id"]; $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$action->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$_GET["id"]; $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$action->id;
$head[$h][1] = $langs->trans('Info'); $head[$h][1] = $langs->trans('Info');
$head[$h][2] = 'info'; $head[$h][2] = 'info';
$h++; $h++;