Fix some places where globals where used without being declared as
authorThomas Bleher <tbleher@users.mediawiki.org>
Thu, 10 Jan 2008 16:51:45 +0000 (16:51 +0000)
committerThomas Bleher <tbleher@users.mediawiki.org>
Thu, 10 Jan 2008 16:51:45 +0000 (16:51 +0000)
being global. Also remove one unused variable.

includes/User.php
includes/api/ApiParse.php

index 00c8981..6734c32 100644 (file)
@@ -1961,6 +1961,7 @@ class User {
         * Logout user.
         */
        function logout() {
+               global $wgUser;
                if( wfRunHooks( 'UserLogout', array(&$this) ) ) {
                        $this->doLogout();
                        wfRunHooks( 'UserLogoutComplete', array(&$wgUser) );
index 39382f3..4e94754 100644 (file)
@@ -42,7 +42,6 @@ class ApiParse extends ApiBase {
                $params = $this->extractRequestParams();
                $text = $params['text'];
                $title = $params['title'];
-               $retval = '';
 
                //Create title for parser
                $title_obj = Title :: newFromText($params['title']);