summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryProtectedTitles.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /includes/api/ApiQueryProtectedTitles.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/api/ApiQueryProtectedTitles.php')
-rw-r--r--includes/api/ApiQueryProtectedTitles.php38
1 files changed, 36 insertions, 2 deletions
diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php
index 44cc1d32..14aed28d 100644
--- a/includes/api/ApiQueryProtectedTitles.php
+++ b/includes/api/ApiQueryProtectedTitles.php
@@ -4,7 +4,7 @@
*
* Created on Feb 13, 2009
*
- * Copyright © 2009 Roan Kattouw <Firstname>.<Lastname>@gmail.com
+ * Copyright © 2009 Roan Kattouw "<Firstname>.<Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -139,7 +139,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
public function getCacheMode( $params ) {
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
- // formatComment() calls wfMsg() among other things
+ // formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
} else {
return 'public';
@@ -214,6 +214,40 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
);
}
+ public function getResultProperties() {
+ global $wgRestrictionLevels;
+ return array(
+ '' => array(
+ 'ns' => 'namespace',
+ 'title' => 'string'
+ ),
+ 'timestamp' => array(
+ 'timestamp' => 'timestamp'
+ ),
+ 'user' => array(
+ 'user' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'userid' => 'integer'
+ ),
+ 'comment' => array(
+ 'comment' => 'string'
+ ),
+ 'parsedcomment' => array(
+ 'parsedcomment' => 'string'
+ ),
+ 'expiry' => array(
+ 'expiry' => 'timestamp'
+ ),
+ 'level' => array(
+ 'level' => array(
+ ApiBase::PROP_TYPE => array_diff( $wgRestrictionLevels, array( '' ) )
+ )
+ )
+ );
+ }
+
public function getDescription() {
return 'List all titles protected from creation';
}