
reedy at svn
Apr 7, 2012, 4:17 PM
Views: 45
Permalink
|
|
SVN: [114796] trunk/extensions/Postcomment/Postcomment.php
|
|
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114796 Revision: 114796 Author: reedy Date: 2012-04-07 23:17:34 +0000 (Sat, 07 Apr 2012) Log Message: ----------- Remove unused globals/variables Tidy up and update some of the code Modified Paths: -------------- trunk/extensions/Postcomment/Postcomment.php Modified: trunk/extensions/Postcomment/Postcomment.php =================================================================== --- trunk/extensions/Postcomment/Postcomment.php 2012-04-07 19:18:08 UTC (rev 114795) +++ trunk/extensions/Postcomment/Postcomment.php 2012-04-07 23:17:34 UTC (rev 114796) @@ -35,15 +35,9 @@ } function execute( $par ) { - global $wgUser, $wgOut, $wgLang, $wgMemc, $wgDBname; - global $wgRequest, $wgSitename, $wgLanguageCode; - global $wgFilterCallback, $wgWhitelistEdit; + global $wgUser, $wgOut, $wgLang, $wgRequest; + global $wgFilterCallback; - //echo "topic: " . $wgRequest->getVal("topic_name") . "<br />"; - //echo "title: " . $wgRequest->getVal("title") . "<br />"; - //echo "comment: " . $wgRequest->getVal("comment_text") . "<br />"; - //echo "new_topic id " . $wgRequest->getVal("new_topic") . "<br />"; - if ( wfReadOnly() ) { $wgOut->readOnlyPage(); return; @@ -71,7 +65,6 @@ $update = $article->exists(); $comment = $wgRequest->getVal( 'comment_text' ); - $topic = $wgRequest->getVal( 'topic_name' ); if ( trim( $comment ) == '' ) { $wgOut->showErrorPage( 'postcomment', 'postcomment_nopostingtoadd' ); @@ -116,6 +109,11 @@ } } +/** + * @param $data array + * @param $sk Skin + * @return bool + */ function wfPostcommentForm( &$data, $sk ) { global $wgUser, $wgRequest; @@ -132,11 +130,10 @@ return true; } - $user_str = ''; if ($wgUser->getID() == 0) { $user_str = wfMsg( 'postcomment_notloggedin' ); } else { - $link = $sk->makeLinkObj( $wgUser->getUserPage(), htmlspecialchars($wgUser->getName()) ); + $link = Linker::makeLinkObj( $wgUser->getUserPage(), htmlspecialchars($wgUser->getName()) ); $user_str = wfMsg( 'postcomment_youareloggedinas', $link ); } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS [at] lists https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|