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

@@ -61,21 +61,21 @@ class GlobelusCron
{
global $mdb;
$results = $mdb -> query( 'SELECT id, title FROM globelus_adverts WHERE title_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC );
$results = $mdb -> query( 'SELECT id, title FROM globelus_adverts WHERE title_nopl IS NULL OR title_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC );
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$mdb -> update( 'globelus_adverts', [ 'title_nopl' => \S::seo( $row['title'], true ) ], [ 'id' => $row['id'] ] );
echo( '<p>Generuje wartość nopl - ogłoszenia.</p>' );
}
$results = $mdb -> query( 'SELECT id, firm_name_profile FROM globelus_firms_data WHERE firm_name_profile_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC );
$results = $mdb -> query( 'SELECT id, firm_name_profile FROM globelus_firms_data WHERE firm_name_profile_nopl IS NULL OR firm_name_profile_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC );
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$mdb -> update( 'globelus_firms_data', [ 'firm_name_profile_nopl' => \S::seo( $row['firm_name_profile'], true ) ], [ 'id' => $row['id'] ] );
echo( '<p>Generuje wartość nopl - firmy.</p>' );
}
$results = $mdb -> query( 'SELECT id, text FROM globelus_adverts WHERE text_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC );
$results = $mdb -> query( 'SELECT id, text FROM globelus_adverts WHERE text_nopl IS NULL OR text_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC );
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$mdb -> update( 'globelus_adverts', [ 'text_nopl' => \S::seo( $row['text'], true ) ], [ 'id' => $row['id'] ] );
@@ -89,7 +89,7 @@ class GlobelusCron
echo( '<p>Generuje wartość nopl - kraje.</p>' );
}
$results = $mdb -> query( 'SELECT id, city FROM globelus_adverts WHERE city_nopl IS NULL' ) -> fetchAll( \PDO::FETCH_ASSOC );
$results = $mdb -> query( 'SELECT id, city FROM globelus_adverts WHERE city_nopl IS NULL OR city_nopl = \'\'' ) -> fetchAll( \PDO::FETCH_ASSOC );
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$mdb -> update( 'globelus_adverts', [ 'city_nopl' => \S::seo( $row['city'], true ) ], [ 'id' => $row['id'] ] );