Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_PrintRequest.php |
— | — | @@ -2,14 +2,17 @@ |
3 | 3 | /** |
4 | 4 | * This file contains the class for defining "print requests", i.e. requests for output |
5 | 5 | * informatoin to be included in query results. |
| 6 | + * |
6 | 7 | * @file |
7 | 8 | * @ingroup SMWQuery |
| 9 | + * |
8 | 10 | * @author Markus Krötzsch |
9 | 11 | */ |
10 | 12 | |
11 | 13 | /** |
12 | 14 | * Container class for request for printout, as used in queries to |
13 | 15 | * obtain additional information for the retrieved results. |
| 16 | + * |
14 | 17 | * @ingroup SMWQuery |
15 | 18 | */ |
16 | 19 | class SMWPrintRequest { |
— | — | @@ -44,13 +47,16 @@ |
45 | 48 | $this->m_label = $label; |
46 | 49 | $this->m_data = $data; |
47 | 50 | $this->m_outputformat = $outputformat; |
| 51 | + |
48 | 52 | if ( ( $mode == SMWPrintRequest::PRINT_CCAT ) && ( $outputformat == false ) ) { |
49 | 53 | $this->m_outputformat = 'x'; // changed default for Boolean case |
50 | 54 | } |
| 55 | + |
51 | 56 | if ( $this->m_data instanceof SMWDataValue ) { |
52 | 57 | // $this->m_data = clone $data; // we assume that the caller denotes the object ot us; else he needs provide us with a clone |
53 | 58 | $this->m_data->setCaption( $label ); |
54 | 59 | } |
| 60 | + |
55 | 61 | if ( null != $params ) $m_params = $params; |
56 | 62 | } |
57 | 63 | |
— | — | @@ -71,6 +77,7 @@ |
72 | 78 | if ( ( $linker === null ) || ( $this->m_label == '' ) ) { |
73 | 79 | return htmlspecialchars( $this->m_label ); |
74 | 80 | } |
| 81 | + |
75 | 82 | switch ( $this->m_mode ) { |
76 | 83 | case SMWPrintRequest::PRINT_CATS: |
77 | 84 | return htmlspecialchars( $this->m_label ); // TODO: link to Special:Categories |