Set default status to enabled (1) if settings are not saved yet
This commit is contained in:
parent
21eb446aba
commit
f2baf528ce
|
|
@ -12,7 +12,8 @@
|
|||
<search><![CDATA[if ($this->user->hasPermission('access', 'catalog/product')) {]]></search>
|
||||
<add position="before"><![CDATA[
|
||||
$this->load->model('setting/setting');
|
||||
if ($this->config->get('module_poll_widget_nat_status')) {
|
||||
$nat_status = $this->config->get('module_poll_widget_nat_status');
|
||||
if ($nat_status === null || $nat_status) {
|
||||
$nat_pos = $this->config->get('module_poll_widget_nat_menu_position');
|
||||
if (empty($nat_pos)) { $nat_pos = 'both'; }
|
||||
if ($nat_pos == 'sidebar' || $nat_pos == 'both') {
|
||||
|
|
@ -59,7 +60,8 @@
|
|||
$data['nat_menus'] = array();
|
||||
}
|
||||
$this->load->model('setting/setting');
|
||||
if ($this->config->get('module_poll_widget_nat_status')) {
|
||||
$nat_status = $this->config->get('module_poll_widget_nat_status');
|
||||
if ($nat_status === null || $nat_status) {
|
||||
$nat_pos = $this->config->get('module_poll_widget_nat_menu_position');
|
||||
if (empty($nat_pos)) { $nat_pos = 'both'; }
|
||||
if ($nat_pos == 'header' || $nat_pos == 'both') {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -114,6 +114,10 @@ class ControllerModulePollWidgetNat extends Controller {
|
|||
$data['module_poll_widget_nat_status'] = $this->config->get('module_poll_widget_nat_status');
|
||||
}
|
||||
|
||||
if ($data['module_poll_widget_nat_status'] === null) {
|
||||
$data['module_poll_widget_nat_status'] = 1;
|
||||
}
|
||||
|
||||
if (isset($this->request->post['module_poll_widget_nat_license'])) {
|
||||
$data['module_poll_widget_nat_license'] = $this->request->post['module_poll_widget_nat_license'];
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue