[dev] Re: [cvs] commit: kronolith month.php [patch attached]

Jan Schneider jan at horde.org
Sun Nov 28 05:52:20 PST 2004


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Quoting "Derek P. Moore" <derekm at hackunix.org>:
>
>> I've attached a patch (img.api.diff) that extends Horde::img()'s API in a
>> backwards compatible fashion so you can optionally specify alternative
>> text for the title attribute as well.  This was the best way I could 
>> think of to extend img()'s API, I hope it's acceptable.
>
> There's an unrelated change in there (is_null) - any reason for that?
>
> I think I would rather introduce another parameter; yes, it's awkward,
> but so is
> passing in an array or a string, and remember what order to put the 
> darn array
> in.
>
> Also, since we're in the middle of an RC, I hesitate to just do the
> change even
> if it's completely backwards compatible and all that. On the other 
> hand having
> different alt text from title text makes sense to me, so having some 
> way to do
> this would be nice.

This is not such a pressing issue that it couldn't wait for after the final
versions.

> How about this: specify title="" in the $attr string. Have Horde::img()
> check to
> see if the string title=" appears in $attr. If it doesn't, insert
> title="$alt",
> otherwise, don't. That way we don't even need a new parameter and you can
> achieve the same thing.

This sounds like the cleanest solution to me.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the dev mailing list