r69757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69756‎ | r69757 | r69758 >
Date:21:55, 22 July 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Remove various unused parameters

Only comment them out in ApiFormatYaml_spyc.php
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatYaml_spyc.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuery.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBacklinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBacklinks.php
@@ -38,7 +38,7 @@
3939 */
4040 class ApiQueryBacklinks extends ApiQueryGeneratorBase {
4141
42 - private $params, $rootTitle, $contRedirs, $contLevel, $contTitle, $contID, $redirID, $redirect;
 42+ private $params, $rootTitle, $contID, $redirID, $redirect;
4343 private $bl_ns, $bl_from, $bl_table, $bl_code, $bl_title, $bl_sort, $bl_fields, $hasNS;
4444 private $pageMap, $resultArr;
4545
Index: trunk/phase3/includes/api/ApiQuery.php
@@ -43,7 +43,7 @@
4444
4545 private $mPropModuleNames, $mListModuleNames, $mMetaModuleNames;
4646 private $mPageSet;
47 - private $params, $redirect;
 47+ private $params;
4848
4949 private $mQueryPropModules = array(
5050 'info' => 'ApiQueryInfo',
Index: trunk/phase3/includes/api/ApiFormatYaml_spyc.php
@@ -91,12 +91,14 @@
9292
9393 /**** Private Properties ****/
9494
 95+ /**
9596 private $_haveRefs;
9697 private $_allNodes;
9798 private $_lastIndent;
9899 private $_lastNode;
99100 private $_inBlock;
100101 private $_isInline;
 102+ **/
101103 private $_dumpIndent;
102104 private $_dumpWordWrap;
103105
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -39,7 +39,7 @@
4040 parent::__construct( $query, $moduleName, 'uc' );
4141 }
4242
43 - private $params, $username;
 43+ private $params;
4444 private $fld_ids = false, $fld_title = false, $fld_timestamp = false,
4545 $fld_comment = false, $fld_parsedcomment = false, $fld_flags = false,
4646 $fld_patrolled = false, $fld_tags = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r69778Minor comment improvement to r69757reedy07:38, 23 July 2010

Comments

#Comment by Catrope (talk | contribs)   07:28, 23 July 2010
+	/**
 	private $_haveRefs;
 	private $_allNodes;
 	private $_lastIndent;
 	private $_lastNode;
 	private $_inBlock;
 	private $_isInline;
+	**/

Could use a more verbose comment explaining how these are unused but commented out because you don't wanna mess with the library too much (presumably that's the reason). They may have become unused when Tim removed large portions of the Spyc code in r42547.

#Comment by Reedy (talk | contribs)   07:37, 23 July 2010

Exactly. As it isn't directly our code, and I knew it'd been altered by Tim, I didn't want to just blanket remove them. Minor improvement coming

Status & tagging log