r101551 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101550‎ | r101551 | r101552 >
Date:23:48, 1 November 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
arrray -> array

Whitespace

Other documentation improvements

Comment out some unused code (which has a fixme left with it already)
Modified paths:
  • /trunk/phase3/includes/MWFunction.php (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/mime.types (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedpages.php (modified) (history)
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)
  • /trunk/tools/make-release/make-release (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -456,6 +456,9 @@
457457 }
458458 }
459459
 460+ /**
 461+ * @var $child Maintenance
 462+ */
460463 $child = new $maintClass();
461464 $child->loadParamsAndArgs( $this->mSelf, $this->mOptions, $this->mArgs );
462465 if ( !is_null( $this->mDb ) ) {
Index: trunk/phase3/includes/MWFunction.php
@@ -20,6 +20,11 @@
2121
2222 class MWFunction {
2323
 24+ /**
 25+ * @param $callback
 26+ * @return array
 27+ * @throws MWException
 28+ */
2429 protected static function cleanCallback( $callback ) {
2530 if( is_string( $callback ) ) {
2631 if ( strpos( $callback, '::' ) !== false ) {
@@ -39,6 +44,10 @@
4045 return $callback;
4146 }
4247
 48+ /**
 49+ * @param $callback
 50+ * @return mixed
 51+ */
4352 public static function call( $callback ) {
4453 $callback = self::cleanCallback( $callback );
4554
@@ -47,11 +56,21 @@
4857 return call_user_func_array( 'call_user_func', $args );
4958 }
5059
 60+ /**
 61+ * @param $callback
 62+ * @param $argsarams
 63+ * @return mixed
 64+ */
5165 public static function callArray( $callback, $argsarams ) {
5266 $callback = self::cleanCallback( $callback );
5367 return call_user_func_array( $callback, $argsarams );
5468 }
5569
 70+ /**
 71+ * @param $class
 72+ * @param $args array
 73+ * @return object
 74+ */
5675 public static function newObj( $class, $args = array() ) {
5776 if( !count( $args ) ) {
5877 return new $class;
Index: trunk/phase3/includes/db/Database.php
@@ -3192,6 +3192,8 @@
31933193 /**
31943194 * Get schema variables. If none have been set via setSchemaVars(), then
31953195 * use some defaults from the current object.
 3196+ *
 3197+ * @return array
31963198 */
31973199 protected function getSchemaVars() {
31983200 if ( $this->mSchemaVars ) {
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -153,7 +153,7 @@
154154 $endsortkey = $params['endsortkeyprefix'] !== null ?
155155 Collation::singleton()->getSortkey( $params['endsortkeyprefix'] ) :
156156 $params['endsortkey'];
157 -
 157+
158158 // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
159159 $this->addWhereRange( 'cl_sortkey',
160160 $dir,
Index: trunk/phase3/includes/mime.types
@@ -59,7 +59,7 @@
6060 application/xslt+xml xslt
6161 application/xml xml xsl xsd
6262 application/xml-dtd dtd
63 -application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
 63+application/zip zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw
6464 application/x-rar rar
6565 audio/basic au snd
6666 audio/midi mid midi kar
Index: trunk/phase3/includes/MagicWord.php
@@ -748,7 +748,7 @@
749749 * Returns array(magic word ID, parameter value)
750750 * If there is no parameter value, that element will be false.
751751 *
752 - * @param $m arrray
 752+ * @param $m array
753753 *
754754 * @return array
755755 */
Index: trunk/phase3/includes/specials/SpecialWantedpages.php
@@ -39,10 +39,10 @@
4040 $parts = explode( '/', $par, 2 );
4141 $this->limit = (int)$parts[0];
4242 // @todo FIXME: nlinks is ignored
43 - $nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
 43+ //$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
4444 $this->offset = 0;
4545 } else {
46 - $nlinks = true;
 46+ //$nlinks = true;
4747 }
4848 $this->setListoutput( $inc );
4949 $this->shownavigation = !$inc;
Index: trunk/tools/make-release/make-release
@@ -244,7 +244,7 @@
245245 # Sign
246246 uploadFiles = []
247247 for fileName in outFiles:
248 - proc = subprocess.Popen(['gpg', '--detach-sign', dir+'/'+fileName])
 248+ proc = subprocess.Popen(['gpg', '--detach-sign', dir +' /' + fileName])
249249 if proc.wait() != 0:
250250 print "gpg failed, exiting"
251251 sys.exit(1)

Comments

#Comment by Nikerabbit (talk | contribs)   08:51, 2 November 2011

yarr! I didn't know we too ship our own mime.types list. When was that last updated?

Status & tagging log