r39122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39121‎ | r39122 | r39123 >
Date:09:24, 11 August 2008
Author:minuteelectron
Status:old
Tags:
Comment:
* (bug 15112) Fix three strict standard issues, incompatible function declerations due to incorrect default parameter values.
* Minor whitespace fixes on classes that had these issues.
Modified paths:
  • /trunk/extensions/LiquidThreads/LqtPages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LqtPages.php
@@ -911,20 +911,20 @@
912912
913913 function wfLqtSpecialMoveThreadToAnotherPage() {
914914
915 - class SpecialMoveThreadToAnotherPage extends SpecialPage {
 915+ class SpecialMoveThreadToAnotherPage extends SpecialPage {
916916 private $user, $output, $request, $title, $thread;
917917
918 - function __construct() {
919 - SpecialPage::SpecialPage( 'Movethread' );
920 - $this->includable( false );
921 - }
 918+ function __construct() {
 919+ SpecialPage::SpecialPage( 'Movethread' );
 920+ $this->includable( false );
 921+ }
922922
923 - /**
924 - * @see SpecialPage::getDescription
925 - */
926 - function getDescription() {
927 - return wfMsg( 'lqt_movethread' );
928 - }
 923+ /**
 924+ * @see SpecialPage::getDescription
 925+ */
 926+ function getDescription() {
 927+ return wfMsg( 'lqt_movethread' );
 928+ }
929929
930930 function handleGet() {
931931 $form_action = $this->title->getLocalURL() . '/' . $this->thread->title()->getPrefixedURL();
@@ -1004,7 +1004,7 @@
10051005 '<a href="'.$target_title->getFullURL().'">'.$target_title->getPrefixedText().'</a>'));
10061006 }
10071007
1008 - function execute( $par = null ) {
 1008+ function execute( $par ) {
10091009 global $wgOut, $wgRequest, $wgTitle, $wgUser;
10101010 $this->user = $wgUser;
10111011 $this->output = $wgOut;
@@ -1032,28 +1032,28 @@
10331033 $this->handleGet();
10341034 }
10351035
1036 - }
1037 - }
 1036+ }
 1037+ }
10381038
1039 - SpecialPage::addPage( new SpecialMoveThreadToAnotherPage() );
 1039+ SpecialPage::addPage( new SpecialMoveThreadToAnotherPage() );
10401040 }
10411041
10421042 function wfLqtSpecialDeleteThread() {
10431043
1044 - class SpecialDeleteThread extends SpecialPage {
 1044+ class SpecialDeleteThread extends SpecialPage {
10451045 private $user, $output, $request, $title, $thread;
10461046
1047 - function __construct() {
1048 - SpecialPage::SpecialPage( 'Deletethread' );
1049 - $this->includable( false );
1050 - }
 1047+ function __construct() {
 1048+ SpecialPage::SpecialPage( 'Deletethread' );
 1049+ $this->includable( false );
 1050+ }
10511051
1052 - /**
1053 - * @see SpecialPage::getDescription
1054 - */
1055 - function getDescription() {
1056 - return wfMsg( 'lqt_deletethread' );
1057 - }
 1052+ /**
 1053+ * @see SpecialPage::getDescription
 1054+ */
 1055+ function getDescription() {
 1056+ return wfMsg( 'lqt_deletethread' );
 1057+ }
10581058
10591059 function handleGet() {
10601060 if( !$this->checkUserRights() )
@@ -1134,14 +1134,14 @@
11351135 $this->output->addHTML($message);
11361136 }
11371137
1138 - function execute( $par = null ) {
1139 - global $wgOut, $wgRequest, $wgTitle, $wgUser;
 1138+ function execute( $par ) {
 1139+ global $wgOut, $wgRequest, $wgTitle, $wgUser;
11401140 $this->user = $wgUser;
11411141 $this->output = $wgOut;
11421142 $this->request = $wgRequest;
11431143 $this->title = $wgTitle;
11441144
1145 - $this->setHeaders();
 1145+ $this->setHeaders();
11461146
11471147 if( $par === null || $par === "") {
11481148 $this->output->addHTML(wfMsg('lqt_threadrequired'));
@@ -1162,10 +1162,10 @@
11631163 $this->handleGet();
11641164 }
11651165
1166 - }
1167 - }
 1166+ }
 1167+ }
11681168
1169 - SpecialPage::addPage( new SpecialDeleteThread() );
 1169+ SpecialPage::addPage( new SpecialDeleteThread() );
11701170 }
11711171
11721172 class NewUserMessagesView extends LqtView {
@@ -1303,29 +1303,29 @@
13041304
13051305 function wfLqtSpecialNewMessages() {
13061306
1307 - class SpecialNewMessages extends SpecialPage {
 1307+ class SpecialNewMessages extends SpecialPage {
13081308 private $user, $output, $request, $title;
13091309
1310 - function __construct() {
1311 - SpecialPage::SpecialPage( 'Newmessages' );
1312 - $this->includable( true );
1313 - }
 1310+ function __construct() {
 1311+ SpecialPage::SpecialPage( 'Newmessages' );
 1312+ $this->includable( true );
 1313+ }
13141314
1315 - /**
1316 - * @see SpecialPage::getDescription
1317 - */
1318 - function getDescription() {
1319 - return wfMsg( 'lqt_newmessages' );
1320 - }
 1315+ /**
 1316+ * @see SpecialPage::getDescription
 1317+ */
 1318+ function getDescription() {
 1319+ return wfMsg( 'lqt_newmessages' );
 1320+ }
13211321
1322 - function execute( $par = null ) {
1323 - global $wgOut, $wgRequest, $wgTitle, $wgUser;
 1322+ function execute( $par ) {
 1323+ global $wgOut, $wgRequest, $wgTitle, $wgUser;
13241324 $this->user = $wgUser;
13251325 $this->output = $wgOut;
13261326 $this->request = $wgRequest;
13271327 $this->title = $wgTitle;
13281328
1329 - $this->setHeaders();
 1329+ $this->setHeaders();
13301330
13311331 $view = new NewUserMessagesView( $this->output, new Article($this->title),
13321332 $this->title, $this->user, $this->request );
@@ -1339,10 +1339,11 @@
13401340 $this->output->addHTML('<h2 class="lqt_newmessages_section">Messages on other talkpages:</h2>');
13411341 $view->setThreads( NewMessages::watchedThreadsForUser($this->user) );
13421342 $view->show();
1343 - }
1344 - }
 1343+ }
 1344+ }
13451345
1346 - SpecialPage::addPage( new SpecialNewMessages() );
 1346+ SpecialPage::addPage( new SpecialNewMessages() );
 1347+
13471348 }
13481349
13491350 function wfLqtBeforeWatchlistHook( $options, $user, &$hook_sql ) {

Status & tagging log