-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/fix' into dev
# Conflicts: # security-malware-firewall.php
- Loading branch information
Showing
6 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4596,7 +4596,11 @@ function spbc_sanitize_settings($settings) | |
} | ||
|
||
// Scanner custom start time logic | ||
if ( empty($spbc->errors['configuration']) && $spbc->settings['scanner__auto_start_manual_time']) { | ||
if ( | ||
empty($spbc->errors['configuration']) && | ||
$settings['scanner__auto_start_manual_time'] && | ||
$settings['scanner__auto_start_manual_time'] != $spbc->settings['scanner__auto_start_manual_time'] | ||
) { | ||
//if ( empty($spbc->errors['configuration']) ) { | ||
$scanner_launch_data = spbc_get_custom_scanner_launch_data(false, $settings); | ||
\CleantalkSP\SpbctWP\Cron::updateTask( | ||
|
@@ -5220,6 +5224,10 @@ function spbc_settings__get_description() | |
'title' => IP::getOptionLongDescriptionArray()['title'], | ||
'desc' => IP::getOptionLongDescriptionArray()['desc'], | ||
), | ||
'sending_for_analysis_rules' => array( | ||
'title' => 'Sending for cloud analysis', | ||
'desc' => spbc__get_accordion_tab_info_block_html('sending_for_analysis_rules'), | ||
), | ||
'no_description' => array( | ||
'title' => esc_html($setting_id), | ||
'desc' => __('No description provided yet for this item. We are sorry about this. Please, contact [email protected] for further help.', 'security-malware-firewall'), | ||
|
@@ -5736,7 +5744,7 @@ function spbc_get_next_scan_launch_time_text() | |
) { | ||
return sprintf( | ||
' ' . __('The next automatic scan is scheduled on %s %s.', 'security-malware-firewall'), | ||
date('M d Y H:i:s', $task['next_call']), | ||
date('M d Y H:i:s', $task['next_call'] + ((float)get_option('gmt_offset') * 3600)), | ||
spbc_wp_timezone_string() | ||
); | ||
} | ||
|
@@ -5828,7 +5836,7 @@ function spbc__get_accordion_tab_info_block_html($for) | |
%MAIN_TEXT% | ||
<ul style="list-style-type: circle; padding-left: 2%"> | ||
<li>%OPTION_1%</li> | ||
<li>%OPTION_2%</li> | ||
<li>%OPTION_2%<i setting="sending_for_analysis_rules" class="spbc_long_description__show spbc-icon-help-circled"></i></li> | ||
</ul> | ||
</div> | ||
'; | ||
|
@@ -5846,6 +5854,42 @@ function spbc__get_accordion_tab_info_block_html($for) | |
$info_block_out = $template; | ||
$classes = 'notice notice-info'; | ||
break; | ||
case 'sending_for_analysis_rules': | ||
$template = ' | ||
<div> | ||
<p>%MAIN_TEXT_1%</p> | ||
<p>%MAIN_TEXT_2%</p> | ||
<ul style="list-style-type: disc; padding-left: 5%"> | ||
<li>%OPTION_1%</li> | ||
<li>%OPTION_2%</li> | ||
<li>%OPTION_3%</li> | ||
</ul> | ||
<p>%MAIN_TEXT_3%</p> | ||
<ul style="list-style-type: disc; padding-left: 5%"> | ||
<li>%OPTION_4%</li> | ||
</ul> | ||
<p>%MAIN_TEXT_4%</p> | ||
</div> | ||
'; | ||
$main_text_1 = __('Send the file for cloud analysis. After the file is sent, the file is available in the tab "Analysis log". Read more about analysis results in the appropriate tab. ', 'security-malware-firewall'); | ||
$main_text_2 = __('The file sent for analysis must meet the following requirements:', 'security-malware-firewall'); | ||
$main_text_3 = __('For "Unknown" files category, file extension should be from the list of allowed extensions:', 'security-malware-firewall'); | ||
$main_text_4 = __('If any of requirements are not met, the action for file is not available.', 'security-malware-firewall'); | ||
$option1 = __('the file was not ever denied or approved by CleanTalk team', 'security-malware-firewall'); | ||
$option2 = __('the file sending is not already scheduled during common scan process', 'security-malware-firewall'); | ||
$option3 = __('the file size is larger than zero and less than 1Mb', 'security-malware-firewall'); | ||
$option4 = __('.php*, .html, .htm, .phtml, shtml, .phar, .odf', 'security-malware-firewall'); | ||
$template = str_replace('%MAIN_TEXT_1%', $main_text_1, $template); | ||
$template = str_replace('%MAIN_TEXT_2%', $main_text_2, $template); | ||
$template = str_replace('%MAIN_TEXT_3%', $main_text_3, $template); | ||
$template = str_replace('%MAIN_TEXT_4%', $main_text_4, $template); | ||
$template = str_replace('%OPTION_1%', $option1, $template); | ||
$template = str_replace('%OPTION_2%', $option2, $template); | ||
$template = str_replace('%OPTION_3%', $option3, $template); | ||
$template = str_replace('%OPTION_4%', $option4, $template); | ||
$info_block_out = Escape::escKsesPreset($template, 'spbc_settings__sending_for_analysis_rules'); | ||
$classes = ''; | ||
break; | ||
case 'skipped': | ||
$template = ' | ||
<div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters