diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 10:05:59 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 10:05:59 +0200 |
commit | 00ab76a6b686e98a914afc1975812d2b1aaa7016 (patch) | |
tree | 0509bcf2b8a30056833a289e3717b55bdb189835 /includes/api/ApiQueryInfo.php | |
parent | a5be612e4169e11b51647cbaa2abc976de00d671 (diff) |
update to MediaWiki 1.15.5
Diffstat (limited to 'includes/api/ApiQueryInfo.php')
-rw-r--r-- | includes/api/ApiQueryInfo.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index b7affabc..f78450b7 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -499,6 +499,26 @@ class ApiQueryInfo extends ApiQueryBase { } } + public function getCacheMode( $params ) { + $publicProps = array( + 'protection', + 'talkid', + 'subjectid', + 'url', + ); + if ( !is_null( $params['prop'] ) ) { + foreach ( $params['prop'] as $prop ) { + if ( !in_array( $prop, $publicProps ) ) { + return 'private'; + } + } + } + if ( !is_null( $params['token'] ) ) { + return 'private'; + } + return 'public'; + } + public function getAllowedParams() { return array ( 'prop' => array ( @@ -509,7 +529,9 @@ class ApiQueryInfo extends ApiQueryBase { 'talkid', 'subjectid', 'url', - 'readable', + 'readable', # private + // If you add more properties here, please consider whether they + // need to be added to getCacheMode() )), 'token' => array ( ApiBase :: PARAM_DFLT => NULL, @@ -545,6 +567,6 @@ class ApiQueryInfo extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryInfo.php 48488 2009-03-17 15:18:26Z catrope $'; + return __CLASS__ . ': $Id: ApiQueryInfo.php 69986 2010-07-27 03:57:39Z tstarling $'; } } |