MediaWiki r33473 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r33472‎ | r33473 (on ViewVC)‎ | r33474 >
Date:12:58, 17 April 2008
Author:catrope
Status:old
Tags:
Comment:
(bug 13768) Handling case-insensitivity of pt_title in prop=info
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -116,7 +116,8 @@
117117 $res = $this->select(__METHOD__);
118118 $prottitles = array();
119119 while($row = $db->fetchObject($res)) {
120 - $prottitles[$row->pt_namespace][$row->pt_title] = array(
 120+ // Argh, pt_title is case-insensitive
 121+ $prottitles[$row->pt_namespace][strtolower($row->pt_title)] = array(
121122 'type' => 'create',
122123 'level' => $row->pt_create_perm,
123124 'expiry' => Block::decodeExpiry($row->pt_expiry, TS_ISO_8601)
@@ -249,8 +250,8 @@
250251 {
251252 // Apparently the XML formatting code doesn't like array(null)
252253 // This is painful to fix, so we'll just work around it
253 - if(isset($prottitles[$title->getNamespace()][$title->getDBkey()]))
254 - $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][$title->getDBkey()];
 254+ if(isset($prottitles[$title->getNamespace()][strtolower($title->getDBkey())]))
 255+ $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][strtolower($title->getDBkey())];
255256 else
256257 $res['query']['pages'][$pageid]['protection'] = array();
257258 $result->setIndexedTagName($res['query']['pages'][$pageid]['protection'], 'pr');
Index: trunk/phase3/RELEASE-NOTES
@@ -238,6 +238,7 @@
239239 * (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions
240240 * (bug 13718) Return the proper continue parameter for cmsort=timestamp
241241 * action=login now returns the correct waiting time in the details property
 242+* (bug 13768) inprop=protection now honors case-insensitivity for protected titles
242243
243244 === Languages updated in 1.13 ===
244245

Follow-up revisions

Rev.Commit summaryAuthorDate
r33508* (bug 13768) pt_title field encoding fixed...brion19:11, 17 April 2008

Status & tagging log

  • 15:26, 12 September 2011 Meno25 (talk | contribs) changed the status of r33473 [removed: ok added: old]