CINXE.COM

r47392 MediaWiki - Code Review archive

<html> <head> <title>r47392 MediaWiki - Code Review archive</title> <meta charset="utf-8"> <link rel="stylesheet" href="../ext.codereview.styles.css"/> </head> <body> <h1>r47392 MediaWiki - Code Review archive</h1> <div id="mw-content-text" class="mw-body-content"><form action="/wiki/Special:Code/MediaWiki/47392" method="post"><table class="mw-codereview-meta"><tr><td>Repository:</td><td><a href="https://www.mediawiki.org/wiki/Special:Code/MediaWiki" title="Special:Code/MediaWiki">MediaWiki</a></td></tr> <tr><td>Revision:</td><td>&lt;&#160;<a href="./47391.html" title="Special:Code/MediaWiki/47391">r47391</a>‎ | <b>r47392</b> | <a href="./47393.html" title="Special:Code/MediaWiki/47393">r47393</a>&#160;&gt;</td></tr> <tr><td>Date:</td><td>23:05, 17 February 2009</td></tr> <tr><td>Author:</td><td><a href="https://www.mediawiki.org/wiki/Special:Code/MediaWiki/author/aaron" title="Special:Code/MediaWiki/author/aaron">aaron</a></td></tr> <tr><td>Status:</td><td>deferred (<a href="#code-comments">Comments</a>) </td></tr> <tr><td>Tags:</td><td></td></tr> <tr><td>Comment:</td><td><div class="mw-codereview-message">Rename new ACTIVEUSERS word to NUMBEROFACTIVEUSERS</div></td></tr> <tr><td>Modified paths:</td><td><div class='mw-codereview-paths mw-content-ltr'><ul> <li><b>/trunk/phase3/includes/MagicWord.php</b> (modified) (<a href="https://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki&amp;path=%2Ftrunk%2Fphase3%2Fincludes%2FMagicWord.php" title="Special:Code/MediaWiki">history</a>)</li> <li><b>/trunk/phase3/includes/parser/CoreParserFunctions.php</b> (modified) (<a href="https://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki&amp;path=%2Ftrunk%2Fphase3%2Fincludes%2Fparser%2FCoreParserFunctions.php" title="Special:Code/MediaWiki">history</a>)</li> <li><b>/trunk/phase3/includes/parser/Parser.php</b> (modified) (<a href="https://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki&amp;path=%2Ftrunk%2Fphase3%2Fincludes%2Fparser%2FParser.php" title="Special:Code/MediaWiki">history</a>)</li> <li><b>/trunk/phase3/languages/messages/MessagesEn.php</b> (modified) (<a href="https://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki&amp;path=%2Ftrunk%2Fphase3%2Flanguages%2Fmessages%2FMessagesEn.php" title="Special:Code/MediaWiki">history</a>)</li> </ul></div> </td></tr> </table> <h2>Diff <small>[<a href="https://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki/47392&amp;action=purge" title="Special:Code/MediaWiki/47392">purge</a>]</small></h2><div class='mw-codereview-diff' id='mw-codereview-diff'><table class="mw-codereview-diff"><tr id="1" class="patchedfile"><td colspan="3">Index: trunk/phase3/includes/parser/Parser.php</td></tr> <tr id="5"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -2492,7 +2492,7 @@</span></td></tr> <tr id="6"><td class="linenumbers">2493</td><td class="linenumbers">2493</td><td class="unchanged"><span> return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::images() );</span></td></tr> <tr id="7"><td class="linenumbers">2494</td><td class="linenumbers">2494</td><td class="unchanged"><span> case 'numberofusers':</span></td></tr> <tr id="8"><td class="linenumbers">2495</td><td class="linenumbers">2495</td><td class="unchanged"><span> return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::users() );</span></td></tr> <tr id="9"><td class="linenumbers">2496</td><td class="linenumbers"> </td><td class="del"><del>- case 'activeusers':</del></td></tr> <tr id="10"><td class="linenumbers"> </td><td class="linenumbers">2496</td><td class="ins"><ins>+ case 'numberofactiveusers':</ins></td></tr> <tr id="11"><td class="linenumbers">2497</td><td class="linenumbers">2497</td><td class="unchanged"><span> return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::activeUsers() );</span></td></tr> <tr id="12"><td class="linenumbers">2498</td><td class="linenumbers">2498</td><td class="unchanged"><span> case 'numberofpages':</span></td></tr> <tr id="13"><td class="linenumbers">2499</td><td class="linenumbers">2499</td><td class="unchanged"><span> return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::pages() );</span></td></tr> <tr id="14" class="patchedfile"><td colspan="3">Index: trunk/phase3/includes/parser/CoreParserFunctions.php</td></tr> <tr id="18"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -31,7 +31,7 @@</span></td></tr> <tr id="19"><td class="linenumbers">32</td><td class="linenumbers">32</td><td class="unchanged"><span> $parser->setFunctionHook( 'plural', array( __CLASS__, 'plural' ), SFH_NO_HASH );</span></td></tr> <tr id="20"><td class="linenumbers">33</td><td class="linenumbers">33</td><td class="unchanged"><span> $parser->setFunctionHook( 'numberofpages', array( __CLASS__, 'numberofpages' ), SFH_NO_HASH );</span></td></tr> <tr id="21"><td class="linenumbers">34</td><td class="linenumbers">34</td><td class="unchanged"><span> $parser->setFunctionHook( 'numberofusers', array( __CLASS__, 'numberofusers' ), SFH_NO_HASH );</span></td></tr> <tr id="22"><td class="linenumbers">35</td><td class="linenumbers"> </td><td class="del"><del>- $parser->setFunctionHook( 'activeusers', array( __CLASS__, 'activeusers' ), SFH_NO_HASH );</del></td></tr> <tr id="23"><td class="linenumbers"> </td><td class="linenumbers">35</td><td class="ins"><ins>+ $parser->setFunctionHook( 'numberofactiveusers', array( __CLASS__, 'numberofactiveusers' ), SFH_NO_HASH );</ins></td></tr> <tr id="24"><td class="linenumbers">36</td><td class="linenumbers">36</td><td class="unchanged"><span> $parser->setFunctionHook( 'numberofarticles', array( __CLASS__, 'numberofarticles' ), SFH_NO_HASH );</span></td></tr> <tr id="25"><td class="linenumbers">37</td><td class="linenumbers">37</td><td class="unchanged"><span> $parser->setFunctionHook( 'numberoffiles', array( __CLASS__, 'numberoffiles' ), SFH_NO_HASH );</span></td></tr> <tr id="26"><td class="linenumbers">38</td><td class="linenumbers">38</td><td class="unchanged"><span> $parser->setFunctionHook( 'numberofadmins', array( __CLASS__, 'numberofadmins' ), SFH_NO_HASH );</span></td></tr> <tr id="27"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -245,7 +245,7 @@</span></td></tr> <tr id="28"><td class="linenumbers">246</td><td class="linenumbers">246</td><td class="unchanged"><span> static function numberofusers( $parser, $raw = null ) {</span></td></tr> <tr id="29"><td class="linenumbers">247</td><td class="linenumbers">247</td><td class="unchanged"><span> return self::formatRaw( SiteStats::users(), $raw );</span></td></tr> <tr id="30"><td class="linenumbers">248</td><td class="linenumbers">248</td><td class="unchanged"><span> }</span></td></tr> <tr id="31"><td class="linenumbers">249</td><td class="linenumbers"> </td><td class="del"><del>- static function activeusers( $parser, $raw = null ) {</del></td></tr> <tr id="32"><td class="linenumbers"> </td><td class="linenumbers">249</td><td class="ins"><ins>+ static function numberofactiveusers( $parser, $raw = null ) {</ins></td></tr> <tr id="33"><td class="linenumbers">250</td><td class="linenumbers">250</td><td class="unchanged"><span> return self::formatRaw( SiteStats::activeUsers(), $raw );</span></td></tr> <tr id="34"><td class="linenumbers">251</td><td class="linenumbers">251</td><td class="unchanged"><span> }</span></td></tr> <tr id="35"><td class="linenumbers">252</td><td class="linenumbers">252</td><td class="unchanged"><span> static function numberofarticles( $parser, $raw = null ) {</span></td></tr> <tr id="36" class="patchedfile"><td colspan="3">Index: trunk/phase3/includes/MagicWord.php</td></tr> <tr id="40"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -90,7 +90,7 @@</span></td></tr> <tr id="41"><td class="linenumbers">91</td><td class="linenumbers">91</td><td class="unchanged"><span> 'subjectpagename',</span></td></tr> <tr id="42"><td class="linenumbers">92</td><td class="linenumbers">92</td><td class="unchanged"><span> 'subjectpagenamee',</span></td></tr> <tr id="43"><td class="linenumbers">93</td><td class="linenumbers">93</td><td class="unchanged"><span> 'numberofusers',</span></td></tr> <tr id="44"><td class="linenumbers">94</td><td class="linenumbers"> </td><td class="del"><del>- 'activeusers',</del></td></tr> <tr id="45"><td class="linenumbers"> </td><td class="linenumbers">94</td><td class="ins"><ins>+ 'numberofactiveusers',</ins></td></tr> <tr id="46"><td class="linenumbers">95</td><td class="linenumbers">95</td><td class="unchanged"><span> 'newsectionlink',</span></td></tr> <tr id="47"><td class="linenumbers">96</td><td class="linenumbers">96</td><td class="unchanged"><span> 'numberofpages',</span></td></tr> <tr id="48"><td class="linenumbers">97</td><td class="linenumbers">97</td><td class="unchanged"><span> 'currentversion',</span></td></tr> <tr id="49"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -142,7 +142,7 @@</span></td></tr> <tr id="50"><td class="linenumbers">143</td><td class="linenumbers">143</td><td class="unchanged"><span> 'localweek' => 3600,</span></td></tr> <tr id="51"><td class="linenumbers">144</td><td class="linenumbers">144</td><td class="unchanged"><span> 'localdow' => 3600,</span></td></tr> <tr id="52"><td class="linenumbers">145</td><td class="linenumbers">145</td><td class="unchanged"><span> 'numberofusers' => 3600,</span></td></tr> <tr id="53"><td class="linenumbers">146</td><td class="linenumbers"> </td><td class="del"><del>- 'activeusers' => 3600,</del></td></tr> <tr id="54"><td class="linenumbers"> </td><td class="linenumbers">146</td><td class="ins"><ins>+ 'numberofactiveusers' => 3600,</ins></td></tr> <tr id="55"><td class="linenumbers">147</td><td class="linenumbers">147</td><td class="unchanged"><span> 'numberofpages' => 3600,</span></td></tr> <tr id="56"><td class="linenumbers">148</td><td class="linenumbers">148</td><td class="unchanged"><span> 'currentversion' => 86400,</span></td></tr> <tr id="57"><td class="linenumbers">149</td><td class="linenumbers">149</td><td class="unchanged"><span> 'currenttimestamp' => 3600,</span></td></tr> <tr id="58" class="patchedfile"><td colspan="3">Index: trunk/phase3/languages/messages/MessagesEn.php</td></tr> <tr id="62"><td class="linenumbers">—</td><td class="linenumbers">—</td><td class="chunkdelimiter"><span>@@ -232,7 +232,7 @@</span></td></tr> <tr id="63"><td class="linenumbers">233</td><td class="linenumbers">233</td><td class="unchanged"><span> 'numberofarticles' => array( 1, 'NUMBEROFARTICLES' ),</span></td></tr> <tr id="64"><td class="linenumbers">234</td><td class="linenumbers">234</td><td class="unchanged"><span> 'numberoffiles' => array( 1, 'NUMBEROFFILES' ),</span></td></tr> <tr id="65"><td class="linenumbers">235</td><td class="linenumbers">235</td><td class="unchanged"><span> 'numberofusers' => array( 1, 'NUMBEROFUSERS' ),</span></td></tr> <tr id="66"><td class="linenumbers">236</td><td class="linenumbers"> </td><td class="del"><del>- 'activeusers' => array( 1, 'ACTIVEUSERS', 'NUMBEROFACTIVEUSERS' ),</del></td></tr> <tr id="67"><td class="linenumbers"> </td><td class="linenumbers">236</td><td class="ins"><ins>+ 'numberofactiveusers' => array( 1, 'NUMBEROFACTIVEUSERS' ),</ins></td></tr> <tr id="68"><td class="linenumbers">237</td><td class="linenumbers">237</td><td class="unchanged"><span> 'numberofedits' => array( 1, 'NUMBEROFEDITS' ),</span></td></tr> <tr id="69"><td class="linenumbers">238</td><td class="linenumbers">238</td><td class="unchanged"><span> 'numberofviews' => array( 1, 'NUMBEROFVIEWS' ),</span></td></tr> <tr id="70"><td class="linenumbers">239</td><td class="linenumbers">239</td><td class="unchanged"><span> 'pagename' => array( 1, 'PAGENAME' ),</span></td></tr> </table> </div> <h2 id='code-references'>Follow-up revisions</h2> <table border='1' class='wikitable'><tr><th>Revision</th><th>Commit summary</th><th>Author</th><th>Date</th></tr><tr class='mw-codereview-status-ok'><td><a href="./47433.html" title="Special:Code/MediaWiki/47433">r47433</a></td><td>Follow up <a href="./47392.html" title="Special:Code/MediaWiki/47392">r47392</a>: Rename magic word for existing translations too</td><td><a href="https://www.mediawiki.org/wiki/Special:Code/MediaWiki/author/raymond" title="Special:Code/MediaWiki/author/raymond">raymond</a></td><td>08:25, 18 February 2009</td></tr></table><h2 id='code-comments'>Comments</h2> <div class='mw-codereview-comments'><div class="mw-codereview-comment" id="c1803" style="margin-left: 0px"><div class="mw-codereview-comment-meta"><a href="./47392.html#c1803" title="Special:Code/MediaWiki/47392">#</a>Comment by <a href="https://www.mediawiki.org/wiki/User:Werdna" class="mw-userlink" title="User:Werdna"><bdi>Werdna</bdi></a> <span class="mw-usertoollinks">(<a href="https://www.mediawiki.org/wiki/User_talk:Werdna" class="mw-usertoollinks-talk" title="User talk:Werdna">talk</a> | <a href="https://www.mediawiki.org/wiki/Special:Contributions/Werdna" class="mw-usertoollinks-contribs" title="Special:Contributions/Werdna">contribs</a>)</span> &#160; 23:44, 17 February 2009 </div><div class="mw-codereview-comment-text mw-content-ltr"><p>You didn't "rename" it, you removed a perfectly functional alias. Why? </p></div></div> <div class="mw-codereview-comment" id="c1814" style="margin-left: 48px"><div class="mw-codereview-comment-meta"><a href="./47392.html#c1814" title="Special:Code/MediaWiki/47392">#</a>Comment by <a href="https://www.mediawiki.org/wiki/User:Remember_the_dot" class="mw-userlink" title="User:Remember the dot"><bdi>Remember the dot</bdi></a> <span class="mw-usertoollinks">(<a href="https://www.mediawiki.org/wiki/User_talk:Remember_the_dot" class="mw-usertoollinks-talk" title="User talk:Remember the dot">talk</a> | <a href="https://www.mediawiki.org/wiki/Special:Contributions/Remember_the_dot" class="mw-usertoollinks-contribs" title="Special:Contributions/Remember the dot">contribs</a>)</span> &#160; 04:52, 18 February 2009 </div><div class="mw-codereview-comment-text mw-content-ltr"><p><a href="./46822.html#c1733" title="Special:Code/MediaWiki/46822">Special:Code/MediaWiki/46822#c1733</a> </p></div></div> <div class="mw-codereview-comment" id="c1817" style="margin-left: 0px"><div class="mw-codereview-comment-meta"><a href="./47392.html#c1817" title="Special:Code/MediaWiki/47392">#</a>Comment by <a href="https://www.mediawiki.org/wiki/User:Raymond" class="mw-userlink" title="User:Raymond"><bdi>Raymond</bdi></a> <span class="mw-usertoollinks">(<a href="https://www.mediawiki.org/wiki/User_talk:Raymond" class="mw-usertoollinks-talk" title="User talk:Raymond">talk</a> | <a href="https://www.mediawiki.org/wiki/Special:Contributions/Raymond" class="mw-usertoollinks-contribs" title="Special:Contributions/Raymond">contribs</a>)</span> &#160; 08:27, 18 February 2009 </div><div class="mw-codereview-comment-text mw-content-ltr"><p>Follow up <a href="./47433.html" title="Special:Code/MediaWiki/47433">r47433</a>: Rename magic word for existing translations too </p></div></div></div><h2 id='code-changes'>Status &amp; tagging log</h2> <ul class='mw-codereview-changes'><li>00:20, 14 September 2011&#160;<a href="https://www.mediawiki.org/wiki/User:Meno25" class="mw-userlink" title="User:Meno25"><bdi>Meno25</bdi></a> <span class="mw-usertoollinks">(<a href="https://www.mediawiki.org/wiki/User_talk:Meno25" class="mw-usertoollinks-talk" title="User talk:Meno25">talk</a> | <a href="https://www.mediawiki.org/wiki/Special:Contributions/Meno25" class="mw-usertoollinks-contribs" title="Special:Contributions/Meno25">contribs</a>)</span>&#160;changed the <b>status</b> of r47392 <i>[<b>removed:</b> old&#160;<b>added:</b> deferred]</i></li></ul></form></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10