r54733 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54732‎ | r54733 | r54734 >
Date:19:03, 10 August 2009
Author:brion
Status:ok
Tags:
Comment:
Pull back r54590, r54591, r54628, r54633, r54636, r54714 "Add after the link for "My Talk" "<number of new messages(edits)>" if there are some"
The number of edits doesn't correspond terribly well with "number of messages". Recommend leaving this for future when we actually have sensible message semantics.
Modified paths:
  • /trunk/extensions/SecurePoll/cli/testDebian.php (modified) (history)
  • /trunk/extensions/SecurePoll/includes/Base.php (modified) (history)
  • /trunk/extensions/SecurePoll/resources/SecurePoll.css (modified) (history)
  • /trunk/extensions/SecurePoll/resources/SecurePoll.js (modified) (history)
  • /trunk/extensions/SlippyMap/SlippyMap.hook.php (modified) (history)
  • /trunk/extensions/SlippyMap/js/SlippyMap.js (modified) (history)
  • /trunk/extensions/WikiAtHome/WahJobManager.php (modified) (history)
  • /trunk/extensions/Wikidata/Wikidata.i18n.php (modified) (history)
  • /trunk/extensions/Wikidata/patches/LocalSettings.txt (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/convertLinks.inc (modified) (history)
  • /trunk/phase3/maintenance/populateLogSearch.inc (modified) (history)
  • /trunk/phase3/maintenance/populateParentId.inc (modified) (history)

Diff [purge]

Property changes on: trunk/phase3/maintenance/populateParentId.inc
___________________________________________________________________
Name: svn:mergeinfo
11 - /branches/REL1_15/phase3/maintenance/populateParentId.inc:51646
Property changes on: trunk/phase3/maintenance/populateLogSearch.inc
___________________________________________________________________
Name: svn:mergeinfo
22 - /branches/REL1_15/phase3/maintenance/populateLogSearch.inc:51646
Property changes on: trunk/phase3/maintenance/convertLinks.inc
___________________________________________________________________
Name: svn:mergeinfo
33 - /branches/REL1_15/phase3/maintenance/convertLinks.inc:51646
Index: trunk/phase3/includes/User.php
@@ -216,8 +216,6 @@
217217 //@}
218218
219219 static $idCacheByName = array();
220 -
221 - public $mNewtalknumber;
222220
223221 /**
224222 * Lightweight constructor for an anonymous user.
@@ -1548,10 +1546,9 @@
15491547 } else {
15501548 $db = wfGetDB( DB_SLAVE );
15511549 }
1552 - $query = $db->select( 'user_newtalk', $field,
 1550+ $ok = $db->selectField( 'user_newtalk', $field,
15531551 array( $field => $id ), __METHOD__ );
1554 - $this->mNewtalknumber = $ok = $db->numRows( $query );
1555 - return $ok !== 0;
 1552+ return $ok !== false;
15561553 }
15571554
15581555 /**
@@ -1634,15 +1631,6 @@
16351632 $this->invalidateCache();
16361633 }
16371634 }
1638 -
1639 - /**
1640 - * Return the number of new messages
1641 - * @return \int The number of new messages
1642 - */
1643 - public function getnewMessagesCount() {
1644 - global $wgLang;
1645 - return $wgLang->formatNum( $this->mNewtalknumber );
1646 - }
16471635
16481636 /**
16491637 * Generate a current or new-future timestamp to be stored in the
Index: trunk/phase3/includes/SkinTemplate.php
@@ -302,13 +302,11 @@
303303 if( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) {
304304 $usertitle = $this->mUser->getUserPage();
305305 $usertalktitle = $usertitle->getTalkPage();
306 -
307 - $newmessagescount = $wgUser->getnewMessagesCount();
308306
309307 if( !$usertalktitle->equals( $this->mTitle ) ) {
310308 $newmessageslink = $this->link(
311309 $usertalktitle,
312 - wfMsgExt( 'newmessageslink', array( 'parsemag', 'escape' ) ),
 310+ wfMsgHtml( 'newmessageslink' ),
313311 array(),
314312 array( 'redirect' => 'no' ),
315313 array( 'known', 'noclasses' )
@@ -316,7 +314,7 @@
317315
318316 $newmessagesdifflink = $this->link(
319317 $usertalktitle,
320 - wfMsgExt( 'newmessagesdifflink', array( 'parsemag', 'escape' ), $newmessagescount ),
 318+ wfMsgHtml( 'newmessagesdifflink' ),
321319 array(),
322320 array( 'diff' => 'cur' ),
323321 array( 'known', 'noclasses' )
@@ -512,7 +510,7 @@
513511 * @private
514512 */
515513 function buildPersonalUrls() {
516 - global $wgOut, $wgRequest, $wgUser, $wgLang;
 514+ global $wgOut, $wgRequest;
517515
518516 $title = $wgOut->getTitle();
519517 $pageurl = $title->getLocalURL();
@@ -533,26 +531,8 @@
534532 'active' => ( $this->userpageUrlDetails['href'] == $pageurl )
535533 );
536534 $usertalkUrlDetails = $this->makeTalkUrlDetails( $this->userpage );
537 - if ( $wgUser->getNewtalk() ) {
538 - # do not show text when we are viewing our
539 - # own talk page
540 - if( !$title->equals( $wgUser->getTalkPage() ) ) {
541 - $newmessagescount = $wgUser->getnewMessagesCount();
542 - $newtalk = wfMsg( 'word-separator' ) . wfMsg( 'parentheses', $newmessagescount );
543 -
544 - # disable caching
545 - $wgOut->setSquidMaxage( 0 );
546 - $wgOut->enableClientCache( false );
547 - }
548 - else {
549 - $newtalk = '';
550 - }
551 - }
552 - else {
553 - $newtalk = '';
554 - }
555535 $personal_urls['mytalk'] = array(
556 - 'text' => wfMsg( 'mytalk', $newtalk ),
 536+ 'text' => wfMsg( 'mytalk' ),
557537 'href' => &$usertalkUrlDetails['href'],
558538 'class' => $usertalkUrlDetails['exists'] ? false : 'new',
559539 'active' => ( $usertalkUrlDetails['href'] == $pageurl )
Index: trunk/phase3/includes/Skin.php
@@ -1041,11 +1041,9 @@
10421042 # do not show "You have new messages" text when we are viewing our
10431043 # own talk page
10441044 if( !$this->mTitle->equals( $wgUser->getTalkPage() ) ) {
1045 - $nu = $wgUser->getnewMessagesCount();
1046 -
10471045 $tl = $this->link(
10481046 $wgUser->getTalkPage(),
1049 - wfMsgExt( 'newmessageslink', array( 'parsemag', 'escape' ) ),
 1047+ wfMsgHtml( 'newmessageslink' ),
10501048 array(),
10511049 array( 'redirect' => 'no' ),
10521050 array( 'known', 'noclasses' )
@@ -1053,7 +1051,7 @@
10541052
10551053 $dl = $this->link(
10561054 $wgUser->getTalkPage(),
1057 - wfMsgExt( 'newmessagesdifflink', array( 'parsemag', 'escape' ), $nu ),
 1055+ wfMsgHtml( 'newmessagesdifflink' ),
10581056 array(),
10591057 array( 'diff' => 'cur' ),
10601058 array( 'known', 'noclasses' )
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -751,7 +751,7 @@
752752 'cancel' => 'Cancel',
753753 'moredotdotdot' => 'More...',
754754 'mypage' => 'My page',
755 -'mytalk' => 'My talk$1',
 755+'mytalk' => 'My talk',
756756 'anontalk' => 'Talk for this IP',
757757 'navigation' => 'Navigation',
758758 'and' => '&#32;and',
@@ -896,7 +896,7 @@
897897 'retrievedfrom' => 'Retrieved from "$1"',
898898 'youhavenewmessages' => 'You have $1 ($2).',
899899 'newmessageslink' => 'new messages',
900 -'newmessagesdifflink' => '{{PLURAL:$1|one change|$1 changes}}',
 900+'newmessagesdifflink' => 'last change',
901901 'youhavenewmessagesmulti' => 'You have new messages on $1',
902902 'newtalkseparator' => ',&#32;', # do not translate or duplicate this message to other languages
903903 'editsection' => 'edit',
Index: trunk/phase3/RELEASE-NOTES
@@ -405,8 +405,6 @@
406406 * (bug 17864/19519) Added proper input normalization in Special:UserRights
407407 * (bug 20086) Add Hook to add extra statistics at the end of Special:Statistics
408408 * (bug 19289) importDump.php can now handle bzip2 and 7zip
409 -* (bug 20103) Add after the link for "My Talk" a info with the number of the
410 - new messages for the user
411409 * (bug 20131) Fixed a PHP notice for users having the "rollback" right on
412410 Special:RecentChangesLinked
413411
Property changes on: trunk/extensions/WikiAtHome/WahJobManager.php
___________________________________________________________________
Name: svn:mergeinfo
414412 -
Property changes on: trunk/extensions/SlippyMap/SlippyMap.hook.php
___________________________________________________________________
Name: svn:mergeinfo
415413 -
Property changes on: trunk/extensions/SlippyMap/js/SlippyMap.js
___________________________________________________________________
Name: svn:mergeinfo
416414 -
Property changes on: trunk/extensions/Wikidata/patches/LocalSettings.txt
___________________________________________________________________
Name: svn:mergeinfo
417415 -
Property changes on: trunk/extensions/Wikidata/Wikidata.i18n.php
___________________________________________________________________
Name: svn:mergeinfo
418416 -
Property changes on: trunk/extensions/SecurePoll/includes/Base.php
___________________________________________________________________
Name: svn:mergeinfo
419417 -
Property changes on: trunk/extensions/SecurePoll/cli/testDebian.php
___________________________________________________________________
Name: svn:mergeinfo
420418 -
Property changes on: trunk/extensions/SecurePoll/resources/SecurePoll.css
___________________________________________________________________
Name: svn:mergeinfo
421419 -
Property changes on: trunk/extensions/SecurePoll/resources/SecurePoll.js
___________________________________________________________________
Name: svn:mergeinfo
422420 -

Follow-up revisions

RevisionCommit summaryAuthorDate
r54740Localisation updates for core messages from translatewiki.net...siebrand20:45, 10 August 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r54590Add after the link for "My Talk" "<number of new messages(edits)>" if there a...jan16:39, 7 August 2009
r54591Update RELEASE-NOTES for r54590jan16:45, 7 August 2009
r54628(fixes for r54590 & bug 20103) Use now only one query and add number to messa...jan10:37, 8 August 2009
r54633(fixes for r54628) Add PLURAL to "last change" messagejan16:02, 8 August 2009
r54636fixes for r54633: Add wfMsgExt for parsing PLURAL in message "newmessagesdiff...jan17:34, 8 August 2009
r54714(r54628 + r54633) Display (...) only if there new messagesjan11:29, 10 August 2009

Status & tagging log