Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -9,18 +9,18 @@ |
10 | 10 | * @author Sanyam Goyal |
11 | 11 | * @author Jeroen De Dauw |
12 | 12 | */ |
13 | | -abstract class SMWQueryUI extends SpecialPage{ |
| 13 | +abstract class SMWQueryUI extends SpecialPage { |
14 | 14 | protected $m_ui_helper; |
15 | | - protected abstract function execute($p){ |
| 15 | + protected abstract function execute( $p ) { |
16 | 16 | /* |
17 | 17 | * Extract the parameters from the UI. Use either the constructor or |
18 | 18 | * $this->m_ui_helper=new SMWUIHelper() |
19 | 19 | */ |
20 | 20 | } |
21 | | - protected function getUrlTail(){ |
22 | | - $urltail='&q=' . urlencode( $this->m_ui_helper->getQuerystring() ); |
| 21 | + protected function getUrlTail() { |
| 22 | + $urltail = '&q=' . urlencode( $this->m_ui_helper->getQuerystring() ); |
23 | 23 | $tmp_parray = array(); |
24 | | - $params=$this->m_ui_helper->getParams(); |
| 24 | + $params = $this->m_ui_helper->getParams(); |
25 | 25 | foreach ( $params as $key => $value ) { |
26 | 26 | if ( !in_array( $key, array( 'sort', 'order', 'limit', 'offset', 'title' ) ) ) { |
27 | 27 | $tmp_parray[$key] = $value; |
— | — | @@ -37,10 +37,10 @@ |
38 | 38 | if ( array_key_exists( 'sort', $params ) ) $urltail .= '&sort=' . $params['sort']; |
39 | 39 | if ( array_key_exists( 'order', $params ) ) $urltail .= '&order=' . $params['order']; |
40 | 40 | } |
41 | | - protected function makeHtmlResult(){ |
| 41 | + protected function makeHtmlResult() { |
42 | 42 | global $wgOut; |
43 | | - if(is_a($this->m_ui_helper, 'SMWQueryUIHelper')){ |
44 | | - |
| 43 | + if ( is_a( $this->m_ui_helper, 'SMWQueryUIHelper' ) ) { |
| 44 | + |
45 | 45 | } |
46 | 46 | } |
47 | 47 | /** |
— | — | @@ -171,7 +171,7 @@ |
172 | 172 | return $input->getHtml(); |
173 | 173 | } |
174 | 174 | |
175 | | - protected function usesNavigationBar(){ |
| 175 | + protected function usesNavigationBar() { |
176 | 176 | return true; |
177 | 177 | } |
178 | 178 | |
— | — | @@ -273,55 +273,55 @@ |
274 | 274 | * @property boolean $enable_validation If set to TRUE causes each of the parametes to be checked for errors. |
275 | 275 | */ |
276 | 276 | class SMWQueryUIHelper { |
277 | | - |
278 | | -//members |
279 | | - protected $m_querystring = ''; //The query |
280 | | - protected $m_params = array(); //Parameters controlling how the results should be displayed |
281 | | - protected $m_printouts = array(); //Properties to be printed along with results |
282 | | - protected static $m_UIPages = array(); //A list of Query UIs |
| 277 | + |
| 278 | +// members |
| 279 | + protected $m_querystring = ''; // The query |
| 280 | + protected $m_params = array(); // Parameters controlling how the results should be displayed |
| 281 | + protected $m_printouts = array(); // Properties to be printed along with results |
| 282 | + protected static $m_UIPages = array(); // A list of Query UIs |
283 | 283 | public $enable_validation; |
284 | | - private $fatal_errors= false; |
| 284 | + private $fatal_errors = false; |
285 | 285 | private $context; |
286 | | - private $errors=array(); |
287 | | - const SPECIAL_PAGE=0;//parameters passed from special page |
288 | | - const WIKI_LINK=1;//parameters passed from 'further links' in the wiki. |
| 286 | + private $errors = array(); |
| 287 | + const SPECIAL_PAGE = 0;// parameters passed from special page |
| 288 | + const WIKI_LINK = 1;// parameters passed from 'further links' in the wiki. |
289 | 289 | |
290 | 290 | |
291 | | -//constructor |
292 | | - public function __construct($enable_validation = true, $context=self::SPECIAL_PAGE) { |
| 291 | +// constructor |
| 292 | + public function __construct( $enable_validation = true, $context = self::SPECIAL_PAGE ) { |
293 | 293 | $this -> enable_validation = $enable_validation; |
294 | | - $this->context=$context; |
| 294 | + $this->context = $context; |
295 | 295 | } |
296 | 296 | |
297 | | - public function hasError(){ |
| 297 | + public function hasError() { |
298 | 298 | return $this->fatal_errors; |
299 | | - } |
300 | | - |
| 299 | + } |
| 300 | + |
301 | 301 | /** |
302 | 302 | * |
303 | 303 | * Returns an array of errors, if any have occured. |
304 | 304 | * @return array of strings |
305 | 305 | */ |
306 | | - public function getErrors(){ |
| 306 | + public function getErrors() { |
307 | 307 | return $this->errors; |
308 | 308 | } |
309 | 309 | /** |
310 | 310 | * Register a Semantic Search Special Page |
311 | 311 | * @param SpecialPage $page |
312 | 312 | */ |
313 | | - public static function addUI( SpecialPage &$page ){ |
| 313 | + public static function addUI( SpecialPage &$page ) { |
314 | 314 | /* |
315 | 315 | * This way of registering, instead of using a global variable will cause |
316 | 316 | * SMWQueryUIHelper to AutoLoad, but the alternate would break encapsulation. |
317 | 317 | */ |
318 | | - self::$m_UIPages[]=$page; |
| 318 | + self::$m_UIPages[] = $page; |
319 | 319 | } |
320 | 320 | |
321 | 321 | /** |
322 | 322 | * Returns an array of Semantic Search Special Pages |
323 | 323 | * @return array of SpecialPage |
324 | 324 | */ |
325 | | - public static function getUiList(){ |
| 325 | + public static function getUiList() { |
326 | 326 | return self::$m_UIPages; |
327 | 327 | } |
328 | 328 | |
— | — | @@ -332,22 +332,22 @@ |
333 | 333 | * @param string $querystring The query |
334 | 334 | * @return array array of errors, if any. |
335 | 335 | */ |
336 | | - public function setQueryString( $querystring =""){ |
| 336 | + public function setQueryString( $querystring = "" ) { |
337 | 337 | $this -> m_querystring = $querystring; |
338 | | - $errors=array(); |
339 | | - if($this->enable_validation){ |
340 | | - if($querystring==''){ |
341 | | - $errors[]="No query has been specified"; //TODO i18n |
| 338 | + $errors = array(); |
| 339 | + if ( $this->enable_validation ) { |
| 340 | + if ( $querystring == '' ) { |
| 341 | + $errors[] = "No query has been specified"; // TODO i18n |
342 | 342 | } |
343 | 343 | else |
344 | 344 | { |
345 | | - $query = SMWQueryProcessor::createQuery($querystring, array()); |
346 | | - $errors=$query ->getErrors(); |
| 345 | + $query = SMWQueryProcessor::createQuery( $querystring, array() ); |
| 346 | + $errors = $query ->getErrors(); |
347 | 347 | } |
348 | | - if (!empty ($errors)){ |
349 | | - $this->fatal_errors=true; |
| 348 | + if ( !empty ( $errors ) ) { |
| 349 | + $this->fatal_errors = true; |
350 | 350 | } |
351 | | - $this->errors = array_merge($errors,$this->errors); |
| 351 | + $this->errors = array_merge( $errors, $this->errors ); |
352 | 352 | return $errors; |
353 | 353 | } |
354 | 354 | } |
— | — | @@ -361,87 +361,85 @@ |
362 | 362 | * @param array $printouts Array of additional properties to be shown in results |
363 | 363 | * @return array array of errors, if any. |
364 | 364 | */ |
365 | | - public function setPrintOuts( array $printouts=array() ){ |
| 365 | + public function setPrintOuts( array $printouts = array() ) { |
366 | 366 | $errors = array(); |
367 | | - if($this -> enable_validation){ |
368 | | - foreach($printouts as $key => $prop){ |
369 | | - if($prop[0]!='?'){ |
370 | | - $printouts[$key]="?".$printouts[$key]; |
| 367 | + if ( $this -> enable_validation ) { |
| 368 | + foreach ( $printouts as $key => $prop ) { |
| 369 | + if ( $prop[0] != '?' ) { |
| 370 | + $printouts[$key] = "?" . $printouts[$key]; |
371 | 371 | } |
372 | | - if(!$this->validateProperty($prop)){ |
373 | | - $errors[]="$prop may not be a valid property"; //TODO: add i18n |
374 | | - $this->fatal_errors=true; |
| 372 | + if ( !$this->validateProperty( $prop ) ) { |
| 373 | + $errors[] = "$prop may not be a valid property"; // TODO: add i18n |
| 374 | + $this->fatal_errors = true; |
375 | 375 | } |
376 | 376 | } |
377 | 377 | } |
378 | 378 | $this -> m_printouts = $printouts; |
379 | | - $this->errors = array_merge($errors,$this->errors); |
| 379 | + $this->errors = array_merge( $errors, $this->errors ); |
380 | 380 | return $errors; |
381 | 381 | } |
382 | 382 | |
383 | | - public function setParams( array $params =array()){ |
| 383 | + public function setParams( array $params = array() ) { |
384 | 384 | /* |
385 | | - *Validate, and add missing params. * |
| 385 | + *Validate, and add missing params. * |
386 | 386 | */ |
387 | 387 | global $smwgQMaxInlineLimit, $smwgResultFormats; |
388 | 388 | $errors = array(); |
389 | 389 | |
390 | | - //checking for missing parameters and adding them |
391 | | - if( !array_key_exists( 'format', $params ) ) |
| 390 | + // checking for missing parameters and adding them |
| 391 | + if ( !array_key_exists( 'format', $params ) ) |
392 | 392 | $params[ 'format' ] = $this->getDefaultResultPrinter (); |
393 | | - if( !array_key_exists('order', $params ) ) |
| 393 | + if ( !array_key_exists( 'order', $params ) ) |
394 | 394 | $params[ 'order' ] = ''; |
395 | | - if( !array_key_exists( 'limit', $params) ) |
| 395 | + if ( !array_key_exists( 'limit', $params ) ) |
396 | 396 | $params[ 'limit' ] = 20; |
397 | 397 | $params[ 'limit' ] = min( $params[ 'limit' ], $smwgQMaxInlineLimit ); |
398 | | - if(!array_key_exists('offset', $params)) |
399 | | - $params['offset']=0; |
400 | | - |
401 | | - if ($this->enable_validation){ |
402 | | - //validating the format |
403 | | - if(!array_key_exists($params['format'], $smwgResultFormats)){ |
404 | | - $errors[]="The chosen format "+$params['format']+" does not exist for this wiki"; //TODO i18n |
405 | | - $this->fatal_errors=true; |
| 398 | + if ( !array_key_exists( 'offset', $params ) ) |
| 399 | + $params['offset'] = 0; |
| 400 | + |
| 401 | + if ( $this->enable_validation ) { |
| 402 | + // validating the format |
| 403 | + if ( !array_key_exists( $params['format'], $smwgResultFormats ) ) { |
| 404 | + $errors[] = "The chosen format " + $params['format'] + " does not exist for this wiki"; // TODO i18n |
| 405 | + $this->fatal_errors = true; |
406 | 406 | } |
407 | 407 | else |
408 | | - { //validating parameters for result printer |
| 408 | + { // validating parameters for result printer |
409 | 409 | $printer = SMWQueryProcessor::getResultPrinter( $params[ 'format' ] ); |
410 | | - $parameters=$printer->getParameters(); |
411 | | - if(is_array($parameters)){ |
412 | | - //if(is_a($parameters[0], 'Parameter')){ |
| 410 | + $parameters = $printer->getParameters(); |
| 411 | + if ( is_array( $parameters ) ) { |
413 | 412 | $validator = new Validator(); |
414 | | - $validator -> setParameters($params,$parameters); |
| 413 | + $validator -> setParameters( $params, $parameters ); |
415 | 414 | $validator->validateParameters(); |
416 | 415 | $validator_has_error = $validator->hasFatalError(); |
417 | | - if($validator_has_error){ |
418 | | - array_merge ($errors, $validator->getErrorMessages ()); |
419 | | - $this->fatal_errors=true; |
| 416 | + if ( $validator_has_error ) { |
| 417 | + array_merge ( $errors, $validator->getErrorMessages () ); |
| 418 | + $this->fatal_errors = true; |
420 | 419 | } |
421 | | - //} |
422 | 420 | } |
423 | 421 | } |
424 | 422 | } |
425 | 423 | |
426 | 424 | $this -> m_params = $params; |
427 | | - $this->errors = array_merge($errors,$this->errors); |
| 425 | + $this->errors = array_merge( $errors, $this->errors ); |
428 | 426 | return $errors; |
429 | 427 | } |
430 | 428 | |
431 | | - public function makeHTMLResult(){ |
| 429 | + public function makeHTMLResult() { |
432 | 430 | /* |
433 | 431 | * Once $m_querystring, $m_params, $m_printouts are set, generates the |
434 | 432 | * results / or link. The pagination links (or navigation bar) are expected |
435 | 433 | * to be created by the UI designer. (or maybe we can put a method here to |
436 | 434 | * make the nav-bar which also calls makeHTMLResult(). |
437 | 435 | */ |
438 | | - $result=''; |
439 | | - $errors=array(); |
440 | | - $query=SMWQueryProcessor::createQuery($this->m_querystring, $this->m_params,SMWQueryProcessor::SPECIAL_PAGE , $this->m_params['format'], $this->m_printouts); |
441 | | - $res=smwfGetStore()->getQueryResult($query); |
442 | | - $errors= array_merge($errors, $res->getErrors()); |
443 | | - if(!empty($errors)){ |
444 | | - $this->fatal_errors=true; |
445 | | - $this->errors = array_merge($errors,$this->errors); |
| 436 | + $result = ''; |
| 437 | + $errors = array(); |
| 438 | + $query = SMWQueryProcessor::createQuery( $this->m_querystring, $this->m_params, SMWQueryProcessor::SPECIAL_PAGE , $this->m_params['format'], $this->m_printouts ); |
| 439 | + $res = smwfGetStore()->getQueryResult( $query ); |
| 440 | + $errors = array_merge( $errors, $res->getErrors() ); |
| 441 | + if ( !empty( $errors ) ) { |
| 442 | + $this->fatal_errors = true; |
| 443 | + $this->errors = array_merge( $errors, $this->errors ); |
446 | 444 | } |
447 | 445 | |
448 | 446 | // BEGIN: Try to be smart for rss/ical if no description/title is given and we have a concept query |
— | — | @@ -471,27 +469,12 @@ |
472 | 470 | } |
473 | 471 | } |
474 | 472 | // END: Try to be smart for rss/ical if no description/title is given and we have a concept query |
475 | | - |
| 473 | + |
476 | 474 | $printer = SMWQueryProcessor::getResultPrinter( $this->m_params['format'], SMWQueryProcessor::SPECIAL_PAGE ); |
477 | 475 | $result_mime = $printer->getMimeType( $res ); |
478 | 476 | |
479 | | -// global $wgRequest; |
480 | | -// |
481 | | -// $hidequery = $wgRequest->getVal( 'eq' ) == 'no'; |
482 | | -// |
483 | | -// // if it's an export format (like CSV, JSON, etc.), |
484 | | -// // don't actually export the data if 'eq' is set to |
485 | | -// // either 'yes' or 'no' in the query string - just |
486 | | -// // show the link instead |
487 | | -// if ( $this->m_editquery || $hidequery ) $result_mime = false; |
488 | | - |
489 | | - //??/if ( $result_mime == false ) { |
490 | 477 | if ( $res->getCount() > 0 ) { |
491 | | -// if ( $this->m_editquery ) $urltail .= '&eq=yes'; |
492 | | -// if ( $hidequery ) $urltail .= '&eq=no'; |
493 | 478 | |
494 | | - //$navigation = $this->getNavigationBar( $res, $urltail );//? |
495 | | - //$result .= '<div style="text-align: center;">' . "\n" . $navigation . "\n</div>\n";//? |
496 | 479 | $query_result = $printer->getResult( $res, $this->m_params, SMW_OUTPUT_HTML ); |
497 | 480 | |
498 | 481 | if ( is_array( $query_result ) ) { |
— | — | @@ -500,57 +483,34 @@ |
501 | 484 | $result .= $query_result; |
502 | 485 | } |
503 | 486 | |
504 | | - //$result .= '<div style="text-align: center;">' . "\n" . $navigation . "\n</div>\n";//? |
505 | 487 | } else { |
506 | 488 | $result = wfMsg( 'smw_result_noresults' ); |
507 | 489 | } |
508 | 490 | return $result; |
509 | | -// } else { // make a stand-alone file |
510 | | -// $result = $printer->getResult( $res, $this->m_params, SMW_OUTPUT_FILE ); |
511 | | -// $result_name = $printer->getFileName( $res ); // only fetch that after initialising the parameters |
512 | | -// /////////////////////////////////////// |
513 | | -// |
514 | | -// //$result = $this->getInputForm( $printoutstring, 'offset=' . $this->m_params['offset'] . '&limit=' . $this->m_params['limit'] . $urltail ) . $result; |
515 | | -// //$wgOut->addHTML( $result ); |
516 | | -// global $wgOut; |
517 | | -// $wgOut->disable(); |
518 | | -// |
519 | | -// header( "Content-type: $result_mime; charset=UTF-8" ); |
520 | | -// |
521 | | -// if ( $result_name !== false ) { |
522 | | -// header( "content-disposition: attachment; filename=$result_name" ); |
523 | | -// } |
524 | | -// |
525 | | -// echo $result; |
526 | | -// } |
527 | | - |
528 | | - |
529 | 491 | } |
530 | 492 | |
531 | | - //next come form-helper methods which may or may not be used by the UI designer |
| 493 | + // next come form-helper methods which may or may not be used by the UI designer |
532 | 494 | |
533 | | - public function extractParameters( $p ){ |
534 | | - if($this->context==self::SPECIAL_PAGE){ |
535 | | - //assume setParams(), setPintouts and setQueryString have been called |
536 | | - $rawparams = array_merge($this->m_params, array($this->m_querystring), $this->m_printouts); |
| 495 | + public function extractParameters( $p ) { |
| 496 | + if ( $this->context == self::SPECIAL_PAGE ) { |
| 497 | + // assume setParams(), setPintouts and setQueryString have been called |
| 498 | + $rawparams = array_merge( $this->m_params, array( $this->m_querystring ), $this->m_printouts ); |
537 | 499 | } |
538 | | - else //context is WIKI_LINK |
| 500 | + else // context is WIKI_LINK |
539 | 501 | { |
540 | 502 | $rawparams = SMWInfolink::decodeParameters( $p, true ); |
541 | | - //calling setParams to fill in missing parameters |
542 | | - $this->setParams($rawparams); |
543 | | - $rawparams= array_merge($this->m_params, $rawparams); |
| 503 | + // calling setParams to fill in missing parameters |
| 504 | + $this->setParams( $rawparams ); |
| 505 | + $rawparams = array_merge( $this->m_params, $rawparams ); |
544 | 506 | } |
545 | | - |
546 | | - //var_dump($this->m_params);var_dump($this->m_printouts);var_dump($this->m_querystring); |
547 | | - //var_dump("after<br>"); |
| 507 | + |
| 508 | + |
548 | 509 | SMWQueryProcessor::processFunctionParams( $rawparams, $this->m_querystring, $this->m_params, $this->m_printouts ); |
549 | | - //var_dump($this->m_params);var_dump($this->m_printouts);var_dump($this->m_querystring); |
550 | 510 | } |
551 | 511 | /** |
552 | 512 | * $m_querystring, $m_params, $m_printouts are set, returns the relevant #ask query |
553 | 513 | */ |
554 | | - public function makeAsk(){ |
| 514 | + public function makeAsk() { |
555 | 515 | $result = '{{#ask:' . htmlspecialchars( $this->m_querystring ) . "\n"; |
556 | 516 | foreach ( $this->m_printouts as $printout ) { |
557 | 517 | $result .= '|' . $printout->getSerialisation() . "\n"; |
— | — | @@ -562,20 +522,20 @@ |
563 | 523 | return $result; |
564 | 524 | } |
565 | 525 | |
566 | | - public function getQueryString(){ |
| 526 | + public function getQueryString() { |
567 | 527 | return $this->m_querystring; |
568 | 528 | } |
569 | 529 | |
570 | | - public function getParams(){ |
| 530 | + public function getParams() { |
571 | 531 | return $this->m_params; |
572 | 532 | } |
573 | 533 | /** |
574 | 534 | * |
575 | 535 | * @return array of SMWPrintRequest |
576 | 536 | */ |
577 | | - public function getPrintOuts(){ |
578 | | - if(!empty($this->printouts)){ |
579 | | - if(is_a($this->printouts[0],'SMWPrintRequest')){ |
| 537 | + public function getPrintOuts() { |
| 538 | + if ( !empty( $this->printouts ) ) { |
| 539 | + if ( is_a( $this->printouts[0], 'SMWPrintRequest' ) ) { |
580 | 540 | return $this->m_printouts; |
581 | 541 | } |
582 | 542 | } |
— | — | @@ -583,16 +543,16 @@ |
584 | 544 | } |
585 | 545 | /** |
586 | 546 | * Constructs a new SMWQueryUIHelper when parameters are passed in the InfoLink style |
587 | | - * |
| 547 | + * |
588 | 548 | * Errors, if any can be accessed from hasError() and getErrors() |
589 | 549 | * |
590 | 550 | * @param string $p parametrs |
591 | 551 | * @param boolean $enable_validation |
592 | | - * @return SMWQueryUIHelper |
| 552 | + * @return SMWQueryUIHelper |
593 | 553 | */ |
594 | | - public static function makeFromInfoLink($p, $enable_validation = true){ |
595 | | - $result = new SMWQueryUIHelper($enable_validation, self::WIKI_LINK); |
596 | | - $result->extractParameters($p); |
| 554 | + public static function makeFromInfoLink( $p, $enable_validation = true ) { |
| 555 | + $result = new SMWQueryUIHelper( $enable_validation, self::WIKI_LINK ); |
| 556 | + $result->extractParameters( $p ); |
597 | 557 | return $result; |
598 | 558 | } |
599 | 559 | /** |
— | — | @@ -606,27 +566,27 @@ |
607 | 567 | * @param boolean $enable_validation |
608 | 568 | * @return SMWQueryUIHelper |
609 | 569 | */ |
610 | | - public static function makeFromUI($query, array $params, array $printouts, $enable_validation = true){ |
611 | | - $result = new SMWQueryUIHelper($enable_validation, self::SPECIAL_PAGE); |
612 | | - $result->setParams($params); |
613 | | - $result->setPrintOuts($printouts); |
614 | | - $result->setQueryString($query); |
615 | | - $result->extractParameters(""); |
| 570 | + public static function makeFromUI( $query, array $params, array $printouts, $enable_validation = true ) { |
| 571 | + $result = new SMWQueryUIHelper( $enable_validation, self::SPECIAL_PAGE ); |
| 572 | + $result->setParams( $params ); |
| 573 | + $result->setPrintOuts( $printouts ); |
| 574 | + $result->setQueryString( $query ); |
| 575 | + $result->extractParameters( "" ); |
616 | 576 | return $result; |
617 | 577 | } |
618 | 578 | /** |
619 | 579 | * Checks if $property exists in the wiki or not |
620 | 580 | * @return bool |
621 | 581 | */ |
622 | | - protected static function validateProperty($property){ |
| 582 | + protected static function validateProperty( $property ) { |
623 | 583 | /* |
624 | 584 | * Curently there isn't a simple, back-end agnost way of searching for properties from |
625 | 585 | * SMWStore. We hence we check if $property has a corresponding page describing it. |
626 | 586 | */ |
627 | | - $prop= substr ($property, 1);//removing the leading '?' while checking. |
| 587 | + $prop = substr ( $property, 1 );// removing the leading '?' while checking. |
628 | 588 | $propertypage = Title::newFromText( $prop, SMW_NS_PROPERTY ); |
629 | | - if(is_a($propertypage, 'Title')){ |
630 | | - return($propertypage->exists()); |
| 589 | + if ( is_a( $propertypage, 'Title' ) ) { |
| 590 | + return( $propertypage->exists() ); |
631 | 591 | } else { |
632 | 592 | return false; |
633 | 593 | } |
— | — | @@ -638,7 +598,7 @@ |
639 | 599 | * |
640 | 600 | * @return string |
641 | 601 | */ |
642 | | - protected static function getDefaultResultPrinter(){ |
| 602 | + protected static function getDefaultResultPrinter() { |
643 | 603 | return 'broadtable'; |
644 | 604 | } |
645 | 605 | |