r25457 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25456‎ | r25457 | r25458 >
Date:20:17, 3 September 2007
Author:catrope
Status:old
Tags:
Comment:
(bug 10898) API does not return an edit token for non-existent pages
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -134,6 +134,16 @@
135135 'pages'
136136 ), $pageid, $pageInfo);
137137 }
 138+
 139+ // Get edit tokens for missing titles if requested
 140+ // Delete, protect and move tokens are N/A for missing titles anyway
 141+ if($tok_edit)
 142+ {
 143+ $missing = $pageSet->getMissingTitles();
 144+ $res = $result->getData();
 145+ foreach($missing as $pageid => $title)
 146+ $res['query']['pages'][$pageid]['edittoken'] = $wgUser->editToken();
 147+ }
138148 }
139149
140150 protected function getAllowedParams() {
Index: trunk/phase3/RELEASE-NOTES
@@ -496,6 +496,7 @@
497497 * Added meta=userinfo - logged-in user information, group membership, rights
498498 * (bug 11072) Fix regression in API image history query
499499 * (bug 11115) Adding SHA1 hash to imageinfo query
 500+* (bug 10898) API does not return an edit token for non-existent pages
500501
501502 == Maintenance script changes since 1.10 ==
502503

Follow-up revisions

RevisionCommit summaryAuthorDate
r25458apiedit: Fixing bug 10898 the dirty way, will clean up QueryInfo later.catrope20:19, 3 September 2007
r25530Merged revisions 25454-25529 via svnmerge from...david08:28, 5 September 2007
r25581API: Really fixing bug 10898 this timecatrope11:28, 6 September 2007
r25607Merged revisions 25530-25606 via svnmerge from...david06:11, 7 September 2007

Status & tagging log