Skip to content

Commit

Permalink
Fix bug where disabling Static CDN Filters did not update htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Jun 27, 2016
1 parent 4ec5801 commit bb3bae0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/includes/classes/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,16 @@ protected function saveOptions($args)
unset($args['last_pro_update_check']); // CANNOT be imported!
unset($args['last_pro_stats_log']); // CANNOT be imported!
}
/*[pro strip-from="lite"]*/
// Auto-enable `htaccess_access_control_allow_origin` option only when Static CDN Filters are being enabled
if (IS_PRO && $this->plugin->options['enable'] && !$this->plugin->options['cdn_enable'] && $args['cdn_enable']) {
if ($this->plugin->options['enable'] && !$this->plugin->options['cdn_enable'] && $args['cdn_enable']) {
$args['htaccess_access_control_allow_origin'] = 1;
}
// Auto-disable `htaccess_access_control_allow_origin` option only when Static CDN Filters are being disabled
if ($this->plugin->options['enable'] && !$args['cdn_enable']) {
$args['htaccess_access_control_allow_origin'] = 0;
}
/*[/pro]*/
$args = $this->plugin->trimDeep(stripslashes_deep((array) $args));
$this->plugin->updateOptions($args); // Save/update options.

Expand Down

0 comments on commit bb3bae0

Please sign in to comment.