Changeset 28882 for extensions/ContactForm/include/functions.inc.php
- Timestamp:
- Jul 1, 2014, 11:09:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/include/functions.inc.php
r28839 r28882 31 31 global $page; 32 32 33 if (isset($page['section']) and$page['section'] == 'contact')33 if (isset($page['section']) && $page['section'] == 'contact') 34 34 { 35 35 include(CONTACT_FORM_PATH . 'include/contact_form.inc.php'); … … 44 44 global $conf; 45 45 46 if (!$conf['ContactForm']['cf_menu_link']) return; 47 if (!is_classic_user() and !$conf['ContactForm']['cf_allow_guest']) return; 48 if (!$conf['ContactForm_ready']) return; 46 if (!$conf['ContactForm_ready'] || ( 47 !is_classic_user() && !$conf['ContactForm']['cf_allow_guest'] 48 )) 49 { 50 return; 51 } 49 52 50 53 $menu = &$menu_ref_arr[0]; 51 54 if (($block = $menu->get_block('mbMenu')) != null) 52 55 { 53 $block->data[ ] = array(56 $block->data['contact'] = array( 54 57 'URL' => CONTACT_FORM_PUBLIC, 55 58 'NAME' => l10n('Contact'), … … 63 66 function contact_form_footer_link($content, &$smarty) 64 67 { 65 $search = ' <a href="mailto:{$CONTACT_MAIL}?subject={\'A comment on your site\'|@translate|@escape:url}">';68 $search = '#<a href="mailto:{\\$CONTACT_MAIL}\\?subject={\'A comment on your site\'\\|@?translate\\|@?escape:url}">#'; 66 69 $replace = '<a href="{$CONTACT_FORM_PUBLIC}">'; 67 return str_replace($search, $replace, $content);70 return preg_replace($search, $replace, $content); 68 71 } 69 72
Note: See TracChangeset
for help on using the changeset viewer.