Follow-up r84475: what ever posessed me to get rid of this?
authorHappy-melon <happy-melon@users.mediawiki.org>
Mon, 21 Mar 2011 23:27:08 +0000 (23:27 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Mon, 21 Mar 2011 23:27:08 +0000 (23:27 +0000)
includes/Block.php

index 78c3027..c63d0f6 100644 (file)
@@ -1170,6 +1170,17 @@ class Block {
                        : $this->type;
        }
 
+       /**
+        * Get the target and target type for this particular Block.  Note that for autoblocks,
+        * this returns the unredacted name; frontend functions need to call $block->getRedactedName()
+        * in this situation.
+        * @return array( User|String, Block::TYPE_ constant )
+        * FIXME: this should be an integral part of the Block member variables
+        */
+       public function getTargetAndType() {
+               return array( $this->getTarget(), $this->getType() );
+       }
+
        /**
         * Get the target for this particular Block.  Note that for autoblocks,
         * this returns the unredacted name; frontend functions need to call $block->getRedactedName()