wrap a function in a check
This commit is contained in:
parent
adab29eefd
commit
8e43095c9f
@ -174,17 +174,19 @@ class PluginWonderful {
|
|||||||
|
|
||||||
function handle_action_save_widgets() {
|
function handle_action_save_widgets() {
|
||||||
$new_boxes = array();
|
$new_boxes = array();
|
||||||
foreach ($this->publisher_info->adboxes as $box) {
|
if ($this->publisher_info !== false) {
|
||||||
if (isset($_POST['pw']['center'][$box->adboxid])) {
|
foreach ($this->publisher_info->adboxes as $box) {
|
||||||
$this->adboxes_client->set_widget_centering($box->adboxid, true);
|
if (isset($_POST['pw']['center'][$box->adboxid])) {
|
||||||
$box->center_widget = "1";
|
$this->adboxes_client->set_widget_centering($box->adboxid, true);
|
||||||
} else {
|
$box->center_widget = "1";
|
||||||
$this->adboxes_client->set_widget_centering($box->adboxid, false);
|
} else {
|
||||||
$box->center_widget = "0";
|
$this->adboxes_client->set_widget_centering($box->adboxid, false);
|
||||||
}
|
$box->center_widget = "0";
|
||||||
$new_boxes[] = $box;
|
}
|
||||||
}
|
$new_boxes[] = $box;
|
||||||
$this->publisher_info->adboxes = $new_boxes;
|
}
|
||||||
|
$this->publisher_info->adboxes = $new_boxes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_action_change_adbox_settings() {
|
function handle_action_change_adbox_settings() {
|
||||||
|
Loading…
Reference in New Issue
Block a user