(bug 43467) Add invert selection for ns in Special:Newpages
[lhc/web/wiklou.git] / includes / ForkController.php
index 448bc03..89ad955 100644 (file)
@@ -53,7 +53,7 @@ class ForkController {
        const RESTART_ON_ERROR = 1;
 
        public function __construct( $numProcs, $flags = 0 ) {
-               if ( php_sapi_name() != 'cli' ) {
+               if ( PHP_SAPI != 'cli' ) {
                        throw new MWException( "ForkController cannot be used from the web." );
                }
                $this->procsToStart = $numProcs;
@@ -140,7 +140,7 @@ class ForkController {
                // Don't share DB, storage, or memcached connections
                wfGetLBFactory()->destroyInstance();
                FileBackendGroup::destroySingleton();
-               LockManagerGroup::destroySingleton();
+               LockManagerGroup::destroySingletons();
                ObjectCache::clear();
                $wgMemc = null;
        }