"Brion VIBBER" posted a comment on MediaWiki.r105999.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/105999#c27550

Commit summary for MediaWiki.r105999:

bring back Linker::tooltip()

Was marked deprecated with r42702 although that helper makes code a bit
nicer:

 Linker::tooltip( 'message' );

 Xml::expandAttributes( array(
        'title' => Linker::titleAttrib( 'message' )
 ) );

(the later would give you 'title=""' when 'tooltip-message' message does
not exist.

Brion VIBBER's comment:

In general we recommend against this sort of thing because it's used in awful 
HTML construction methods concat'ing a bunch of strings and hoping you end up 
with something right. :)

Would tend to be better to

 if ($tooltip) {
   $attribs['tooltip'] = $tooltip;
 }

?


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to