https://bugzilla.wikimedia.org/show_bug.cgi?id=424
--- Comment #28 from Krinkle <[email protected]> 2012-03-10 21:05:03 UTC --- (In reply to comment #26) > http://www.sociotopia.com/wiki/watchlist_unwatch.patch > Hi Aaron, The general idea of the patch looks good. The surrounding code offers most of the functionality already. This extends it nicely to add the unwatch link. > if( !isset( $this->message ) ) { >- foreach ( explode( ' ', 'cur diff hist last blocklink >history ' . >+ foreach ( explode( ' ', 'cur diff hist last blocklink >history unwatch ' . > 'semicolon-separator pipe-separator' ) as $msg ) { > $this->message[$msg] = wfMsgExt( $msg, array( > 'escapenoentities' ) ); > } As you mention already this re-uses the message key "unwatch" (which is used elsewhere in the interface) for the link here. We try to avoid re-using messages for different purposes as translators can otherwise not translate it properly (although it is the same word in English, for other languages it might differ). This code was written several years ago when message keys were very generic. I suggest using a key like "watchlist-toollink-unwatch". And then in ./languages/messages/MessagesEn.php add it with a lowercase message value "unwatch" and in ./languages/messages/MessagesQqq.php add a short description about where the message is used and what it does (e.g. "unwatch link on Special:Watchlist) I was wondering about this part of the patch: > if( $szdiff === 0 ) { >- return "<$tag >class='mw-plusminus-null'>($formatedSize)</$tag>"; >+ return "<$tag >class='mw-plusminus-null'>($formatedSize)<$tag>"; > } elseif( $szdiff > 0 ) { >- return "<$tag >class='mw-plusminus-pos'>(+$formatedSize)</$tag>"; >+ return "<$tag >class='mw-plusminus-pos'>(+$formatedSize)<$tag>"; > } else { >- return "<$tag >class='mw-plusminus-neg'>($formatedSize)</$tag>"; >+ return "<$tag >class='mw-plusminus-neg'>($formatedSize)<$tag>"; > } What is the purpose of this? It appears this is a bogus change not meant to be part of the patch (it changes the 3 <span>..</span> HTML tags into double-opening without closing tags. >+ $s .= Linker::linkKnown( >+ $rc->getTitle(), >+ $this->message['unwatch'], >+ array(), >+ array( >+ 'curid' => $rc->mAttribs['rc_cur_id'], >+ 'action' => 'unwatch' >+ ) As of MediaWiki 1.18 watch/unwatch require a token. Use UnwatchAction::getUnwatchToken -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
