PluginProbe
WebTotem Security / 3.0.2
WebTotem Security v3.0.2
3.0.2 3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 All 110 releases
← All changes | src/Common.php +9 -36 3.0.03.0.2 View file →
@@ -9,35 +9,18 @@
9 9
10 10 add_action('upgrader_process_complete', 'wt_security_upgrade_complete', 10, 2);
11 11 function wt_security_upgrade_complete($upgrader, $options)
12 12 {
13 - /**
14 - * Creating a marker file after updating the plugin.
15 - */
16 - if ($options['type'] === 'plugin' && $options['action'] === 'update' && $upgrader->result['destination_name'] == 'wt-security') {
17 - WebTotemAgentManager::generateMarkerFile();
18 - }
19 -
20 - /**
21 - * Check CVE list after install or update plugin.
22 - */
23 -// if ($options['type'] === 'plugin' && ($options['action'] === 'update' || $options['action'] === 'install')){
24 -// WebTotem::updateCveDataByPluginName($upgrader->new_plugin_data);
25 -// }
13 + /**
14 + * Creating a marker file after updating the plugin.
15 + */
16 + if ($options['type'] === 'plugin' && $options['action'] === 'update' && $upgrader->result['destination_name'] == 'wt-security') {
17 + WebTotemAgentManager::generateMarkerFile();
18 + }
26 19 }
27 20
28 -/**
29 - * Remove CVE from list after plugin delete.
30 - */
31 -add_action( 'deleted_plugin', 'wt_security_deleted_plugin_action', 10, 2 );
32 -function wt_security_deleted_plugin_action( $plugin_file, $deleted ){
33 - if($deleted){
34 - $slug = str_replace('.php', '', basename($plugin_file));
35 - if($slug != 'wt-security'){
36 - WebTotemDB::deleteData(['slug' => $slug], 'plugins_cve_list');
37 - }
38 - }
39 -}
21 +// WAF Include.
22 +WebTotemAgentManager::wafInclude();
40 23
41 24 if (defined('WEBTOTEM')) {
42 25
43 26 /**
@@ -105,9 +88,8 @@
105 88
106 89 function WtotemDailyCron()
107 90 {
108 91 WebTotemOption::setOptions(['scan_init' => 1]);
109 -// WebTotem::updateCveData();
110 92 }
111 93
112 94 /** Launch of the minute cron. */
113 95 if (WebTotemOption::getOption('scan_init')) {
@@ -142,25 +124,16 @@
142 124 * @return array List of sub-pages of this plugin.
143 125 */
144 126 function wtotemPages()
145 127 {
146 -// if (WebTotem::isMultiSite()) {
147 -// $pages['wtotem_all_sites'] = ['title' => __('All sites', 'wtotem'), 'slug' => 'wtotem'];
148 -// }
149 -// $slug = WebTotem::isMultiSite() ? 'wtotem_' : 'wtotem';
128 +
150 129 $slug = 'wtotem';
151 130
152 131 $pages['wtotem_dashboard'] = ['title' => __('Dashboard', 'wtotem'), 'slug' => $slug];
153 132 $pages['wtotem_open_paths'] = ['title' => __('Open paths', 'wtotem'), 'slug' => $slug];
154 133 $pages['wtotem_firewall'] = ['title' => __('Firewall', 'wtotem'), 'slug' => $slug];
155 -
156 -// if (!WebTotem::isMultiSite() or is_super_admin()) {
157 -// $pages['wtotem_antivirus'] = ['title' => __('Antivirus', 'wtotem'), 'slug' => $slug];
158 -// $pages['wtotem_settings'] = ['title' => __('Settings', 'wtotem'), 'slug' => $slug];
159 -// }
160 134 $pages['wtotem_antivirus'] = ['title' => __('Antivirus', 'wtotem'), 'slug' => $slug];
161 135 $pages['wtotem_settings'] = ['title' => __('Settings', 'wtotem'), 'slug' => $slug];
162 -// $pages['wtotem_reports'] = ['title' => __('Reports', 'wtotem'), 'slug' => $slug];
163 136 $pages['wtotem_documentation'] = ['title' => __('Documentation', 'wtotem'), 'slug' => 'wtotem'];
164 137 $pages['wtotem_wpscan'] = ['title' => __('WP scan', 'wtotem'), 'slug' => 'wtotem'];
165 138
166 139 return $pages;