* The "noautoblock" flag is no longer displayed in the block log when blocking
an IP address
* (bug 18009) $wgHooks and $wgExtensionFunctions now support closures
+* (bug 17948) Maintenance scripts now exit(0) or exit(1) as appropriate
== API changes in 1.15 ==
* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
print "It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
not maintained and probably won't even work as is.";
-exit();
+exit(1);
# Convert watchlists to new format
require_once( 'deleteOrphanedRevisions.inc.php' );
echo( "Delete Orphaned Revisions\n" );
-if( isset( $options['help'] ) )
+if( isset( $options['help'] ) ) {
showUsage();
+ exit(1);
+}
$report = isset( $options['report'] );
# Nothing to do?
if( $report || $count == 0 ) {
$dbw->immediateCommit();
- exit();
+ exit(0);
}
# Delete each revision
if (curl_error($ch)) {
trigger_error("Curl error #: " . curl_errno($ch) . " - " . curl_error ($ch) );
print "Curl error #: " . curl_errno($ch) . " - " . curl_error ($ch) . " - exiting.\n";
- exit();
+ exit(1);
}
curl_close ($ch);
showUsage();
}
-exit();
+exit(0);
function showUsage( $reason = false ) {
if( $reason ) {
--unprotect Unprotects all uploaded images
END;
- exit();
+ exit(1);
}
\ No newline at end of file
if( isset( $options['help'] ) ) {
showHelp();
- exit();
+ exit(1);
}
require "$IP/maintenance/initStats.inc";
public function __construct( Array $options ) {
if ( isset( $options['help'] ) ) {
echo $this->help();
- exit();
+ exit(1);
}
if ( isset( $options['lang'] ) ) {
public function __construct( Array $options, $extension ) {
if ( isset( $options['help'] ) ) {
echo $this->help();
- exit();
+ exit(1);
}
if ( isset( $options['lang'] ) ) {
* remove-unknown: Remove unknown messages.
END;
- exit();
+ exit(1);
}
# Get the language code
Example: php maintenance/transstat.php --output=text
END;
- exit();
+ exit(1);
}
refreshLinks( 1 );
print "Done.\n";
-exit();
+exit(0);
rebuildRecentChangesTable();
print "Done.\n";
-exit();
+exit(0);
$database = wfGetDB( DB_MASTER );
if( !$database instanceof DatabaseMysql ) {
print "This script is only for MySQL.\n";
- exit();
+ exit(1);
}
$wgTitle = Title::newFromText( "Rebuild text index script" );
createTextIndex( $database );
print "Done.\n";
-exit();
+exit(0);
if( isset( $options['help'] ) ) {
showHelp();
- exit();
+ exit(1);
}
# Do an initial scan for inactive accounts and report the result
print "Done.\n";
}
-exit();
+exit(0);
echo( "No superuser credentials could be found. Please provide the details\n" );
echo( "of a user with appropriate permissions to update the database. See\n" );
echo( "AdminSettings.sample for more details.\n\n" );
- exit();
+ exit(1);
}
# Attempt to connect to the database as a privileged user
# Appears to have failed
echo( "A connection to the database could not be established. Check the\n" );
echo( "values of \$wgDBadminuser and \$wgDBadminpassword.\n" );
- exit();
+ exit(1);
}
print "Going to run database updates for ".wfWikiID()."\n";