r25458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25457‎ | r25458 | r25459 >
Date:20:19, 3 September 2007
Author:catrope
Status:old
Tags:
Comment:
apiedit: Fixing bug 10898 the dirty way, will clean up QueryInfo later.
Modified paths:
  • /branches/apiedit/phase3/CHANGED (modified) (history)
  • /branches/apiedit/phase3/includes/api/ApiQueryInfo.php (modified) (history)

Diff [purge]

Index: branches/apiedit/phase3/CHANGED
@@ -20,7 +20,7 @@
2121
2222 api/ApiQueryInfo.php
2323 * Implemented tokens (r23562, r23568,r23638, r23668)
24 -* Added lastrevby field (r23562)
 24+* Fixed bug 10898 (r24458)
2525
2626 api/ApiRollback.php (NEW)
2727 * action=rollback module that wraps around Article::doRollback() (r23562)
Index: branches/apiedit/phase3/includes/api/ApiQueryInfo.php
@@ -158,6 +158,17 @@
159159 'pages'
160160 ), $pageid, $pageInfo);
161161 }
 162+
 163+ // Get edit tokens for missing titles if requested
 164+ // Delete, protect and move tokens are N/A for missing titles anyway
 165+ if(isset($params['tokens']['edit']))
 166+ {
 167+ $missing = $pageSet->getMissingTitles();
 168+ $res = $result->getData();
 169+ foreach($missing as $pageid => $title)
 170+ $res['query']['pages'][$pageid]['tokens']['edit'] = $wgUser->editToken();
 171+ }
 172+
162173 }
163174
164175 protected function getAllowedParams() {

Follow-up revisions

RevisionCommit summaryAuthorDate
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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r25457(bug 10898) API does not return an edit token for non-existent pagescatrope20:17, 3 September 2007

Status & tagging log