Changeset 2140 for trunk/admin
- Timestamp:
- Oct 16, 2007, 11:18:11 PM (17 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r1916 r2140 530 530 531 531 // info by email to an access granted group of category informations 532 if (isset($_POST['submitEmail']) )532 if (isset($_POST['submitEmail']) and !empty($_POST['group'])) 533 533 { 534 534 set_make_full_url(); … … 641 641 { 642 642 $template->assign_block_vars( 643 'group_ option',643 'group_mail.group_option', 644 644 array( 645 645 'VALUE' => $row['id'], -
trunk/admin/notification_by_mail.php
r2136 r2140 211 211 212 212 /* 213 * Apply global functions to mail content 214 * return customize mail content rendered 215 */ 216 function render_global_customize_mail_content($customize_mail_content) 217 { 218 global $conf; 219 220 if ($conf['nbm_send_html_mail'] and !(strpos($customize_mail_content, '<') === 0)) 221 { 222 // On HTML mail, detects if the content are HTML format. 223 // If it's plain text format, convert content to readable HTML 224 return nl2br(htmlspecialchars($customize_mail_content)); 225 } 226 else 227 { 228 return $customize_mail_content; 229 } 230 } 231 232 /* 213 233 * Send mail for notification to all users 214 234 * Return list of "selected" users for 'list_to_send' … … 244 264 } 245 265 246 if ($conf['nbm_send_html_mail'] and !(strpos($customize_mail_content, '<') === 0)) 247 { 248 // On HTML mail, detects if the content are HTML format. 249 // If it's plain text format, convert content to readable HTML 250 $customize_mail_content = nl2br(htmlspecialchars($customize_mail_content)); 251 } 266 $customize_mail_content = 267 trigger_event('nbm_render_global_customize_mail_content', $customize_mail_content); 268 252 269 253 270 // Prepare message after change language … … 344 361 } 345 362 346 if (!empty($customize_mail_content)) 363 $nbm_user_customize_mail_content = 364 trigger_event('nbm_render_user_customize_mail_content', 365 $customize_mail_content, $nbm_user); 366 if (!empty($nbm_user_customize_mail_content)) 347 367 { 348 368 $env_nbm['mail_template']->assign_block_vars 349 369 ( 350 'custom', array('CUSTOMIZE_MAIL_CONTENT' => $customize_mail_content) 370 'custom', 371 array('CUSTOMIZE_MAIL_CONTENT' => 372 $nbm_user_customize_mail_content) 351 373 ); 352 374 } … … 481 503 // +-----------------------------------------------------------------------+ 482 504 check_status(get_tab_status($page['mode'])); 505 506 507 // +-----------------------------------------------------------------------+ 508 // | Add event handler | 509 // +-----------------------------------------------------------------------+ 510 add_event_handler('nbm_render_global_customize_mail_content', 'render_global_customize_mail_content'); 511 trigger_action('nbm_event_handler_added'); 512 483 513 484 514 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.