Skip to content

Commit 9331282

Browse files
committed
Change from allowing from ip/host to just enable/disable on site basis.
1 parent 21a0b80 commit 9331282

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

AdLibWS.class.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
define('ADLIB_JOBTYPE_PDF', 0);
99
define('ADLIB_JOBTYPE_HTML', 1);
10-
define('ADLIB_DISABLED', !in_array($_SERVER['SERVER_NAME'], explode(',', variable_get('os2web_adlib_api_allowed_ip_host'))) && !in_array(ip_address(), explode(',', variable_get('os2web_adlib_api_allowed_ip_host'))));
10+
define('ADLIB_DISABLED', !variable_get('os2web_adlib_api_is_allowed', 0));
1111

1212

1313
/**

os2web_adlib_api.module

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ function os2web_adlib_api_form_os2web_settings_settings_form_alter(&$form, &$for
5555
'#title' => t('AdLib Configuration'),
5656
);
5757
$form['os2web_adlib_api_config_group']['os2web_adlib_api_allowed_ip_host'] = array(
58-
'#type' => 'textfield',
59-
'#title' => 'IP addresser der kan udløse AdLib konvertering',
60-
'#description' => 'Komma separeret liste af ip-addresser/servernavne der kan anvende AdLib. Husk AdLib kan køres fra admin og fra cron.',
61-
'#default_value' => variable_get('os2web_adlib_api_allowed_ip_host', ip_address()),
58+
'#type' => 'checkbox',
59+
'#title' => 'Enable AdLib conversion from this site!',
60+
'#default_value' => variable_get('os2web_adlib_api_is_allowed', 0),
6261
);
6362
}
6463

0 commit comments

Comments
 (0)