Fix case of some Title methods
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 016736f..9042926 100644 (file)
@@ -3338,7 +3338,7 @@ function wfCheckEntropy() {
  */
 function wfFixSessionID() {
        // If the cookie or session id is already set we already have a session and should abort
-       if ( isset( $_COOKIE[ session_name() ] ) || session_id() ) {
+       if ( isset( $_COOKIE[session_name()] ) || session_id() ) {
                return;
        }
 
@@ -3655,7 +3655,7 @@ function wfWaitForSlaves( $maxLag = false, $wiki = false ) {
        // bug 27975 - Don't try to wait for slaves if there are none
        // Prevents permission error when getting master position
        if ( $lb->getServerCount() > 1 ) {
-               $dbw = $lb->getConnection( DB_MASTER );
+               $dbw = $lb->getConnection( DB_MASTER, array(), $wiki );
                $pos = $dbw->getMasterPos();
                $lb->waitForAll( $pos );
        }
@@ -3940,7 +3940,7 @@ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) {
        # Handle redirects
        $redirectTitle = RepoGroup::singleton()->checkRedirect( Title::makeTitle( NS_FILE, $name ) );
        if( $redirectTitle ) {
-               $name = $redirectTitle->getDbKey();
+               $name = $redirectTitle->getDBkey();
        }
 
        # Run the extension hook