update
This commit is contained in:
@@ -104,6 +104,7 @@ class Clients
|
||||
$google_ads_customer_id = trim( \S::get( 'google_ads_customer_id' ) );
|
||||
$google_merchant_account_id = trim( \S::get( 'google_merchant_account_id' ) );
|
||||
$facebook_ads_account_id = self::normalize_facebook_ads_account_id( \S::get( 'facebook_ads_account_id' ) );
|
||||
$xml_feed_url = trim( \S::get( 'xml_feed_url' ) );
|
||||
$active_raw = \S::get( 'active' );
|
||||
$active = (string) $active_raw === '0' ? 0 : 1;
|
||||
|
||||
@@ -114,6 +115,13 @@ class Clients
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $xml_feed_url !== '' && !filter_var( $xml_feed_url, FILTER_VALIDATE_URL ) )
|
||||
{
|
||||
\S::alert( 'Niepoprawny URL feedu XML.' );
|
||||
header( 'Location: /clients' );
|
||||
exit;
|
||||
}
|
||||
|
||||
$google_ads_start_date = trim( \S::get( 'google_ads_start_date' ) );
|
||||
|
||||
$data = [
|
||||
@@ -121,6 +129,7 @@ class Clients
|
||||
'google_ads_customer_id' => $google_ads_customer_id ?: null,
|
||||
'google_merchant_account_id' => $google_merchant_account_id ?: null,
|
||||
'facebook_ads_account_id' => $facebook_ads_account_id,
|
||||
'xml_feed_url' => $xml_feed_url ?: null,
|
||||
'google_ads_start_date' => $google_ads_start_date ?: null,
|
||||
'active' => $active,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user