hi,
it was a
joke, I also prefer
the 2nd way, it avoids
errors numbering
:-))
Le 24/08/12 18:00, Marcos García a
écrit :
Hi everyone,
It is changing this:
$h = 0;
$head
= array();
$head[$h][0]
=
DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
$head[$h][1]
= $langs->trans("SubscriptionCard");
$head[$h][2]
= 'general';
$h++;
$head[$h][0]
=
DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id;
$head[$h][1]
= $langs->trans("Info");
$head[$h][2]
= 'info';
$h++;
dol_fiche_head($head,
'general', $langs->trans("Subscription"));
To this:
$tabs = array(
array(
DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id,
$langs->trans('SubscriptionCard'),
'general'
),
array(
DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id,
$langs->trans('Info'),
'info'
)
);
dol_fiche_head($tabs,
'general', $langs->trans("Subscription"));
I prefer the 2nd way because it doesn't make sense to use
$h if we know the value of $h and if the array is not going to
be generated dynamically, also we already know the value of
the array so it doesn't make sense to split it in multiple
lines.
I was planning to change it for every call of
dol_fiche_head in Dolibarr, but a comment in the pull request
of Régis made me think that maybe you don't like this change.
What do you think about it?
Regards,
Marcos
García
address@hidden
_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
Cordialement,
--
Régis Houssin
---------------------------------------------------------
Cap-Networks
Cidex 1130
34, route de Gigny
71240 MARNAY
FRANCE
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Web: http://www.cap-networks.com/
Email: address@hidden
Dolibarr developer: address@hidden
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------
|