[Devel] r275 - branches/dui
David MENTRE
dmentre at linux-france.org
Ven 25 Mai 21:21:06 CEST 2007
Bonjour,
svn at agendadulibre.org writes:
> + $return .=3D " <li><a href=3D'moderatetags.php?op=3DcatListTag&id=
=3D{$catRecord->id}' title=3D\"". sprintf(_("Liste des tags de la cat=E9gor=
ie %s"), $catRecord->name). "\">". sprintf(_("%03s tags"), $catRecord->n). =
"</a> <strong>{$catRecord->name}</strong> <sapn class=3D'description'>{$cat=
Record->description}</span>";
> + if ($catRecord->id>0) $return .=3D " - <a href=3D'moderatetags.php?o=
p=3DcatEdit&id=3D{$catRecord->id}' title=3D\"". sprintf(_("Modifier la cat=
=E9gorie %s"), $catRecord->name). "\">". _("Modifier"). "</a>";
> + if ($catRecord->n=3D=3D0) $return .=3D " - <a href=3D'moderatetags.p=
hp?op=3DcatDel&id=3D{$catRecord->id}' title=3D\"". sprintf(_("Supprimer la =
cat=E9gorie %s"), $catRecord->name). "\">". _("Supprimer"). "</a>";
Une remarque de style : pour mon propre code je limite les lignes =C3=A0 80
caract=C3=A8res. C'est parfois un peu contraingnant mais =C3=A7a force =C3=
=A0 bien
structurer le code. Par exemple tu pourrais =C3=A9crire :
if ($catRecord->n=3D=3D0)=20
$return .=3D " - <a href=3D'moderatetags.php?op=3DcatDel&id=3D{$catRecor=
d->id}' title=3D\""
. sprintf(_("Supprimer la cat=E9gorie %s"), $catRecord->name)
. "\">" . _("Supprimer") . "</a>";
C'est peut-=C3=AAtre un peu plus verbeux mais je pense plus lisible.
Amicalement,
d.
--=20
GPG/PGP key: A3AD7A2A David MENTRE <dmentre at linux-france.org>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A
Plus d'informations sur la liste de diffusion Devel