Index: trunk/extensions/SemanticResultFormats/TagCloud/SRF_TagCloud.php |
— | — | @@ -33,60 +33,6 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | | - * This if for b/c with SMW 1.5.x; SMW 1.6 directly accepts Parameter objects. |
38 | | - * |
39 | | - * (non-PHPdoc) |
40 | | - * @see SMWResultPrinter::readParameters() |
41 | | - * |
42 | | - * @deprecated |
43 | | - */ |
44 | | - protected function readParameters( $params, $outputmode ) { |
45 | | - parent::readParameters( $params, $outputmode ); |
46 | | - |
47 | | - if ( !array_key_exists( 'includesubject', $params ) || !in_array( $params['includesubject'], array( 'yes', 'no' ) ) ) { |
48 | | - $params['includesubject'] = 'no'; |
49 | | - } |
50 | | - |
51 | | - $this->includeName = $params['includesubject'] == 'yes'; |
52 | | - |
53 | | - if ( !array_key_exists( 'increase', $params ) || !in_array( $params['increase'], array( 'linear', 'log' ) ) ) { |
54 | | - $params['increase'] = 'log'; |
55 | | - } |
56 | | - |
57 | | - $this->sizeMode = $params['increase']; |
58 | | - |
59 | | - if ( !array_key_exists( 'tagorder', $params ) || !in_array( $params['tagorder'], array( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ) ) { |
60 | | - $params['tagorder'] = 'alphabetical'; |
61 | | - } |
62 | | - |
63 | | - $this->tagOrder = $params['tagorder']; |
64 | | - |
65 | | - if ( !array_key_exists( 'mincount', $params ) || !ctype_digit( (string)$params['mincount'] ) ) { |
66 | | - $params['mincount'] = 1; |
67 | | - } |
68 | | - |
69 | | - $this->minCount = $params['mincount']; |
70 | | - |
71 | | - if ( !array_key_exists( 'maxtags', $params ) || !ctype_digit( (string)$params['maxtags'] ) ) { |
72 | | - $params['maxtags'] = 1000; |
73 | | - } |
74 | | - |
75 | | - $this->maxTags = $params['maxtags']; |
76 | | - |
77 | | - if ( !array_key_exists( 'minsize', $params ) || !ctype_digit( (string)$params['minsize'] ) ) { |
78 | | - $params['minsize'] = 77; |
79 | | - } |
80 | | - |
81 | | - $this->minTagSize = $params['minsize']; |
82 | | - |
83 | | - if ( !array_key_exists( 'maxsize', $params ) || !ctype_digit( (string)$params['maxsize'] ) ) { |
84 | | - $params['maxsize'] = 242; |
85 | | - } |
86 | | - |
87 | | - $this->maxSize = $params['maxsize']; |
88 | | - } |
89 | | - |
90 | | - /** |
91 | 37 | * @see SMWResultPrinter::handleParameters |
92 | 38 | * |
93 | 39 | * @since 1.6 |
— | — | @@ -296,48 +242,35 @@ |
297 | 243 | public function getParameters() { |
298 | 244 | $params = parent::getParameters(); |
299 | 245 | |
300 | | - if ( defined( 'SMW_SUPPORTS_VALIDATOR' ) ) { |
301 | | - $params['includesubject'] = new Parameter( 'includesubject', Parameter::TYPE_BOOLEAN ); |
302 | | - $params['includesubject']->setMessage( 'srf_paramdesc_includesubject' ); |
303 | | - $params['includesubject']->setDefault( false ); |
304 | | - |
305 | | - $params['increase'] = new Parameter( 'increase' ); |
306 | | - $params['increase']->setMessage( 'srf_paramdesc_increase' ); |
307 | | - $params['increase']->addCriteria( new CriterionInArray( 'linear', 'log' ) ); |
308 | | - $params['increase']->setDefault( 'log' ); |
309 | | - |
310 | | - $params['tagorder'] = new Parameter( 'tagorder' ); |
311 | | - $params['tagorder']->setMessage( 'srf_paramdesc_tagorder' ); |
312 | | - $params['tagorder']->addCriteria( new CriterionInArray( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ); |
313 | | - $params['tagorder']->setDefault( 'alphabetical' ); |
314 | | - |
315 | | - $params['mincount'] = new Parameter( 'mincount', Parameter::TYPE_INTEGER ); |
316 | | - $params['mincount']->setMessage( 'srf_paramdesc_mincount' ); |
317 | | - $params['mincount']->setDefault( 1 ); |
318 | | - |
319 | | - $params['maxtags'] = new Parameter( 'maxtags', Parameter::TYPE_INTEGER ); |
320 | | - $params['maxtags']->setMessage( 'srf_paramdesc_maxtags' ); |
321 | | - $params['maxtags']->setDefault( 1000 ); |
| 246 | + $params['includesubject'] = new Parameter( 'includesubject', Parameter::TYPE_BOOLEAN ); |
| 247 | + $params['includesubject']->setMessage( 'srf_paramdesc_includesubject' ); |
| 248 | + $params['includesubject']->setDefault( false ); |
| 249 | + |
| 250 | + $params['increase'] = new Parameter( 'increase' ); |
| 251 | + $params['increase']->setMessage( 'srf_paramdesc_increase' ); |
| 252 | + $params['increase']->addCriteria( new CriterionInArray( 'linear', 'log' ) ); |
| 253 | + $params['increase']->setDefault( 'log' ); |
| 254 | + |
| 255 | + $params['tagorder'] = new Parameter( 'tagorder' ); |
| 256 | + $params['tagorder']->setMessage( 'srf_paramdesc_tagorder' ); |
| 257 | + $params['tagorder']->addCriteria( new CriterionInArray( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ); |
| 258 | + $params['tagorder']->setDefault( 'alphabetical' ); |
| 259 | + |
| 260 | + $params['mincount'] = new Parameter( 'mincount', Parameter::TYPE_INTEGER ); |
| 261 | + $params['mincount']->setMessage( 'srf_paramdesc_mincount' ); |
| 262 | + $params['mincount']->setDefault( 1 ); |
| 263 | + |
| 264 | + $params['maxtags'] = new Parameter( 'maxtags', Parameter::TYPE_INTEGER ); |
| 265 | + $params['maxtags']->setMessage( 'srf_paramdesc_maxtags' ); |
| 266 | + $params['maxtags']->setDefault( 1000 ); |
322 | 267 | |
323 | | - $params['minsize'] = new Parameter( 'minsize', Parameter::TYPE_INTEGER ); |
324 | | - $params['minsize']->setMessage( 'srf_paramdesc_minsize' ); |
325 | | - $params['minsize']->setDefault( 77 ); |
| 268 | + $params['minsize'] = new Parameter( 'minsize', Parameter::TYPE_INTEGER ); |
| 269 | + $params['minsize']->setMessage( 'srf_paramdesc_minsize' ); |
| 270 | + $params['minsize']->setDefault( 77 ); |
326 | 271 | |
327 | | - $params['maxsize'] = new Parameter( 'maxsize', Parameter::TYPE_INTEGER ); |
328 | | - $params['maxsize']->setMessage( 'srf_paramdesc_maxsize' ); |
329 | | - $params['maxsize']->setDefault( 242 ); |
330 | | - } |
331 | | - else { |
332 | | - // This if for b/c with SMW 1.5.x; SMW 1.6 directly accepts Parameter objects. |
333 | | - $params[] = array( 'name' => 'includesubject', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_includesubject' ), 'values' => array( 'yes', 'no' ) ); |
334 | | - $params[] = array( 'name' => 'increase', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_increase' ), 'values' => array( 'linear', 'log' ) ); |
335 | | - $params[] = array( 'name' => 'tagorder', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_tagorder' ), 'values' => array( 'alphabetical', 'asc', 'desc', 'random', 'unchanged' ) ); |
336 | | - |
337 | | - $params[] = array( 'name' => 'mincount', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_mincount' ) ); |
338 | | - $params[] = array( 'name' => 'maxtags', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_maxtags' ) ); |
339 | | - $params[] = array( 'name' => 'minsize', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_minsize' ) ); |
340 | | - $params[] = array( 'name' => 'maxsize', 'type' => 'int', 'description' => wfMsg( 'srf_paramdesc_maxsize' ) ); |
341 | | - } |
| 272 | + $params['maxsize'] = new Parameter( 'maxsize', Parameter::TYPE_INTEGER ); |
| 273 | + $params['maxsize']->setMessage( 'srf_paramdesc_maxsize' ); |
| 274 | + $params['maxsize']->setDefault( 242 ); |
342 | 275 | |
343 | 276 | return $params; |
344 | 277 | } |
Index: trunk/extensions/SemanticResultFormats/RELEASE-NOTES |
— | — | @@ -6,7 +6,8 @@ |
7 | 7 | |
8 | 8 | * Fixed rendering bug in the tagcloud format occuring for inline queries. |
9 | 9 | * Fixed jqPlotBar and jqPlotPie rendering on Special:Ask and other special pages. |
10 | | -Cleaned up the jqPlotBar format somewhat. |
| 10 | +* Cleaned up the jqPlotBar format somewhat. |
| 11 | +* Dropped compatibility with SMW < 1.6 for the TagCloud format. |
11 | 12 | |
12 | 13 | == SRF 1.6 == |
13 | 14 | |