Changeset 25358 for trunk/include
- Timestamp:
- Nov 6, 2013, 5:21:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_mail.inc.php
r25357 r25358 308 308 * current user (if admin) is excluded 309 309 * @see pwg_mail() 310 * @since 2.6 310 311 * 311 312 * @param array $args - as in pwg_mail() … … 583 584 // key compose of indexes witch allow to cache mail data 584 585 $cache_key = $content_type.'-'.$lang_info['code']; 585 $cache_key.= '-'.crc32(@$args['mail_title'] . @$args['mail_subtitle']); // TODO: find a way to not cache by mail_title586 586 587 587 if (!isset($conf_mail[$cache_key])) … … 606 606 'CONTENT_ENCODING' => get_pwg_charset(), 607 607 'CONTACT_MAIL' => $conf_mail['email_webmaster'], 608 'MAIL_TITLE' => $args['mail_title'],609 'MAIL_SUBTITLE' => $args['mail_subtitle'],610 608 ) 611 609 ); … … 625 623 } 626 624 } 627 628 $conf_mail[$cache_key]['header'] = $template->parse('mail_header', true); 629 $conf_mail[$cache_key]['footer'] = $template->parse('mail_footer', true); 630 } 625 } 626 627 $template = &$conf_mail[$cache_key]['theme']; 628 $template->assign( 629 array( 630 'MAIL_TITLE' => $args['mail_title'], 631 'MAIL_SUBTITLE' => $args['mail_subtitle'], 632 ) 633 ); 631 634 632 635 // Header 633 $contents[$content_type] = $ conf_mail[$cache_key]['header'];636 $contents[$content_type] = $template->parse('mail_header', true); 634 637 635 638 // Content … … 663 666 if (isset($tpl['filename'])) 664 667 { 665 $template = &$conf_mail[$cache_key]['theme'];666 668 if (isset($tpl['dirname'])) 667 669 { … … 689 691 690 692 // Footer 691 $contents[$content_type].= $ conf_mail[$cache_key]['footer'];693 $contents[$content_type].= $template->parse('mail_footer', true); 692 694 } 693 695 … … 796 798 797 799 $e = new Emogrifier($content); 798 $e->preserveStyleTag = true;800 // $e->preserveStyleTag = true; 799 801 return $e->emogrify(); 800 802 }
Note: See TracChangeset
for help on using the changeset viewer.