From: Rotem Liss Date: Mon, 3 Dec 2007 18:50:53 +0000 (+0000) Subject: In API action=login, make attribute sessionid work if a session ID doesn't exist... X-Git-Tag: 1.31.0-rc.0~50573 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=f117c0f7a6fa49d2ae6d38216575beb982269638;p=lhc%2Fweb%2Fwiklou.git In API action=login, make attribute sessionid work if a session ID doesn't exist yet. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0896f4980f..fd07d25932 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -316,7 +316,8 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API * Add rvtoken=rollback to prop=revisions * Add meta=allmessages to get messages from site's messages cache. * Use bold and italics highlighting only in API help -* Added action={block,changerights,delete,move,protect,rollback,unblock,undelete} and list={blocks,deletedrevs}\ +* Added action={block,changerights,delete,move,protect,rollback,unblock,undelete} and list={blocks,deletedrevs} +* Fixed sessionid attribute in action=login === Languages updated in 1.12 === diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index 7d781240bd..2a47d0a4b7 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -104,7 +104,7 @@ class ApiLogin extends ApiBase { $result['lgusername'] = $_SESSION['wsUserName']; $result['lgtoken'] = $_SESSION['wsToken']; $result['cookieprefix'] = $wgCookiePrefix; - $result['sessionid'] = $_COOKIE["{$wgCookiePrefix}_session"]; + $result['sessionid'] = session_id(); break; case LoginForm :: NO_NAME :