summaryrefslogtreecommitdiff
path: root/includes/UserRightsProxy.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/UserRightsProxy.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/UserRightsProxy.php')
-rw-r--r--includes/UserRightsProxy.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/includes/UserRightsProxy.php b/includes/UserRightsProxy.php
index 6c2a5f12..dfce8adf 100644
--- a/includes/UserRightsProxy.php
+++ b/includes/UserRightsProxy.php
@@ -85,6 +85,13 @@ class UserRightsProxy {
return self::newFromLookup( $database, 'user_name', $name, $ignoreInvalidDB );
}
+ /**
+ * @param $database
+ * @param $field
+ * @param $value
+ * @param $ignoreInvalidDB bool
+ * @return null|UserRightsProxy
+ */
private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) {
$db = self::getDB( $database, $ignoreInvalidDB );
if( $db ) {
@@ -122,10 +129,16 @@ class UserRightsProxy {
return null;
}
+ /**
+ * @return int
+ */
public function getId() {
return $this->id;
}
+ /**
+ * @return bool
+ */
public function isAnon() {
return $this->getId() == 0;
}
@@ -187,14 +200,14 @@ class UserRightsProxy {
),
__METHOD__ );
}
-
+
/**
* Replaces User::setOption()
*/
public function setOption( $option, $value ) {
$this->newOptions[$option] = $value;
}
-
+
public function saveSettings() {
$rows = array();
foreach ( $this->newOptions as $option => $value ) {