Index: trunk/phase3/includes/Block.php |
— | — | @@ -1171,6 +1171,17 @@ |
1172 | 1172 | } |
1173 | 1173 | |
1174 | 1174 | /** |
| 1175 | + * Get the target and target type for this particular Block. Note that for autoblocks, |
| 1176 | + * this returns the unredacted name; frontend functions need to call $block->getRedactedName() |
| 1177 | + * in this situation. |
| 1178 | + * @return array( User|String, Block::TYPE_ constant ) |
| 1179 | + * FIXME: this should be an integral part of the Block member variables |
| 1180 | + */ |
| 1181 | + public function getTargetAndType() { |
| 1182 | + return array( $this->getTarget(), $this->getType() ); |
| 1183 | + } |
| 1184 | + |
| 1185 | + /** |
1175 | 1186 | * Get the target for this particular Block. Note that for autoblocks, |
1176 | 1187 | * this returns the unredacted name; frontend functions need to call $block->getRedactedName() |
1177 | 1188 | * in this situation. |