Index: trunk/extensions/DataTransclusion/DataTransclusionHandler.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | // find out which data source to use... |
90 | 90 | if ( empty( $argv['source'] ) ) { |
91 | 91 | if ( empty( $argv[1] ) ) { |
92 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-source', $asHTML ); // TESTME |
| 92 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-source', $asHTML ); |
93 | 93 | } else { |
94 | 94 | $sourceName = $argv[1]; |
95 | 95 | } |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | |
100 | 100 | $source = DataTransclusionHandler::getDataSource( $sourceName ); |
101 | 101 | if ( empty( $source ) ) { |
102 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-unknown-source', $asHTML, $sourceName ); // TESTME |
| 102 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-unknown-source', $asHTML, $sourceName ); |
103 | 103 | } |
104 | 104 | |
105 | 105 | // find out how to find the desired record |
— | — | @@ -110,14 +110,14 @@ |
111 | 111 | |
112 | 112 | $keyFields = $source->getKeyFields(); |
113 | 113 | if ( ! in_array( $by, $keyFields ) ) { |
114 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-argument-by', $asHTML, $sourceName, $by, join( ', ', $keyFields ) ); // TESTME |
| 114 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-argument-by', $asHTML, $sourceName, $by, join( ', ', $keyFields ) ); |
115 | 115 | } |
116 | 116 | |
117 | 117 | if ( !empty( $argv['key'] ) ) { |
118 | 118 | $key = $argv['key']; |
119 | 119 | } else if ( $key === null || $key === false ) { |
120 | 120 | if ( empty( $argv[2] ) ) { |
121 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-argument-key', $asHTML ); // TESTME |
| 121 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-argument-key', $asHTML ); |
122 | 122 | } else { |
123 | 123 | $key = $argv[2]; |
124 | 124 | } |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | // find out how to render the record |
128 | 128 | if ( empty( $argv['template'] ) ) { |
129 | 129 | if ( empty( $argv[3] ) ) { |
130 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-argument-template', $asHTML ); // TESTME |
| 130 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-missing-argument-template', $asHTML ); |
131 | 131 | } else { |
132 | 132 | $template = $argv[3]; |
133 | 133 | } |
— | — | @@ -136,12 +136,12 @@ |
137 | 137 | |
138 | 138 | // load the record |
139 | 139 | $record = $source->fetchRecord( $by, $key ); |
140 | | - if ( empty( $record ) ) return DataTransclusionHandler::errorMessage( 'datatransclusion-record-not-found', $asHTML, $sourceName, $by, $key ); // TESTME |
| 140 | + if ( empty( $record ) ) return DataTransclusionHandler::errorMessage( 'datatransclusion-record-not-found', $asHTML, $sourceName, $by, $key ); |
141 | 141 | |
142 | 142 | // render the record into wiki text |
143 | 143 | $t = Title::newFromText( $template, NS_TEMPLATE ); |
144 | 144 | if ( empty( $t ) ) { |
145 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-template-name', $asHTML, $template ); // TESTME |
| 145 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-template-name', $asHTML, $template ); |
146 | 146 | } |
147 | 147 | |
148 | 148 | // FIXME: log the template we used into the parser output, like regular template use |
— | — | @@ -153,20 +153,20 @@ |
154 | 154 | $text = $handler->render( $record ); |
155 | 155 | |
156 | 156 | if ( $text === false ) { |
157 | | - return DataTransclusionHandler::errorMessage( 'datatransclusion-unknown-template', $asHTML, $template ); // TESTME |
| 157 | + return DataTransclusionHandler::errorMessage( 'datatransclusion-unknown-template', $asHTML, $template ); |
158 | 158 | } |
159 | 159 | |
160 | 160 | // set parser output expiry |
161 | 161 | $expire = $source->getCacheDuration(); |
162 | 162 | if ( $expire !== false && $expire !== null ) { |
163 | | - $parser->getOutput()->updateCacheExpiry( $expire ); // NOTE: this works only since r67185 //TESTME |
| 163 | + $parser->getOutput()->updateCacheExpiry( $expire ); // NOTE: this works only since r67185 //TESTME (how?) |
164 | 164 | } |
165 | 165 | |
166 | 166 | if ( $asHTML && $parser ) { // render into HTML if desired |
167 | 167 | $html = $parser->recursiveTagParse( $text ); |
168 | | - return $html; // TESTME |
| 168 | + return $html; |
169 | 169 | } else { |
170 | | - return $text; // TESTME |
| 170 | + return $text; |
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | $article = new Article( $this->template ); |
215 | 215 | |
216 | 216 | if ( !$article->exists() ) { |
217 | | - return false; // TESTME |
| 217 | + return false; |
218 | 218 | } |
219 | 219 | |
220 | 220 | $text = $article->getContent(); |
— | — | @@ -236,12 +236,12 @@ |
237 | 237 | $v = ''; |
238 | 238 | } |
239 | 239 | |
240 | | - $rec[ $f ] = $this->sanitizeValue( $v ); // TESTME |
| 240 | + $rec[ $f ] = $this->sanitizeValue( $v ); |
241 | 241 | } |
242 | 242 | |
243 | 243 | // add source meta info, so we can render links back to the source, |
244 | 244 | // provide license info, etc |
245 | | - $info = $this->source->getSourceInfo(); // TESTME |
| 245 | + $info = $this->source->getSourceInfo(); |
246 | 246 | foreach ( $info as $f => $v ) { |
247 | 247 | if ( is_array( $v ) || is_object( $v ) || is_resource( $v ) ) { |
248 | 248 | continue; |
Index: trunk/extensions/DataTransclusion/WebDataTransclusionSource.php |
— | — | @@ -74,22 +74,22 @@ |
75 | 75 | } |
76 | 76 | |
77 | 77 | public function fetchRecord( $field, $value ) { |
78 | | - $raw = $this->loadRecordData( $field, $value ); // TESTME |
| 78 | + $raw = $this->loadRecordData( $field, $value ); // TESTME |
79 | 79 | if ( !$raw ) { |
80 | 80 | return false; // TODO: log error? |
81 | 81 | } |
82 | 82 | |
83 | | - $data = $this->decodeData( $raw, $this->dataFormat ); // TESTME |
| 83 | + $data = $this->decodeData( $raw, $this->dataFormat ); |
84 | 84 | if ( !$data ) { |
85 | 85 | return false; // TODO: log error? |
86 | 86 | } |
87 | 87 | |
88 | | - $err = $this->extractError( $data ); // TESTME |
| 88 | + $err = $this->extractError( $data ); |
89 | 89 | if ( $err ) { |
90 | 90 | return false; // TODO: log error? |
91 | 91 | } |
92 | 92 | |
93 | | - $rec = $this->extractRecord( $data ); // TESTME |
| 93 | + $rec = $this->extractRecord( $data ); |
94 | 94 | if ( !$rec ) { |
95 | 95 | return false; // TODO: log error? |
96 | 96 | } |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | } |
132 | 132 | |
133 | 133 | if ( $format == 'php' ) { |
134 | | - return unserialize( $raw ); // TESTME |
| 134 | + return unserialize( $raw ); |
135 | 135 | } |
136 | 136 | |
137 | 137 | return false; |
Index: trunk/extensions/DataTransclusion/DBDataTransclusionSource.php |
— | — | @@ -88,10 +88,10 @@ |
89 | 89 | return false; // redundant, but make extra sure we don't get anythign evil here //TESTME |
90 | 90 | } |
91 | 91 | |
92 | | - $value = $this->convertKey( $field, $value ); // TESTME |
| 92 | + $value = $this->convertKey( $field, $value ); |
93 | 93 | |
94 | 94 | if ( is_string( $value ) ) { |
95 | | - $v = $db->addQuotes( $value ); // TESTME |
| 95 | + $v = $db->addQuotes( $value ); |
96 | 96 | } else { |
97 | 97 | $v = $value; |
98 | 98 | } |