Index: branches/5.2.x/units/private_messages/private_message_eh.php =================================================================== diff -u -N -r15385 -r15604 --- branches/5.2.x/units/private_messages/private_message_eh.php (.../private_message_eh.php) (revision 15385) +++ branches/5.2.x/units/private_messages/private_message_eh.php (.../private_message_eh.php) (revision 15604) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ - $this->Application->EmailEventUser('PM.ADD', $object->GetDBField('ToId')); + $this->Application->emailUser('PM.ADD', $object->GetDBField('ToId')); if ( $object->GetDBField('FolderId') != PM_FOLDER_SENT ) { // 1. create message in sender's "Sent" folder (this method only for this step) Index: branches/5.2.x/install/install_data.sql =================================================================== diff -u -N -r15467 -r15604 --- branches/5.2.x/install/install_data.sql (.../install_data.sql) (revision 15467) +++ branches/5.2.x/install/install_data.sql (.../install_data.sql) (revision 15604) @@ -63,21 +63,21 @@ UPDATE Emoticon SET EmotionImage = CONCAT('0_',EmoticonId,'.gif'); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, 'In-Bulletin', 'Approve Topic', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 1, 'In-Bulletin', 'Post Added', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Post Modified', 1, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 0, 'In-Bulletin', 'Post Added', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PM.ADD', NULL, 1, 0, 'In-Bulletin', 'New Private Message', 0, 1, 1); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'POST.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Post Added (for subscribers)', 0, 1, 0, 'bb-post:OnCreate'); -INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'TOPIC.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Topic Added (for subscribers)', 0, 1, 0, 'bb:OnCreate'); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD', NULL, 1, 1, 'In-Bulletin', 'Topic Added', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.ADD.PENDING', NULL, 1, 1, 'In-Bulletin', 'Add Pending Topic', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Modify Topic', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.MODIFY.PENDING', NULL, 1, 1, 'In-Bulletin', 'Topic Modifications Pending', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'TOPIC.APPROVE', NULL, 1, 0, 'In-Bulletin', 'Approve Topic', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 1, 'In-Bulletin', 'Post Added', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.MODIFY', NULL, 1, 1, 'In-Bulletin', 'Post Modified', 1, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'POST.ADD', NULL, 1, 0, 'In-Bulletin', 'Post Added', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PM.ADD', NULL, 1, 0, 'In-Bulletin', 'New Private Message', 0, 1, 1); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'POST.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Post Added (for subscribers)', 0, 1, 0, 'bb-post:OnCreate'); +INSERT INTO EmailTemplates (TemplateId, TemplateName, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient, BindToSystemEvent) VALUES(DEFAULT, 'TOPIC.ADD.SUB', NULL, 1, 0, 'In-Bulletin', 'Topic Added (for subscribers)', 0, 1, 0, 'bb:OnCreate'); INSERT INTO ItemTypes VALUES (3, 'In-Bulletin', 'bb', 'Topic', 'TopicText', 'OwnerId', 'Views', 'CachedRating', 'la_ItemTab_Topics', 1, '', 'clsTopic', 'Topic'); INSERT INTO ItemTypes VALUES (30, 'In-Bulletin', 'posting', 'Posting', 'Subject', 'CreatedById', NULL, NULL, 'la_ItemTab_Posts', 0, '', '', 'Post'); Index: branches/5.2.x/units/helpers/post_helper.php =================================================================== diff -u -N -r15599 -r15604 --- branches/5.2.x/units/helpers/post_helper.php (.../post_helper.php) (revision 15599) +++ branches/5.2.x/units/helpers/post_helper.php (.../post_helper.php) (revision 15604) @@ -1,6 +1,6 @@ Application->GetVar('m_cat_id'); $fields_hash = Array ( - 'EmailEventId' => $manager->getEmailEventId('TOPIC.ADD.SUB'), + 'EmailTemplateId' => $manager->getEmailTemplateId('TOPIC.ADD.SUB'), 'UserId' => $user_id, 'CategoryId' => $category_id, ); break; case 'TopicPosts': $fields_hash = Array ( - 'EmailEventId' => $manager->getEmailEventId('POST.ADD.SUB'), + 'EmailTemplateId' => $manager->getEmailTemplateId('POST.ADD.SUB'), 'UserId' => $user_id, 'ParentItemId' => $arguments[0], ); Index: branches/5.2.x/units/posts/post_eh.php =================================================================== diff -u -N -r15567 -r15604 --- branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 15567) +++ branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 15604) @@ -1,6 +1,6 @@ Application->EmailEventAdmin('POST.MODIFY'); + $this->Application->emailAdmin('POST.MODIFY'); } /** @@ -237,15 +237,15 @@ $user_notified = false; // don't send POST.ADD event twice to same user (in case if owner adds new post) if ( $main_object->GetDBField('NotifyOwnerOnChanges') ) { $user_notified = $main_object->GetDBField('OwnerId'); - $this->Application->EmailEventUser('POST.ADD', $user_notified); + $this->Application->emailUser('POST.ADD', $user_notified); } $post_owner_id = $object->GetDBField('CreatedById'); if ( ($post_owner_id > 0) && ($user_notified != $post_owner_id) ) { - $this->Application->EmailEventUser('POST.ADD', $post_owner_id); + $this->Application->emailUser('POST.ADD', $post_owner_id); } - $this->Application->EmailEventAdmin('POST.ADD'); + $this->Application->emailAdmin('POST.ADD'); } $post_helper->updateTodayPostsCount($main_object, $object->GetDBField('CreatedOn'), +1);