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, > > In my pull request #343 > (https://github.com/Dolibarr/dolibarr/pull/343/files), I introduced a > change that maybe some people don't agree. > > 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* > > marcos...@gmail.com <mailto:marcos...@gmail.com> > > > > > _______________________________________________ > Dolibarr-dev mailing list > Dolibarr-dev@nongnu.org > 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: regis.hous...@cap-networks.com Dolibarr developer: re...@dolibarr.fr Web Portal: http://www.dolibarr.fr/ SaaS offers: http://www.dolibox.fr/ Shop: http://www.dolistore.com/ Development platform: https://doliforge.org/ ---------------------------------------------------------
_______________________________________________ Dolibarr-dev mailing list Dolibarr-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/dolibarr-dev