Changeset 1478382
- Timestamp:
- 08/19/2016 04:05:20 AM (10 years ago)
- Location:
- safly-cloud-protection/trunk
- Files:
-
- 2 edited
-
options.php (modified) (4 diffs)
-
wrapper.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
safly-cloud-protection/trunk/options.php
r1477791 r1478382 19 19 } 20 20 21 //Notice22 SaFly_Options_Update_Notice();23 24 21 global $safly_api_domain, $safly_api_key, $safly_api_server_url, $safly_ip_getenv; 25 22 global $safly_options_tmp, $safly_options, $safly_time_lag; 26 23 global $safly_ip, $safly_level, $saflysalt, $saflysign; 27 24 global $SaFly_Options_Update_Notice; 25 //Update Notice 26 if (!empty($SaFly_Options_Update_Notice)) { 27 echo $SaFly_Options_Update_Notice; 28 } 28 29 /* SaFly Global Setting */ 29 30 … … 151 152 </p> 152 153 '; 153 }154 155 function SaFly_Options_Update_Notice()156 {157 if (isset($_POST['saflysave']) || isset($_POST['saflyreset'])) {158 //Notice159 ob_start();160 $location = base64_decode(SaFly_Current_URL()) . '&saflynotice=on';161 header("location:$location");162 }163 if (isset($_GET['saflynotice'])) {164 echo '<div class="updated"><p>Settings updated successfully!</p></div>';165 }166 154 } 167 155 … … 280 268 SaFly_Activated(); 281 269 } 270 //Notice 271 SaFly_Options_Update_Notice(); 272 282 273 /* SaFly Dashboard */ 283 274 add_action('admin_menu', 'safly_plugin_menu_page'); … … 285 276 } 286 277 278 function SaFly_Options_Update_Notice() 279 { 280 global $SaFly_Options_Update_Notice; 281 if (isset($_POST['saflysave']) || isset($_POST['saflyreset'])) { 282 //Notice 283 ob_start(); 284 $location = base64_decode(SaFly_Current_URL()) . '&saflynotice=on'; 285 header("location: $location"); 286 ob_end_flush(); 287 exit; 288 } 289 if (isset($_GET['saflynotice'])) { 290 $SaFly_Options_Update_Notice = '<div class="updated"><p>Settings updated successfully!</p></div>'; 291 } 292 } 293 287 294 add_action('init', 'safly_load_options'); 288 295 -
safly-cloud-protection/trunk/wrapper.php
r1478376 r1478382 220 220 function SaFly_API_Key_VALIDATE($api_key) 221 221 { 222 if (! preg_match('/^(\w){32}$/', $api_key)) {223 wp_die(' Only letters and numbers are available.', 'SaFly Cloud Protection');222 if (!empty($api_key) && !preg_match('/^(\w){32}$/', $api_key)) { 223 wp_die('Invalid API KEY.', 'SaFly Cloud Protection'); 224 224 } 225 225 }
Note: See TracChangeset
for help on using the changeset viewer.