X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=modules%2Ferl%2Feuphorik_protocole.erl;h=c1bc3768dc95b00b3a2a9a55c4bb37c576d7f0dd;hp=dc29bf5d2f8f3e53af8aae28050738c1c7df9021;hb=dd72797c35b6bde903c87b329bdb145f6863dc4a;hpb=97f4d63243c0d3e98827d1a5348f5d64d7fd8b03 diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index dc29bf5..c1bc376 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -230,7 +230,11 @@ format_minutes(Min) -> Minutes = Min rem (60), if Jours =/= 0 -> integer_to_list(Jours) ++ "Jour" ++ if Jours > 1 -> "s"; true -> "" end ++ " "; true -> "" end ++ if Heures =/= 0 -> integer_to_list(Heures) ++ "h"; true -> "" end ++ - lists:flatten(io_lib:format(if Jours =:= 0, Heures =:= 0 -> "~w"; true -> "~2.2.0w" end, [Minutes])) ++ "min". + if Minutes == 0 -> + ""; + true -> + lists:flatten(io_lib:format(if Jours =:= 0, Heures =:= 0 -> "~w"; true -> "~2.2.0w" end, [Minutes])) ++ "min" + end. % bannissement d'un utilisateur (son ip est bannie)