User "Catrope" changed the status of MediaWiki.r92448.

Old Status: new
New Status: fixme

User "Catrope" also posted a comment on MediaWiki.r92448.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/92448#c19941
Commit summary:

* Added a maintenance script wrapper to find and run the right version of a 
specified script.
* In MWMultiVersion:
** Cleaned up instance handling in MWMultiVersion and made it throw errors for 
things that don't make sense.
** Rewrote setSiteInfoForMaintenance() to use the --wiki param and avoid 
serious "cart before the horse" problems.
** Handle deferred loading of site/lang fields (occurs in cli mode). They can't 
be called until $wgConf is loaded.
** Fixed call to getDatase() in getVersion().
* Moved getSite()/getLang() calls down a bit in CommonSettings.php (below 
$wgConf initialization).
* Refactored getMediaWiki() and added getMediaWikiCli(). Both set $IP now.
* Various code cleanups and comment tweaks.

Comment:

<pre>
+               $argv[0] = $matches[1]; // make first arg the script file name
</pre>
Shouldn't this be something like <code>$argv[0] = $matches[1] . 
$relFile;</code> ?

<pre>
+       require_once( './wmf-config/MWVersion.php' );
</pre>
The dot refers to the current directory, which is completely unreliable. If you 
need paths relative to the location of this script, use <code>dirname( __FILE__ 
)</code> to build the path.


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to