@@ -99,7 +99,7 @@ protected override void OnInit(EventArgs e)
99
99
{
100
100
if ( ! _canEdit && ( Request . Params [ ParamKeys . action ] . ToLowerInvariant ( ) == PostActions . TopicEdit || Request . Params [ ParamKeys . action ] . ToLowerInvariant ( ) == PostActions . ReplyEdit ) )
101
101
Response . Redirect ( NavigateUrl ( TabId ) ) ;
102
- }
102
+ }
103
103
104
104
if ( CanCreate == false && CanReply == false )
105
105
Response . Redirect ( NavigateUrl ( TabId , "" , "ctl=login" ) + "?returnurl=" + Server . UrlEncode ( Request . RawUrl ) ) ;
@@ -819,28 +819,18 @@ private void SaveTopic()
819
819
DataCache . CacheClearPrefix ( ForumModuleId , string . Format ( CacheKeys . TopicsViewPrefix , ForumModuleId ) ) ;
820
820
DataCache . CacheClearPrefix ( ForumModuleId , string . Format ( CacheKeys . ForumViewPrefix , ForumModuleId ) ) ;
821
821
822
- if ( ti . IsApproved == false )
822
+ if ( ! ti . IsApproved )
823
823
{
824
824
DotNetNuke . Modules . ActiveForums . Controllers . TopicController . QueueUnapprovedTopicAfterAction ( PortalId , TabId , ForumModuleId , _fi . ForumGroupId , ForumId , TopicId , 0 , ti . Content . AuthorId ) ;
825
-
826
825
string [ ] @params = { ParamKeys . ForumId + "=" + ForumId , ParamKeys . ViewType + "=confirmaction" , ParamKeys . ConfirmActionId + "=" + ConfirmActions . MessagePending } ;
827
826
Response . Redirect ( NavigateUrl ( ForumTabId , "" , @params ) , false ) ;
828
- }
829
- if ( ! _isEdit )
830
- {
831
- DotNetNuke . Modules . ActiveForums . Controllers . TopicController . QueueApprovedTopicAfterAction ( PortalId , TabId , ModuleId , ForumInfo . ForumGroupId , ForumId , TopicId , 0 , ti . Content . AuthorId ) ;
832
- }
833
-
834
- if ( ti . IsApproved == false )
835
- {
836
- string [ ] @params = { ParamKeys . ForumId + "=" + ForumId , ParamKeys . ViewType + "=confirmaction" , ParamKeys . ConfirmActionId + "=" + ConfirmActions . MessagePending } ;
837
- Response . Redirect ( NavigateUrl ( TabId , "" , @params ) , false ) ;
827
+ Context . ApplicationInstance . CompleteRequest ( ) ;
838
828
}
839
829
else
840
830
{
841
- if ( ti != null )
831
+ if ( ! _isEdit )
842
832
{
843
- ti . TopicId = TopicId ;
833
+ DotNetNuke . Modules . ActiveForums . Controllers . TopicController . QueueApprovedTopicAfterAction ( PortalId , TabId , ModuleId , ForumInfo . ForumGroupId , ForumId , TopicId , 0 , ti . Content . AuthorId ) ;
844
834
}
845
835
ControlUtils ctlUtils = new ControlUtils ( ) ;
846
836
string sUrl = ctlUtils . BuildUrl ( TabId , ForumModuleId , ForumInfo . ForumGroup . PrefixURL , ForumInfo . PrefixURL , ForumInfo . ForumGroupId , ForumInfo . ForumID , TopicId , ti . TopicUrl , - 1 , - 1 , string . Empty , 1 , - 1 , SocialGroupId ) ;
@@ -849,6 +839,7 @@ private void SaveTopic()
849
839
sUrl = Utilities . NavigateURL ( ForumTabId , "" , ParamKeys . TopicId + "=" + TopicId ) ;
850
840
}
851
841
Response . Redirect ( sUrl , false ) ;
842
+ Context . ApplicationInstance . CompleteRequest ( ) ;
852
843
}
853
844
}
854
845
catch ( Exception ex )
@@ -972,27 +963,32 @@ private void SaveReply()
972
963
new SubscriptionController ( ) . Subscription_Update ( PortalId , ForumModuleId , ForumId , TopicId , 1 , authorId , ForumUser . UserRoles ) ;
973
964
}
974
965
}
975
- if ( ri . IsApproved == false )
966
+ if ( ! ri . IsApproved )
976
967
{
977
968
DotNetNuke . Modules . ActiveForums . Controllers . ReplyController . QueueUnapprovedReplyAfterAction ( PortalId , TabId , ForumModuleId , _fi . ForumGroupId , ForumId , TopicId , tmpReplyId , ri . Content . AuthorId ) ;
978
969
979
970
string [ ] @params = { ParamKeys . ForumId + "=" + ForumId , ParamKeys . TopicId + "=" + TopicId , ParamKeys . ViewType + "=confirmaction" , ParamKeys . ConfirmActionId + "=" + ConfirmActions . MessagePending } ;
980
971
Response . Redirect ( Utilities . NavigateURL ( TabId , "" , @params ) , false ) ;
972
+ Context . ApplicationInstance . CompleteRequest ( ) ;
981
973
}
982
- if ( ! _isEdit )
983
- {
984
- DotNetNuke . Modules . ActiveForums . Controllers . ReplyController . QueueApprovedReplyAfterAction ( PortalId , TabId , ModuleId , _fi . ForumGroupId , ForumId , TopicId , tmpReplyId , ri . Content . AuthorId ) ;
985
- }
986
- var fullURL = new ControlUtils ( ) . BuildUrl ( TabId , ForumModuleId , ForumInfo . ForumGroup . PrefixURL , ForumInfo . PrefixURL , ForumInfo . ForumGroupId , ForumInfo . ForumID , TopicId , ri . Topic . TopicUrl , - 1 , - 1 , string . Empty , 1 , tmpReplyId , SocialGroupId ) ;
987
- if ( fullURL . Contains ( "~/" ) )
988
- {
989
- fullURL = Utilities . NavigateURL ( TabId , "" , new [ ] { ParamKeys . TopicId + "=" + TopicId , ParamKeys . ContentJumpId + "=" + tmpReplyId } ) ;
990
- }
991
- if ( fullURL . EndsWith ( "/" ) )
992
- {
993
- fullURL += Utilities . UseFriendlyURLs ( ForumModuleId ) ? String . Concat ( "#" , tmpReplyId ) : String . Concat ( "?" , ParamKeys . ContentJumpId , "=" , tmpReplyId ) ;
994
- }
995
- Response . Redirect ( fullURL ) ;
974
+ else
975
+ {
976
+ if ( ! _isEdit )
977
+ {
978
+ DotNetNuke . Modules . ActiveForums . Controllers . ReplyController . QueueApprovedReplyAfterAction ( PortalId , TabId , ModuleId , _fi . ForumGroupId , ForumId , TopicId , tmpReplyId , ri . Content . AuthorId ) ;
979
+ }
980
+ var fullURL = new ControlUtils ( ) . BuildUrl ( TabId , ForumModuleId , ForumInfo . ForumGroup . PrefixURL , ForumInfo . PrefixURL , ForumInfo . ForumGroupId , ForumInfo . ForumID , TopicId , ri . Topic . TopicUrl , - 1 , - 1 , string . Empty , 1 , tmpReplyId , SocialGroupId ) ;
981
+ if ( fullURL . Contains ( "~/" ) )
982
+ {
983
+ fullURL = Utilities . NavigateURL ( TabId , "" , new [ ] { ParamKeys . TopicId + "=" + TopicId , ParamKeys . ContentJumpId + "=" + tmpReplyId } ) ;
984
+ }
985
+ if ( fullURL . EndsWith ( "/" ) )
986
+ {
987
+ fullURL += Utilities . UseFriendlyURLs ( ForumModuleId ) ? String . Concat ( "#" , tmpReplyId ) : String . Concat ( "?" , ParamKeys . ContentJumpId , "=" , tmpReplyId ) ;
988
+ }
989
+ Response . Redirect ( fullURL , false ) ;
990
+ Context . ApplicationInstance . CompleteRequest ( ) ;
991
+ }
996
992
}
997
993
catch ( Exception )
998
994
{
0 commit comments