public $advanced = false;
private $score = null;
private $quick = false;
+ private $valid = true;
public function __construct($quick = false, PlFilterCondition $cond = null)
{
}
}
+ public function isValid()
+ {
+ return $this->valid;
+ }
+
/** Sets up the conditions for a Quick Search
* @param $conds Additional conds (as a PFC_And)
*/
$ufb = new UFB_QuickSearch();
if (!$ufb->isValid()) {
+ $this->valid = false;
return;
}
$ufb = new UFB_AdvancedSearch();
if (!$ufb->isValid()) {
+ $this->valid = false;
return;
}
parent::__construct($conds, $orders);
}
+ /** Add a "rechercher=Chercher" field to the query to simulate the POST
+ * behaviour.
+ */
+ public function args()
+ {
+ $args = parent::args();
+ if (!isset($args['rechercher'])) {
+ $args['rechercher'] = 'Chercher';
+ }
+ return $args;
+ }
+
protected function &getFilterResults(PlFilter &$pf, PlLimit $limit)
{
$profiles = $pf->getProfiles($limit, Profile::FETCH_MINIFICHES);