r73894 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73893‎ | r73894 | r73895 >
Date:15:19, 28 September 2010
Author:jimbojw
Status:deferred
Tags:
Comment:
Import of ArticleComments v0.1 by Jim R. Wilson from http://jimbojw.com/wiki/index.php?title=ArticleComments&oldid=1564
Modified paths:
  • /trunk/extensions/ArticleComments/ArticleComments.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleComments/ArticleComments.php
@@ -156,6 +156,9 @@
157157 $wgMessageCache->addMessage('article-comments-talk-page-starter', "<noinclude>Comments on [[$1]]\n<comments />\n----- __NOEDITSECTION__</noinclude>\n");
158158 $wgMessageCache->addMessage('article-comments-commenter-said', '$1 said ...');
159159 $wgMessageCache->addMessage('article-comments-summary', 'Comment provided by $1 - via ArticleComments extension');
 160+ $wgMessageCache->addMessage('article-comments-submission-succeeded', 'Comment submission succeeded');
 161+ $wgMessageCache->addMessage('article-comments-submission-success', 'You have successfully submitted a comment for [[$1]]');
 162+ $wgMessageCache->addMessage('article-comments-submission-view-all', 'You may view all comments on that article [[$1|here]]');
160163 $wgMessageCache->addMessage('processcomment', 'Process Article Comment');
161164 }
162165
@@ -240,7 +243,8 @@
241244 # Determine signature components
242245 $d = $wgContLang->timeanddate( date( 'YmdHis' ), false, false) . ' (' . date( 'T' ) . ')';
243246 if ($commenterURL) $sigText = "[$commenterURL $commenterName]";
244 - else $sigText = $wgParser->getUserSig( $wgUser );
 247+ else if ($wgUser->isLoggedIn()) $sigText = $wgParser->getUserSig( $wgUser );
 248+ else $sigText = $commenterName;
245249
246250 # Append most recent comment
247251 $talkContent .= "\n== ".wfMsgForContent($ac.'commenter-said', $commenterName)." ==\n\n";
@@ -259,9 +263,9 @@
260264 return;
261265 }
262266
263 - $wgOut->setPageTitle("Comment Submission Success!");
264 - $wgOut->addWikiText("You have successfully commented on [[".$title->getPrefixedText()."]].\n\n");
265 - $wgOut->addWikiText("You may view all comments on that article [[".$talkTitle->getPrefixedText()."|here]]");
 267+ $wgOut->setPageTitle(wfMsgForContent($ac.'submission-succeeded'));
 268+ $wgOut->addWikiText(wfMsgForContent($ac.'submission-success', $title->getPrefixedText()));
 269+ $wgOut->addWikiText(wfMsgForContent($ac.'submission-view-all', $talkTitle->getPrefixedText()));
266270 }
267271
268272 //</source>

Status & tagging log