Skip to content

Commit 072ff3c

Browse files
committed
fix when adding module to a page
1 parent d5c8f0d commit 072ff3c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

yaf_dnn/Installation/YAF.DotNetNuke.Module.dnn

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="YetAnotherForumDotNet" type="Module" version="02.00.05400">
3+
<package name="YetAnotherForumDotNet" type="Module" version="02.00.05401">
44
<friendlyName>YAF.NET Forums</friendlyName>
55
<description>
66
&lt;strong&gt;YetAnotherForum.NET&lt;/strong&gt; as DNN Module. Yet Another Forum.NET (YAF) is an open source ASP.NET forum system.&lt;br /&gt;
@@ -391,7 +391,7 @@
391391
</component>
392392
</components>
393393
</package>
394-
<package name="YAF.WhatsNew" type="Module" version="02.00.05400">
394+
<package name="YAF.WhatsNew" type="Module" version="02.00.05401">
395395
<friendlyName>YAF.NET Forums What's New</friendlyName>
396396
<description>
397397
&lt;p&gt;This Module displays the Latest Posts from a &lt;strong&gt;YetAnotherForum.NET&lt;/strong&gt; Module. Based on the Current Users Authorization Level. You can define Which Forum should been used, and how many Posts should displayed.
@@ -454,6 +454,10 @@
454454
<name>YafDnnWhatsNew.ascx</name>
455455
<sourceFileName>YafDnnWhatsNew.ascx</sourceFileName>
456456
</file>
457+
<file>
458+
<name>yaf.png</name>
459+
<sourceFileName>yaf.png</sourceFileName>
460+
</file>
457461
</files>
458462
</component>
459463
<component type="ResourceFile">

yaf_dnn/YafDnnModule.ascx.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,16 @@ private void InitializeComponent()
506506
this.createNewBoard = false;
507507

508508
// This will create an error if there is no setting for forumboardid
509-
this.forum1.BoardID = this.Settings["forumboardid"].ToType<int>();
509+
if (this.Settings["forumboardid"] != null)
510+
{
511+
this.forum1.BoardID = this.Settings["forumboardid"].ToType<int>();
512+
}
513+
else
514+
{
515+
// Create a new board
516+
this.createNewBoard = true;
517+
}
518+
510519
}
511520
catch (Exception)
512521
{

0 commit comments

Comments
 (0)