for users with special characters in their names
* The number of watching users in watchlists was always reported as 1
* namespaceDupes.php no longer dies when coming across an illegal title
-* Make API check for restrictions in the old format too.
* (bug 12143) Do not show a link to patrol new pages for non existent pages
== Parser changes in 1.12 ==
* (bug 11206) api.php should honor maxlag
* Added diff generation to prop=revisions
* Added support for traditional, unified and array diffs to prop=revisions
+* Make prop=info check for restrictions in the old format too.
+* Add apihighlimits permission, default for sysops and bots
=== Languages updated in 1.12 ===
$wgGroupPermissions['bot' ]['nominornewtalk'] = true;
$wgGroupPermissions['bot' ]['autopatrol'] = true;
$wgGroupPermissions['bot' ]['suppressredirect'] = true;
+$wgGroupPermissions['bot' ]['apihighlimits'] = true;
// Most extra permission abilities go to this group
$wgGroupPermissions['sysop']['block'] = true;
$wgGroupPermissions['sysop']['blockemail'] = true;
$wgGroupPermissions['sysop']['markbotedits'] = true;
$wgGroupPermissions['sysop']['suppressredirect'] = true;
+$wgGroupPermissions['sysop']['apihighlimits'] = true;
#$wgGroupPermissions['sysop']['mergehistory'] = true;
// Permission to change users' group assignments
// Optimization: do not check user's bot status unless really needed -- skips db query
// assumes $botMax >= $max
if (!is_null($max) && $value > $max) {
- if (!is_null($botMax) && ($this->getMain()->isBot() || $this->getMain()->isSysop())) {
+ if (!is_null($botMax) && ($this->getMain()->canApiHighLimits())) {
if ($value > $botMax) {
$this->dieUsage($this->encodeParamName($paramName) . " may not be over $botMax (set to $value) for bots or sysops", $paramName);
}
}
private $mIsBot = null;
-
private $mIsSysop = null;
+ private $mCanApiHighLimits = null;
/**
* Returns true if the currently logged in user is a bot, false otherwise
+ * OBSOLETE, use canApiHighLimits() instead
*/
public function isBot() {
if (!isset ($this->mIsBot)) {
/**
* Similar to isBot(), this method returns true if the logged in user is
* a sysop, and false if not.
+ * OBSOLETE, use canApiHighLimits() instead
*/
public function isSysop() {
if (!isset ($this->mIsSysop)) {
return $this->mIsSysop;
}
+
+ public function canApiHighLimits() {
+ if (!is_null ($this->mCanApiHighLimits)) {
+ global $wgUser;
+ $this->mCanApiHighLimits = $wgUser->isAllowed('apihighlimits');
+ }
+
+ return $this->mCanApiHighLimits;
+ }
public function getShowVersions() {
return $this->mShowVersions;