r36761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36760‎ | r36761 | r36762 >
Date:20:35, 27 June 2008
Author:btongminh
Status:old
Tags:
Comment:
Added clprop=timestamp to prop=categories
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -60,7 +60,7 @@
6161 'cl_to'
6262 ));
6363
64 - $fld_sortkey = false;
 64+ $fld_sortkey = $fld_timestamp = false;
6565 if (!is_null($prop)) {
6666 foreach($prop as $p) {
6767 switch ($p) {
@@ -68,6 +68,10 @@
6969 $this->addFields('cl_sortkey');
7070 $fld_sortkey = true;
7171 break;
 72+ case 'timestamp':
 73+ $this->addFields('cl_timestamp');
 74+ $fld_timestamp = true;
 75+ break;
7276 default :
7377 ApiBase :: dieDebug(__METHOD__, "Unknown prop=$p");
7478 }
@@ -100,6 +104,8 @@
101105 ApiQueryBase :: addTitleInfo($vals, $title);
102106 if ($fld_sortkey)
103107 $vals['sortkey'] = $row->cl_sortkey;
 108+ if ($fld_timestamp)
 109+ $vals['timestamp'] = $row->cl_timestamp;
104110
105111 $data[] = $vals;
106112 }
@@ -126,6 +132,7 @@
127133 ApiBase :: PARAM_ISMULTI => true,
128134 ApiBase :: PARAM_TYPE => array (
129135 'sortkey',
 136+ 'timestamp',
130137 )
131138 )
132139 );
Index: trunk/phase3/RELEASE-NOTES
@@ -476,6 +476,7 @@
477477 * (bug 14402) Added maxage and smaxage parameters to api.php
478478 * Added bkip parameter to list=blocks
479479 * (bug 14651) apprefix and similar parameters are now canonicalized
 480+* Added clprop=timestamp to prop=categories
480481
481482 === Languages updated in 1.13 ===
482483

Status & tagging log