"Catrope" changed the status of MediaWiki.r107914 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/107914#c29247

Old Status: new
> New Status: ok

Commit summary for MediaWiki.r107914:

Links options are now referenced by letter rather than number, and link option A
has been added:
        - modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js:
                - Updated linkInfo to use letters and added option A
                - Updated the linkBucket function to use letters
                        * NB: Changed the query string option to set a link 
from "aft_link" to
                          "aftv5_link".
                - Changed the link-killing lines so that you can pass an 
override in
                  the query string if debug is turned on 
("?aftv5_show_link=true")
                - Moved section links to just before the toolbox link, as they 
are now
                  option H
                - Changed each of the link ids set as data to use letters
                - Added link option A (sitesub), to an appropriate location 
depending
                  on the current skin
                - Updated link option B (titlebar) to slide down a touch if 
there are
                  geocoordinates
        - modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js:
                - Removed duplicate checks from $.articleFeedbackv5.setLinkId()
                - Updated doc block comment for $.articleFeedbackv5.linkId to 
reference
                  the bucketing config option rather than repeating it
        - ApiArticleFeedbackv5:
                - Updated newFeedback() to use the index of the link letter (- 
= 0, A =
                  1, etc.) as the link ID
        - ArticleFeedbackv5.php:
                - Updated options for $wgArticleFeedbackv5LinkBuckets
        - ArticleFeedbackv5.i18n.php:
                - Added "articlefeedbackv5-sitesub-linktext" for link option A
        - ArticleFeedbackv5.hooks.php:
                - Added "articlefeedbackv5-sitesub-linktext" to messages for
                  ext.articleFeedbackv5

Catrope's comment:

<pre>
+               // Get the link ID
+               $links = array_flip( array_keys( 
$wgArticleFeedbackv5LinkBuckets['buckets'] ) );
+               $linkId = isset($links[$linkName]) ? $links[$linkName] : 0;
</pre>
This is clever; so clever, in fact, that I had to read it three times :) . 
Apparently what it does is it converts <code>'-'</code> to 0, <code>'A'</code> 
to 1, <code>'B'</code> to 2, etc., right? Could use a clarifying comment.

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

Reply via email to