Index: branches/5.3.x/admin_templates/topics/review_edit.tpl =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/admin_templates/topics/review_edit.tpl (.../review_edit.tpl) (revision 15490) +++ branches/5.3.x/admin_templates/topics/review_edit.tpl (.../review_edit.tpl) (revision 15670) @@ -1,3 +1,5 @@ + + Index: branches/5.3.x/admin_templates/topics/images_edit.tpl =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/admin_templates/topics/images_edit.tpl (.../images_edit.tpl) (revision 15490) +++ branches/5.3.x/admin_templates/topics/images_edit.tpl (.../images_edit.tpl) (revision 15670) @@ -1,3 +1,5 @@ + + @@ -32,7 +34,7 @@ )); a_toolbar.Render(); - + a_toolbar.HideButton('prev'); a_toolbar.HideButton('next'); @@ -44,7 +46,7 @@ a_toolbar.DisableButton('prev'); - + Index: branches/5.3.x/units/polls/polls_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/polls/polls_config.php (.../polls_config.php) (revision 15655) +++ branches/5.3.x/units/polls/polls_config.php (.../polls_config.php) (revision 15670) @@ -1,6 +1,6 @@ 'string', 'formatter' => 'kPictureFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/', - 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', + 'file_types' => '*.jpg;*.jpeg;*.gif;*.png;*.bmp', 'files_description' => '!la_hint_ImageFiles!', 'multiple' => false, 'thumb_format' => 'resize:200x200', 'max_len' => 255, 'not_null' => 1, 'default' => '' ), Index: branches/5.3.x/units/poll_comments/poll_comments_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 15655) +++ branches/5.3.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 15670) @@ -1,6 +1,6 @@ Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'AnswerId' => Array ('type' => 'int', 'default' => NULL), - 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', - 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', - 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', - 'required' => 1, 'default' => NULL), + 'CreatedById' => Array ( + 'type' => 'int', + 'formatter'=>'kLEFTFormatter', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', + 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, + 'required' => 1, 'default' => NULL + ), 'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'GuestEmail' => Array ('type' => 'string', 'max_len' => 255, 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'),'required' => 0 ), 'CommentBody' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL, 'required' => 1), @@ -82,7 +85,7 @@ 'CalculatedFields' => Array ( '' => Array ( - 'CommentedByUser' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )', + 'CommentedByUser' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), IF(pu.Username = "", pu.Email, pu.Username))', ), ), Index: branches/5.3.x/admin_templates/topics/relations_edit.tpl =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/admin_templates/topics/relations_edit.tpl (.../relations_edit.tpl) (revision 15490) +++ branches/5.3.x/admin_templates/topics/relations_edit.tpl (.../relations_edit.tpl) (revision 15670) @@ -1,3 +1,5 @@ + + @@ -30,7 +32,7 @@ )); a_toolbar.Render(); - + a_toolbar.HideButton('prev'); a_toolbar.HideButton('next'); Index: branches/5.3.x/units/posts/posts_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/posts/posts_config.php (.../posts_config.php) (revision 15655) +++ branches/5.3.x/units/posts/posts_config.php (.../posts_config.php) (revision 15670) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), IF(u.Username = "", u.Email, u.Username))', 'AltName' => 'img.AltName', 'SameImages' => 'img.SameImages', Index: branches/5.3.x/install/upgrades.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15490) +++ branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15670) @@ -1,6 +1,6 @@ Array ('Core' => '5.2.0-B3'), '5.2.0-RC1' => Array ('Core' => '5.2.0-RC1'), '5.2.0' => Array ('Core' => '5.2.0'), + '5.2.1-B1' => Array ('Core' => '5.2.1-B1'), ); } Index: branches/5.3.x/admin_templates/img/toolbar/toolbar-sprite.png =================================================================== diff -u -N -r15490 -r15670 Binary files differ Index: branches/5.3.x/units/topics/topics_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15655) +++ branches/5.3.x/units/topics/topics_config.php (.../topics_config.php) (revision 15670) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), IF(u.Username = "", u.Email, u.Username))', 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', 'CategoryFilename' => TABLE_PREFIX.'Categories.NamedParentPath', @@ -396,21 +396,17 @@ 'type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users - WHERE `%s` = \'%s\' ', - 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Username', + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', + 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, ), 'ModifiedById' => Array ( 'type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), - 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users - WHERE `%s` = \'%s\' ', - 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Username', + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE %s', + 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'default' => NULL, ), Index: branches/5.3.x/units/private_messages/private_messages_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 15655) +++ branches/5.3.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 15670) @@ -1,6 +1,6 @@ 'pmb.Body', 'Options' => 'pmb.Options', - 'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Username)', - 'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Username)', + 'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), IF(from_user.Username = "", from_user.Email, from_user.Username))', + 'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), IF(to_user.Username = "", to_user.Email, to_user.Username))', 'FromFullName' => 'TRIM(CONCAT(from_user.FirstName, " ", from_user.LastName))', 'ToFullName' => 'TRIM(CONCAT(to_user.FirstName, " ", to_user.LastName))', @@ -78,8 +78,8 @@ 'Fields' => Array ( 'PmId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FromId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), - 'ToId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), + 'FromId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' => 1, 'default' => null), + 'ToId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Users WHERE %s', 'left_key_field' => 'PortalUserId', 'left_title_field' => USER_TITLE_FIELD, 'required' => 1, 'default' => null), 'FolderId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_Inbox', 1 => 'lu_Sent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => PM_FOLDER_SENT), 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_opt_MessageUnread', 1 => 'lu_opt_MessageViewed', 2 => 'lu_opt_MessageRead', 3 => 'lu_opt_MessageReplied', 4 => 'lu_opt_MessageSent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), Index: branches/5.3.x/units/emoticons/emoticons_config.php =================================================================== diff -u -N -r15655 -r15670 --- branches/5.3.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 15655) +++ branches/5.3.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 15670) @@ -1,6 +1,6 @@ Array ( 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg'), + 'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg', 'image/bmp', 'image/x-ms-bmp'), 'upload_dir' => SMILEYS_PATH, 'not_null' => 1, 'required' => 1, 'default' => '', ), Index: branches/5.3.x/admin_templates/topics/topics_edit.tpl =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/admin_templates/topics/topics_edit.tpl (.../topics_edit.tpl) (revision 15490) +++ branches/5.3.x/admin_templates/topics/topics_edit.tpl (.../topics_edit.tpl) (revision 15670) @@ -63,7 +63,7 @@ - + Index: branches/5.3.x/units/private_messages/private_message_eh.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/private_messages/private_message_eh.php (.../private_message_eh.php) (revision 15490) +++ branches/5.3.x/units/private_messages/private_message_eh.php (.../private_message_eh.php) (revision 15670) @@ -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.3.x/install/install_data.sql =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/install/install_data.sql (.../install_data.sql) (revision 15490) +++ branches/5.3.x/install/install_data.sql (.../install_data.sql) (revision 15670) @@ -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.3.x/admin_templates/polls/poll_edit.tpl =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/admin_templates/polls/poll_edit.tpl (.../poll_edit.tpl) (revision 15490) +++ branches/5.3.x/admin_templates/polls/poll_edit.tpl (.../poll_edit.tpl) (revision 15670) @@ -86,7 +86,7 @@ - + Index: branches/5.3.x/units/polls/poll_tp.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/polls/poll_tp.php (.../poll_tp.php) (revision 15490) +++ branches/5.3.x/units/polls/poll_tp.php (.../poll_tp.php) (revision 15670) @@ -1,6 +1,6 @@ getObject($params); /* @var $object kDBItem */ - if (!$object->GetDBField('AllowMultipleVotings')) { + if ( !$object->GetDBField('AllowMultipleVotings') ) { + $where_clause = Array ( + 'PollId = ' . $object->GetID(), + 'CreatedById = ' . $this->Application->RecallVar('user_id'), + 'UserIP = ' . $this->Conn->qstr($this->Application->getClientIp()), + ); + $sql = 'SELECT StatisticsId - FROM '.TABLE_PREFIX.'PollsStatistics - WHERE PollId = '.$object->GetID().' AND CreatedById = '.$this->Application->RecallVar('user_id').' AND UserIP = '.$this->Conn->qstr(getenv('REMOTE_ADDR')); + FROM ' . TABLE_PREFIX . 'PollsStatistics + WHERE (' . implode(') AND (', $where_clause) . ')'; + return $this->Conn->GetOne($sql) > 0; } Index: branches/5.3.x/units/helpers/post_helper.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/helpers/post_helper.php (.../post_helper.php) (revision 15490) +++ branches/5.3.x/units/helpers/post_helper.php (.../post_helper.php) (revision 15670) @@ -1,6 +1,6 @@ CensorText($post_body); @@ -441,15 +441,15 @@ $category_id = isset($arguments[0]) ? $arguments[0] : $this->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.3.x/units/posts/post_eh.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/posts/post_eh.php (.../post_eh.php) (revision 15490) +++ branches/5.3.x/units/posts/post_eh.php (.../post_eh.php) (revision 15670) @@ -1,6 +1,6 @@ SetDBField('Modified_date', $now); $object->SetDBField('Modified_time', $now); - $object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']); + $object->SetDBField('IPAddress', $this->Application->getClientIp()); $sql = 'SELECT Username FROM ' . TABLE_PREFIX . 'Users @@ -154,7 +154,7 @@ { parent::OnAfterItemUpdate($event); - $this->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); Index: branches/5.3.x/install/upgrades.sql =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15490) +++ branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15670) @@ -264,3 +264,5 @@ # ===== v 5.2.0 ===== INSERT INTO Permissions VALUES(DEFAULT, 'in-bulletin:configuration_output.add', 11, 1, 1, 0); + +# ===== v 5.2.1-B1 ===== Index: branches/5.3.x/units/poll_comments/poll_comment_eh.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/poll_comments/poll_comment_eh.php (.../poll_comment_eh.php) (revision 15490) +++ branches/5.3.x/units/poll_comments/poll_comment_eh.php (.../poll_comment_eh.php) (revision 15670) @@ -1,6 +1,6 @@ SetDBField('CreatedById', $this->Application->RecallVar('user_id')); - $object->SetDBField('UserIP', $_SERVER['REMOTE_ADDR']); + $object->SetDBField('UserIP', $this->Application->getClientIp()); $object->SetDBField('Status', STATUS_ACTIVE); } Index: branches/5.3.x/units/polls/poll_eh.php =================================================================== diff -u -N -r15490 -r15670 --- branches/5.3.x/units/polls/poll_eh.php (.../poll_eh.php) (revision 15490) +++ branches/5.3.x/units/polls/poll_eh.php (.../poll_eh.php) (revision 15670) @@ -1,6 +1,6 @@ Application->getClientIp(); if (!$object->GetDBField('AllowMultipleVotings')) { $sql = 'SELECT StatisticsId