Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -88,24 +88,11 @@ |
89 | 89 | * @param $enableWrite bool should be set to true if the api may modify data |
90 | 90 | */ |
91 | 91 | public function __construct($request, $enableWrite = false) { |
92 | | - global $wgRequest, $wgUser; |
93 | 92 | |
94 | 93 | $this->mInternalMode = ($request instanceof FauxRequest); |
95 | 94 | |
96 | 95 | // Special handling for the main module: $parent === $this |
97 | 96 | parent :: __construct($this, $this->mInternalMode ? 'main_int' : 'main'); |
98 | | - |
99 | | - // Check if request has cookie-like variables, and set them |
100 | | - if( ($request->getVal('lgtoken')) && ($request->getVal('lgusername')) && ($request->getVal('lguserid')) ) { |
101 | | - |
102 | | - // Got variables, set cookies. |
103 | | - $_SESSION['wsUserID'] = $request->getVal('lguserid'); |
104 | | - $_SESSION['wsUserName'] = $request->getVal('lgusername'); |
105 | | - $_SESSION['wsToken'] = $request->getVal('lgtoken'); |
106 | | - |
107 | | - // Reinitialize $wgUser from session data |
108 | | - $wgUser = User::newFromSession(); |
109 | | - } |
110 | 97 | |
111 | 98 | if (!$this->mInternalMode) { |
112 | 99 | |
Index: trunk/phase3/includes/api/ApiLogin.php |
— | — | @@ -104,6 +104,7 @@ |
105 | 105 | $result['lgusername'] = $_SESSION['wsUserName']; |
106 | 106 | $result['lgtoken'] = $_SESSION['wsToken']; |
107 | 107 | $result['cookieprefix'] = $wgCookiePrefix; |
| 108 | + $result['sessionid'] = $_COOKIE["{$wgCookiePrefix}_session"]; |
108 | 109 | break; |
109 | 110 | |
110 | 111 | case LoginForm :: NO_NAME : |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -181,7 +181,6 @@ |
182 | 182 | * (bug 11721) Use a different title for results than for the help page. |
183 | 183 | * (bug 11562) Added a user_registration parameter/field to the list=allusers query. |
184 | 184 | * (bug 11588) Preserve document structure for empty dataset in backlinks query. |
185 | | -* Allow staying logged in through lg* parameters instead of cookies |
186 | 185 | * Outputting list of all user preferences rather than having to request them by name |
187 | 186 | |
188 | 187 | === Languages updated in 1.12 === |