Index: trunk/extensions/Validator/INSTALL |
— | — | @@ -1,4 +1,4 @@ |
2 | | -[[Validator 0.4.8]] |
| 2 | +[[Validator 0.4.9]] |
3 | 3 | |
4 | 4 | Once you have downloaded the code, place the 'Validator' directory within |
5 | 5 | your MediaWiki 'extensions' directory. Then add the following code to your |
Index: trunk/extensions/Validator/includes/Parameter.php |
— | — | @@ -189,6 +189,16 @@ |
190 | 190 | protected $description = false; |
191 | 191 | |
192 | 192 | /** |
| 193 | + * A message that acts as description for the parameter or false when there is none. |
| 194 | + * Can be obtained via getMessage and set via setMessage. |
| 195 | + * |
| 196 | + * @since 0.4.9 |
| 197 | + * |
| 198 | + * @var mixed string or false |
| 199 | + */ |
| 200 | + protected $message = false; |
| 201 | + |
| 202 | + /** |
193 | 203 | * Constructor. |
194 | 204 | * |
195 | 205 | * @since 0.4 |
— | — | @@ -785,6 +795,29 @@ |
786 | 796 | */ |
787 | 797 | public function setDescription( $descriptionMessage ) { |
788 | 798 | $this->description = $descriptionMessage; |
789 | | - } |
| 799 | + } |
| 800 | + |
| 801 | + /** |
| 802 | + * Returns a message that will act as a description message for the parameter, or false when there is none. |
| 803 | + * Override in deriving classes to add a message. |
| 804 | + * |
| 805 | + * @since 0.4.9 |
| 806 | + * |
| 807 | + * @return mixed string or false |
| 808 | + */ |
| 809 | + public function getDescription() { |
| 810 | + return $this->message; |
| 811 | + } |
790 | 812 | |
| 813 | + /** |
| 814 | + * Sets a message for the parameter that will act as description. |
| 815 | + * |
| 816 | + * @since 0.4.9 |
| 817 | + * |
| 818 | + * @param string $message |
| 819 | + */ |
| 820 | + public function setDescription( $message ) { |
| 821 | + $this->message = $message; |
| 822 | + } |
| 823 | + |
791 | 824 | } |
\ No newline at end of file |
Index: trunk/extensions/Validator/Validator.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | die( 'Not an entry point.' ); |
27 | 27 | } |
28 | 28 | |
29 | | -define( 'Validator_VERSION', '0.4.8' ); |
| 29 | +define( 'Validator_VERSION', '0.4.9 alpha' ); |
30 | 30 | |
31 | 31 | // Register the internationalization file. |
32 | 32 | $wgExtensionMessagesFiles['Validator'] = dirname( __FILE__ ) . '/Validator.i18n.php'; |