This commit is contained in:
2026-04-25 16:55:49 +02:00
parent ae0681a016
commit 29b13ccc70
19 changed files with 248 additions and 14 deletions

View File

@@ -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' ] ] );
}
}
}