update
This commit is contained in:
@@ -331,14 +331,24 @@ class GlobelusAdverts
|
||||
if ( $values['keyword'] )
|
||||
$filtr .= 'AND ( '
|
||||
. 'title_nopl LIKE :title_nopl '
|
||||
. 'OR '
|
||||
. 'title LIKE :title '
|
||||
. 'OR '
|
||||
. 'firm_name_profile_nopl LIKE :firm_name_profile_nopl '
|
||||
. 'OR '
|
||||
. 'firm_name_profile LIKE :firm_name_profile '
|
||||
. 'OR '
|
||||
. 'text_nopl LIKE :text_nopl '
|
||||
. 'OR '
|
||||
. 'text LIKE :text '
|
||||
. 'OR '
|
||||
. 'country_nopl LIKE :country_nopl '
|
||||
. 'OR '
|
||||
. 'country LIKE :country '
|
||||
. 'OR '
|
||||
. 'city_nopl LIKE :city_nopl '
|
||||
. 'OR '
|
||||
. 'city LIKE :city '
|
||||
. ') ';
|
||||
|
||||
if ( is_array( $values['countries'] ) and count( $values['countries'] ) == 1 and $values['countries'][0] == 75 )
|
||||
@@ -453,7 +463,12 @@ class GlobelusAdverts
|
||||
':title_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':text_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':country_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%'
|
||||
':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':title' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':firm_name_profile' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':text' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':country' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':city' => '%' . trim( (string)$values['keyword'] ) . '%'
|
||||
] ) -> fetch();
|
||||
}
|
||||
catch ( \Throwable $t )
|
||||
@@ -493,14 +508,24 @@ class GlobelusAdverts
|
||||
if ( $values['keyword'] )
|
||||
$filtr .= 'AND ( '
|
||||
. 'title_nopl LIKE :title_nopl '
|
||||
. 'OR '
|
||||
. 'title LIKE :title '
|
||||
. 'OR '
|
||||
. 'firm_name_profile_nopl LIKE :firm_name_profile_nopl '
|
||||
. 'OR '
|
||||
. 'firm_name_profile LIKE :firm_name_profile '
|
||||
. 'OR '
|
||||
. 'text_nopl LIKE :text_nopl '
|
||||
. 'OR '
|
||||
. 'text LIKE :text '
|
||||
. 'OR '
|
||||
. 'country_nopl LIKE :country_nopl '
|
||||
. 'OR '
|
||||
. 'country LIKE :country '
|
||||
. 'OR '
|
||||
. 'city_nopl LIKE :city_nopl '
|
||||
. 'OR '
|
||||
. 'city LIKE :city '
|
||||
. ') ';
|
||||
|
||||
if ( is_array( $values['countries'] ) and count( $values['countries'] ) == 1 and $values['countries'][0] == 75 )
|
||||
@@ -616,7 +641,12 @@ class GlobelusAdverts
|
||||
':firm_name_profile_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':text_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':country_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
'city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%'
|
||||
':city_nopl' => '%' . \S::seo( $values['keyword'], true ) . '%',
|
||||
':title' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':firm_name_profile' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':text' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':country' => '%' . trim( (string)$values['keyword'] ) . '%',
|
||||
':city' => '%' . trim( (string)$values['keyword'] ) . '%'
|
||||
] ) -> fetchAll( \PDO::FETCH_ASSOC );
|
||||
}
|
||||
catch ( \Throwable $t )
|
||||
@@ -654,4 +684,4 @@ class GlobelusAdverts
|
||||
global $mdb;
|
||||
return $mdb -> select( 'globelus_adverts_categories', [ 'id', 'name' ], [ 'ORDER' => [ 'name' => 'ASC' ] ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user