Changeset 82592 in spip-zone
- Timestamp:
- May 19, 2014, 8:06:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/indexer/trunk/iterateur/sphinx.php
r82591 r82592 106 106 'facet' => array(), 107 107 108 'select_filter' => [],108 'select_filter' => array(), 109 109 ); 110 110 … … 353 353 if (is_string($valeur)) { 354 354 $valeur = trim($valeur); 355 $valeurs = [$valeur];355 $valeurs = array($valeur); 356 356 } else { 357 357 $valeurs = $valeur; … … 363 363 } 364 364 365 $filter += [365 $filter += array( 366 366 'select_oui' => '', 367 367 'select_null' => '', 368 ];368 ); 369 369 370 370 // préparer les données … … 380 380 381 381 // remplacer d'abord le pluriel ! 382 $f = str_replace( ['@valeurs', '@valeur'], [$valeurs, $valeur], $f);382 $f = str_replace(array('@valeurs', '@valeur'), array($valeurs, $valeur), $f); 383 383 $this->queryApi->select("($f) AS f$nb"); 384 384 $this->queryApi->where("f$nb = 1"); … … 451 451 $boucle = &$boucles[$idb]; 452 452 // critere unique 453 $boucle->hash .= "\n\t" . '$command[\'index\'] =[];';453 $boucle->hash .= "\n\t" . '$command[\'index\'] = array();'; 454 454 455 455 foreach ($crit->param as $param){ … … 467 467 $boucle = &$boucles[$idb]; 468 468 // critere unique 469 $boucle->hash .= "\n\t" . '$command[\'recherche\'] =[];';469 $boucle->hash .= "\n\t" . '$command[\'recherche\'] = array();'; 470 470 471 471 foreach ($crit->param as $param){ … … 485 485 $boucle = &$boucles[$idb]; 486 486 // critere multiple 487 $boucle->hash .= "\n\tif (!isset(\$select_init)) { \$command['selection'] = []; \$select_init = true; }\n";487 $boucle->hash .= "\n\tif (!isset(\$select_init)) { \$command['selection'] = array(); \$select_init = true; }\n"; 488 488 489 489 foreach ($crit->param as $param){ … … 504 504 $boucle = &$boucles[$idb]; 505 505 // critere multiple 506 $boucle->hash .= "\n\tif (!isset(\$snippet_init)) { \$command['snippet'] = []; \$snippet_init = true; }\n";506 $boucle->hash .= "\n\tif (!isset(\$snippet_init)) { \$command['snippet'] = array(); \$snippet_init = true; }\n"; 507 507 508 508 $boucle->hash .= "\t\$command['snippet'][] = [\n" … … 526 526 $boucle = &$boucles[$idb]; 527 527 // critere multiple 528 $boucle->hash .= "\n\tif (!isset(\$facet_init)) { \$command['facet'] = []; \$facet_init = true; }\n";528 $boucle->hash .= "\n\tif (!isset(\$facet_init)) { \$command['facet'] = array(); \$facet_init = true; }\n"; 529 529 530 530 $boucle->hash .= "\t\$command['facet'][] = [\n" … … 546 546 $boucle = &$boucles[$idb]; 547 547 // critere multiple 548 $boucle->hash .= "\n\tif (!isset(\$sfilter_init)) { \$command['select_filter'] = []; \$sfilter_init = true; }\n";548 $boucle->hash .= "\n\tif (!isset(\$sfilter_init)) { \$command['select_filter'] = array(); \$sfilter_init = true; }\n"; 549 549 550 550 $boucle->hash .= "\t\$command['select_filter'][] = [\n"
Note: See TracChangeset
for help on using the changeset viewer.