Merge "Set $wgNoFollowLinks to false iff "Authorized editors only" selected"
[lhc/web/wiklou.git] / maintenance / locking / LockServerDaemon.php
index 4358989..d98654e 100644 (file)
@@ -23,7 +23,7 @@
  * @ingroup LockManager Maintenance
  */
 
-if ( php_sapi_name() !== 'cli' ) {
+if ( PHP_SAPI !== 'cli' ) {
        die( "This is not a valid entry point.\n" );
 }
 error_reporting( E_ALL );
@@ -79,9 +79,9 @@ class LockServerDaemon {
                foreach ( array( 'address', 'port', 'authKey' ) as $par ) {
                        if ( !isset( $config[$par] ) ) {
                                die( "Usage: php LockServerDaemon.php " .
-                                       "--address <address> --port <port> --authkey <key> " .
+                                       "--address <address> --port <port> --authKey <key> " .
                                        "[--lockTimeout <seconds>] " .
-                                       "[--maxLocks <integer>] [--maxClients <integer>] [--maxBacklog <integer>]"
+                                       "[--maxLocks <integer>] [--maxClients <integer>] [--maxBacklog <integer>]\n"
                                );
                        }
                }
@@ -149,7 +149,7 @@ class LockServerDaemon {
                $socketArray->addSocket( $this->sock ); // add listening socket
                do {
                        list( $read, $write ) = $socketArray->socketsForSelect();
-                       if ( socket_select( $read, $write, $except = NULL, NULL ) < 1 ) {
+                       if ( socket_select( $read, $write, $except = null, null ) < 1 ) {
                                continue; // wait
                        }
                        // Check if there is a client trying to connect...