Merge "Add missing subjectspace pages to watchlist on update."
[lhc/web/wiklou.git] / includes / htmlform / HTMLInfoField.php
1 <?php
2
3 /**
4 * An information field (text blob), not a proper input.
5 */
6 class HTMLInfoField extends HTMLFormField {
7 public function __construct( $info ) {
8 $info['nodata'] = true;
9
10 parent::__construct( $info );
11 }
12
13 public function getInputHTML( $value ) {
14 return !empty( $this->mParams['raw'] ) ? $value : htmlspecialchars( $value );
15 }
16
17 public function getTableRow( $value ) {
18 if ( !empty( $this->mParams['rawrow'] ) ) {
19 return $value;
20 }
21
22 return parent::getTableRow( $value );
23 }
24
25 /**
26 * @since 1.20
27 */
28 public function getDiv( $value ) {
29 if ( !empty( $this->mParams['rawrow'] ) ) {
30 return $value;
31 }
32
33 return parent::getDiv( $value );
34 }
35
36 /**
37 * @since 1.20
38 */
39 public function getRaw( $value ) {
40 if ( !empty( $this->mParams['rawrow'] ) ) {
41 return $value;
42 }
43
44 return parent::getRaw( $value );
45 }
46
47 protected function needsLabel() {
48 return false;
49 }
50 }