Changeset 25872 for extensions/ContactForm/admin/config.php
- Timestamp:
- Dec 9, 2013, 5:34:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin/config.php
r24348 r25872 5 5 if (isset($_POST['save_config'])) 6 6 { 7 $was_ready = $conf['ContactForm']['cf_ready']; 8 7 if ($_POST['cf_redirect_url']=='http://') 8 { 9 $_POST['cf_redirect_url'] = null; 10 } 11 else if (!empty($_POST['cf_redirect_url'])) 12 { 13 if (strpos($_POST['cf_redirect_url'], 'http') !== 0) 14 { 15 $_POST['cf_redirect_url'] = 'http://' . $_POST['cf_redirect_url']; 16 } 17 if (!url_check_format($_POST['cf_redirect_url'])) 18 { 19 $page['errors'][] = l10n('Invalid redirect URL'); 20 $_POST['cf_redirect_url'] = $conf['ContactForm']['cf_redirect_url']; 21 } 22 } 23 9 24 $conf['ContactForm'] = array( 10 25 'cf_must_initialize' => false, … … 16 31 'cf_mandatory_name' => isset($_POST['cf_mandatory_name']), 17 32 'cf_mail_type' => $_POST['cf_mail_type'], 18 'cf_redirect_url' => ($_POST['cf_redirect_url']!='http://') ? $_POST['cf_redirect_url'] : null, 19 'cf_theme' => $_POST['cf_theme'], 33 'cf_redirect_url' => $_POST['cf_redirect_url'], 20 34 ); 21 35 $conf['ContactForm_before'] = $_POST['cf_before']; 22 36 $conf['ContactForm_after'] = $_POST['cf_after']; 23 37 24 38 conf_update_param('ContactForm', serialize($conf['ContactForm'])); 25 39 conf_update_param('ContactForm_before', $conf['ContactForm_before']); 26 40 conf_update_param('ContactForm_after', $conf['ContactForm_after']); 27 28 $conf['ContactForm']['cf_ready'] = $was_ready; 29 30 array_push($page['infos'], l10n('Information data registered in database')); 41 42 $page['infos'][] = l10n('Information data registered in database'); 31 43 } 32 44 … … 40 52 41 53 $template->set_filename('contact_form', realpath(CONTACT_FORM_PATH . 'admin/template/config.tpl')); 42 43 ?>
Note: See TracChangeset
for help on using the changeset viewer.