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.
* (bug 17864/19519) Added proper input normalization in Special:UserRights
* (bug 20086) Add Hook to add extra statistics at the end of Special:Statistics
* (bug 19289) importDump.php can now handle bzip2 and 7zip
-* (bug 20103) Add after the link for "My Talk" a info with the number of the
- new messages for the user
* (bug 20131) Fixed a PHP notice for users having the "rollback" right on
Special:RecentChangesLinked
# do not show "You have new messages" text when we are viewing our
# own talk page
if( !$this->mTitle->equals( $wgUser->getTalkPage() ) ) {
- $nu = $wgUser->getnewMessagesCount();
-
$tl = $this->link(
$wgUser->getTalkPage(),
- wfMsgExt( 'newmessageslink', array( 'parsemag', 'escape' ) ),
+ wfMsgHtml( 'newmessageslink' ),
array(),
array( 'redirect' => 'no' ),
array( 'known', 'noclasses' )
$dl = $this->link(
$wgUser->getTalkPage(),
- wfMsgExt( 'newmessagesdifflink', array( 'parsemag', 'escape' ), $nu ),
+ wfMsgHtml( 'newmessagesdifflink' ),
array(),
array( 'diff' => 'cur' ),
array( 'known', 'noclasses' )
if( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) {
$usertitle = $this->mUser->getUserPage();
$usertalktitle = $usertitle->getTalkPage();
-
- $newmessagescount = $wgUser->getnewMessagesCount();
if( !$usertalktitle->equals( $this->mTitle ) ) {
$newmessageslink = $this->link(
$usertalktitle,
- wfMsgExt( 'newmessageslink', array( 'parsemag', 'escape' ) ),
+ wfMsgHtml( 'newmessageslink' ),
array(),
array( 'redirect' => 'no' ),
array( 'known', 'noclasses' )
$newmessagesdifflink = $this->link(
$usertalktitle,
- wfMsgExt( 'newmessagesdifflink', array( 'parsemag', 'escape' ), $newmessagescount ),
+ wfMsgHtml( 'newmessagesdifflink' ),
array(),
array( 'diff' => 'cur' ),
array( 'known', 'noclasses' )
* @private
*/
function buildPersonalUrls() {
- global $wgOut, $wgRequest, $wgUser, $wgLang;
+ global $wgOut, $wgRequest;
$title = $wgOut->getTitle();
$pageurl = $title->getLocalURL();
'active' => ( $this->userpageUrlDetails['href'] == $pageurl )
);
$usertalkUrlDetails = $this->makeTalkUrlDetails( $this->userpage );
- if ( $wgUser->getNewtalk() ) {
- # do not show text when we are viewing our
- # own talk page
- if( !$title->equals( $wgUser->getTalkPage() ) ) {
- $newmessagescount = $wgUser->getnewMessagesCount();
- $newtalk = wfMsg( 'word-separator' ) . wfMsg( 'parentheses', $newmessagescount );
-
- # disable caching
- $wgOut->setSquidMaxage( 0 );
- $wgOut->enableClientCache( false );
- }
- else {
- $newtalk = '';
- }
- }
- else {
- $newtalk = '';
- }
$personal_urls['mytalk'] = array(
- 'text' => wfMsg( 'mytalk', $newtalk ),
+ 'text' => wfMsg( 'mytalk' ),
'href' => &$usertalkUrlDetails['href'],
'class' => $usertalkUrlDetails['exists'] ? false : 'new',
'active' => ( $usertalkUrlDetails['href'] == $pageurl )
//@}
static $idCacheByName = array();
-
- public $mNewtalknumber;
/**
* Lightweight constructor for an anonymous user.
} else {
$db = wfGetDB( DB_SLAVE );
}
- $query = $db->select( 'user_newtalk', $field,
+ $ok = $db->selectField( 'user_newtalk', $field,
array( $field => $id ), __METHOD__ );
- $this->mNewtalknumber = $ok = $db->numRows( $query );
- return $ok !== 0;
+ return $ok !== false;
}
/**
$this->invalidateCache();
}
}
-
- /**
- * Return the number of new messages
- * @return \int The number of new messages
- */
- public function getnewMessagesCount() {
- global $wgLang;
- return $wgLang->formatNum( $this->mNewtalknumber );
- }
/**
* Generate a current or new-future timestamp to be stored in the
'cancel' => 'Cancel',
'moredotdotdot' => 'More...',
'mypage' => 'My page',
-'mytalk' => 'My talk$1',
+'mytalk' => 'My talk',
'anontalk' => 'Talk for this IP',
'navigation' => 'Navigation',
'and' => ' and',
'retrievedfrom' => 'Retrieved from "$1"',
'youhavenewmessages' => 'You have $1 ($2).',
'newmessageslink' => 'new messages',
-'newmessagesdifflink' => '{{PLURAL:$1|one change|$1 changes}}',
+'newmessagesdifflink' => 'last change',
'youhavenewmessagesmulti' => 'You have new messages on $1',
'newtalkseparator' => ', ', # do not translate or duplicate this message to other languages
'editsection' => 'edit',