Changeset 23207 for extensions/ContactForm
- Timestamp:
- Jun 14, 2013, 3:10:07 PM (11 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin.php
r17483 r23207 17 17 include(CONTACT_FORM_PATH . 'admin/' . $page['tab'] . '.php'); 18 18 19 if (! count(get_contact_emails()))19 if (!$conf['ContactForm']['cf_ready']) 20 20 { 21 21 array_push($page['errors'], l10n('No active email address')); -
extensions/ContactForm/admin/emails.php
r18649 r23207 34 34 $emails 35 35 ); 36 37 $conf['ContactForm']['cf_ready'] = count($emails); 36 38 37 39 array_push($page['infos'], l10n('Information data registered in database')); -
extensions/ContactForm/include/contact_form.inc.php
r22665 r23207 4 4 global $template, $user, $conf, $page, $pwg_loaded_plugins; 5 5 6 if ( (!is_classic_user() and !$conf['ContactForm']['cf_allow_guest']) or ! count(get_contact_emails()))6 if ( (!is_classic_user() and !$conf['ContactForm']['cf_allow_guest']) or !$conf['ContactForm']['cf_ready'] ) 7 7 { 8 redirect(get_ root_url());8 redirect(get_absolute_root_url()); 9 9 } 10 10 -
extensions/ContactForm/include/functions.inc.php
r23206 r23207 48 48 if ( !$conf['ContactForm']['cf_menu_link'] ) return; 49 49 if ( !is_classic_user() and !$conf['ContactForm']['cf_allow_guest'] ) return; 50 if ( ! count(get_contact_emails())) return;50 if ( !$conf['ContactForm']['cf_ready'] ) return; 51 51 52 52 $menu = &$menu_ref_arr[0]; … … 65 65 function contact_form_footer_link($content, &$smarty) 66 66 { 67 global $conf; 68 if ( !$conf['ContactForm']['cf_ready'] ) return $content; 69 67 70 $search = '<a href="mailto:{$CONTACT_MAIL}?subject={\'A comment on your site\'|@translate|@escape:url}">'; 68 71 $replace = '<a href="'.CONTACT_FORM_PUBLIC.'">'; -
extensions/ContactForm/main.inc.php
r21208 r23207 42 42 function contact_form_init() 43 43 { 44 global $conf, $template, 44 global $conf, $template, $pwg_loaded_plugins; 45 45 46 46 if ( … … 79 79 } 80 80 81 $conf['ContactForm']['cf_ready'] = count(get_contact_emails()); 82 81 83 $template->set_prefilter('tail', 'contact_form_footer_link'); 82 84 }
Note: See TracChangeset
for help on using the changeset viewer.