Last modified: 2012-04-12 13:56:04 UTC
I tested on latest release of MW and found out that $wgSitemapNamespaces is not initialized with the value from LocalSettings.php when the script /maintenance/generateSitemaps.php is called from the command line. It is always 'false'.
Not able to reproduce this, $wgSitemapNamespaces works as expected in my wiki. Be sure that you put it after the following line: require_once( "$IP/includes/DefaultSettings.php" );