From 832131ce73d5a08f527a17a5db4ee25cf4ce202f Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 27 Jun 2008 20:35:43 +0000 Subject: [PATCH] Added clprop=timestamp to prop=categories --- RELEASE-NOTES | 1 + includes/api/ApiQueryCategories.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 87cb4b576a..0b0d8d2c54 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -476,6 +476,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14402) Added maxage and smaxage parameters to api.php * Added bkip parameter to list=blocks * (bug 14651) apprefix and similar parameters are now canonicalized +* Added clprop=timestamp to prop=categories === Languages updated in 1.13 === diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 2fd4eb48b9..e45e0f68ab 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -60,7 +60,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { 'cl_to' )); - $fld_sortkey = false; + $fld_sortkey = $fld_timestamp = false; if (!is_null($prop)) { foreach($prop as $p) { switch ($p) { @@ -68,6 +68,10 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { $this->addFields('cl_sortkey'); $fld_sortkey = true; break; + case 'timestamp': + $this->addFields('cl_timestamp'); + $fld_timestamp = true; + break; default : ApiBase :: dieDebug(__METHOD__, "Unknown prop=$p"); } @@ -100,6 +104,8 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { ApiQueryBase :: addTitleInfo($vals, $title); if ($fld_sortkey) $vals['sortkey'] = $row->cl_sortkey; + if ($fld_timestamp) + $vals['timestamp'] = $row->cl_timestamp; $data[] = $vals; } @@ -126,6 +132,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { ApiBase :: PARAM_ISMULTI => true, ApiBase :: PARAM_TYPE => array ( 'sortkey', + 'timestamp', ) ) ); -- 2.20.1