* (bug 44719) Removed mention of non-existing maintenance/migrateCurStubs.php
script in includes/DefaultSettings.php
* (bug 45143) jquery.badge: Treat non-Latin variants of zero as zero as well.
+* (bug 46151) mwdocgen.php should not ignore exit code of doxygen command.
=== API changes in 1.21 ===
* prop=revisions can now report the contentmodel and contentformat.
/**
* wgConf hold the site configuration.
* Not used for much in a default install.
+ * @since 1.5
*/
$wgConf = new SiteConfiguration;
-/** MediaWiki version number */
+/**
+ * MediaWiki version number
+ * @since 1.2
+ */
$wgVersion = '1.21alpha';
-/** Name of the site. It must be changed in LocalSettings.php */
+/**
+ * Name of the site. It must be changed in LocalSettings.php
+ */
$wgSitename = 'MediaWiki';
/**
* Must be fully qualified, even if $wgServer is protocol-relative.
*
* Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
+ * @since 1.18
*/
$wgCanonicalServer = false;
* The default $wgArticlePath will be set based on this value at runtime, but if
* you have customized it, having this incorrectly set to true can cause
* redirect loops when "pretty URLs" are used.
+ * @since 1.2.1
*/
$wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
*
* Some hosting providers use PHP 4 for *.php files, and PHP 5 for *.php5. This
* variable is provided to support those providers.
+ * @since 1.11
*/
$wgScriptExtension = '.php';
* The URL path to load.php.
*
* Defaults to "{$wgScriptPath}/load{$wgScriptExtension}".
+ * @since 1.17
*/
$wgLoadScript = false;
/**
* The URL path of the skins directory.
* Defaults to "{$wgScriptPath}/skins".
+ * @since 1.3
*/
$wgStylePath = false;
$wgStyleSheetPath = &$wgStylePath;
/**
* The URL path of the skins directory. Should not point to an external domain.
* Defaults to "{$wgScriptPath}/skins".
+ * @since 1.17
*/
$wgLocalStylePath = false;
/**
* Filesystem stylesheets directory.
* Defaults to "{$IP}/skins".
+ * @since 1.3
*/
$wgStyleDirectory = false;
/**
* The URL path of the shortcut icon.
+ * @since 1.6
*/
$wgFavicon = '/favicon.ico';
/**
* The URL path of the icon for iPhone and iPod Touch web app bookmarks.
* Defaults to no icon.
+ * @since 1.12
*/
$wgAppleTouchIcon = false;
/**
* If set, this URL is added to the start of $wgUploadPath to form a complete
* upload URL.
+ * @since 1.4
*/
$wgUploadBaseUrl = '';
* Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
* where 'e6' are the first two characters of the MD5 hash of the file name.
* If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
+ * @since 1.17
*/
$wgUploadStashScalerBaseUrl = false;
*
* There must be an appropriate script or rewrite rule in place to handle these
* URLs.
+ * @since 1.5
*/
$wgActionPaths = array();
$where[] = 'cache is empty';
$where[] = 'loading from database';
- $this->lock( $cacheKey );
+ if ( $this->lock( $cacheKey ) ) {
+ $that = $this;
+ $osc = new ScopedCallback( function() use ( $that, $cacheKey ) {
+ $that->unlock( $cacheKey );
+ } );
+ }
# Limit the concurrency of loadFromDB to a single process
# This prevents the site from going down when the cache expires
$statusKey = wfMemcKey( 'messages', $code, 'status' );
$success = $this->mMemc->add( $statusKey, 'loading', MSG_LOAD_TIMEOUT );
if ( $success ) { // acquired lock
+ $cache = $this->mMemc;
+ $isc = new ScopedCallback( function() use ( $cache, $statusKey ) {
+ $cache->delete( $statusKey );
+ } );
$cache = $this->loadFromDB( $code );
$success = $this->setCache( $cache, $code );
if ( $success ) { // messages loaded
$success = $this->saveToCaches( $cache, true, $code );
- if ( $success ) {
- $this->mMemc->delete( $statusKey );
- } else {
+ $isc = null; // unlock
+ if ( !$success ) {
$this->mMemc->set( $statusKey, 'error', 60 * 5 );
wfDebug( __METHOD__ . ": set() error: restart memcached server!\n" );
$exception = new MWException( "Could not save cache for '$code'." );
}
} else {
- $this->mMemc->delete( $statusKey );
+ $isc = null; // unlock
$exception = new MWException( "Could not load cache from DB for '$code'." );
}
} else {
$exception = new MWException( "Could not acquire '$statusKey' lock." );
}
- $this->unlock( $cacheKey );
+ $osc = null; // unlock
}
if ( !$success ) {
$conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0'; // don't show hidden names
}
$conds[] = 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' );
- $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 ) );
+ $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes(
+ $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 ) );
if( $this->requestedUser != '' ) {
$conds[] = 'rc_user_text >= ' . $dbr->addQuotes( $this->requestedUser );
}
- $query = array(
- 'tables' => array( 'recentchanges', 'user', 'ipblocks' ),
- 'fields' => array( 'user_name' => 'rc_user_text', // inheritance
+ return array(
+ 'tables' => array( 'recentchanges', 'ipblocks' ),
+ 'fields' => array(
+ 'user_name' => 'rc_user_text', // for Pager inheritance
'rc_user_text', // for Pager
- 'user_id',
+ 'user_id' => 'rc_user',
'recentedits' => 'COUNT(*)',
'ipb_deleted' => 'MAX(ipb_deleted)'
),
'GROUP BY' => array( 'rc_user_text', 'user_id' ),
'USE INDEX' => array( 'recentchanges' => 'rc_user_text' )
),
- 'join_conds' => array(
- 'user' => array( 'INNER JOIN', 'rc_user_text=user_name' ),
+ 'join_conds' => array( // check for suppression blocks
'ipblocks' => array( 'LEFT JOIN', array(
- 'user_id=ipb_user',
- 'ipb_auto' => 0
+ 'rc_user=ipb_user',
+ 'ipb_auto' => 0 # avoid duplicate blocks
)),
),
'conds' => $conds
);
- return $query;
}
function formatRow( $row ) {
*
* @return UploadStashFile stashed file
*/
- public function stashFile() {
+ public function stashFile( User $user = null ) {
// Stash file is the called on creating a new chunk session:
$this->mChunkIndex = 0;
$this->mOffset = 0;
/** where Phpdoc should output documentation */
$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ;
+$doxyVersion = 'master';
+
/** MediaWiki subpaths */
$mwPathI = $mwPath . 'includes/';
$mwPathL = $mwPath . 'languages/';
$doxyOutput = realpath( $argv[$i] );
}
break;
+ case '--version':
+ $i++;
+ if ( isset( $argv[$i] ) ) {
+ $doxyVersion = $argv[$i];
+ }
+ break;
case '--generate-man':
$doxyGenerateMan = true;
break;
If no command is given, you will be prompted.
Other options:
- --output <dir> Set output directory (default $doxyOutput)
+ --output <dir> Set output directory (default: $doxyOutput)
--generate-man Generates man page documentation
+ --version Project version to display in the outut (default: $doxyVersion)
--help Show this help and exit.
$excludePatterns = 'extensions';
}
-// @todo FIXME to work on git
-$version = 'master';
-
// Generate path exclusions
$excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths );
print "EXCLUDE: $excludedPaths\n\n";
-$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter );
+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter );
$command = $doxygenBin . ' ' . $generatedConf;
echo <<<TEXT
TEXT;
-passthru( $command );
+$exitcode = 1;
+passthru( $command, $exitcode );
echo <<<TEXT
---------------------------------------------------
You might want to delete the temporary file $generatedConf
TEXT;
+
+exit( $exitcode );