Skip to content

Commit 470a536

Browse files
committed
[FIXED] issues with url & user sync
1 parent bb91aae commit 470a536

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

yaf_dnn/Components/Rewriter/DotNetNukeUrlBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ namespace YAF.DotNetNuke
3030
using System.Text;
3131

3232
using global::DotNetNuke.Common;
33+
using global::DotNetNuke.Common.Utilities;
3334
using global::DotNetNuke.Entities.Portals;
3435

3536
using global::DotNetNuke.Entities.Tabs;
36-
using global::DotNetNuke.Entities.Users;
3737
using global::DotNetNuke.Services.Localization;
3838
using global::DotNetNuke.Services.Url.FriendlyUrl;
3939

@@ -135,7 +135,7 @@ private string BuildUrlComplete(object boardSettings, string url, bool fullURL)
135135
if (url.IsNotSet())
136136
{
137137
// return BaseURL
138-
var baseUrl = Globals.NavigateURL();
138+
var baseUrl = Globals.NavigateURL(yafBoardSettings.DNNPageTab, Null.NullString);
139139

140140
if (baseUrl.EndsWith(yafTab.TabName))
141141
{
@@ -155,7 +155,7 @@ private string BuildUrlComplete(object boardSettings, string url, bool fullURL)
155155
return baseUrl;
156156
}
157157

158-
if (!Config.EnableURLRewriting)
158+
if (!global::YAF.Classes.Config.EnableURLRewriting)
159159
{
160160
if (!fullURL)
161161
{
@@ -289,7 +289,7 @@ private string BuildUrlComplete(object boardSettings, string url, bool fullURL)
289289
.FriendlyUrl(
290290
yafTab,
291291
"{0}&{1}".FormatWith(Globals.ApplicationURL(yafTab.TabID), parser.CreateQueryString(new[] { "name" })),
292-
boardNameOrPageName,
292+
"{0}.aspx".FormatWith(boardNameOrPageName),
293293
portalSettings.DefaultPortalAlias));
294294

295295
// add anchor

yaf_dnn/Components/Utils/ProfileSyncronizer.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ namespace YAF.DotNetNuke.Components.Utils
2929
using System.Linq;
3030
using System.Web.Security;
3131

32-
using global::DotNetNuke.Common;
3332
using global::DotNetNuke.Common.Utilities;
3433
using global::DotNetNuke.Entities.Modules;
3534
using global::DotNetNuke.Entities.Users;
@@ -237,13 +236,24 @@ private static void SyncYafProfile(int yafUserId, YafUserProfile yafUserProfile,
237236

238237
yafUserProfile.Save();
239238

240-
if (dnnUserInfo.Profile.Photo.IsSet() && !dnnUserInfo.Profile.PhotoURL.Contains("no_avatar.gif"))
239+
try
241240
{
242-
SaveDnnAvatar("fileid={0}".FormatWith(dnnUserInfo.Profile.Photo), yafUserId, portalGUID, boardSettings);
241+
if (dnnUserInfo.Profile.Photo.IsSet() && !dnnUserInfo.Profile.PhotoURL.Contains("no_avatar.gif"))
242+
{
243+
SaveDnnAvatar(
244+
"fileid={0}".FormatWith(dnnUserInfo.Profile.Photo),
245+
yafUserId,
246+
portalGUID,
247+
boardSettings);
248+
}
249+
else
250+
{
251+
LegacyDb.user_deleteavatar(yafUserId);
252+
}
243253
}
244-
else
254+
catch (Exception)
245255
{
246-
LegacyDb.user_deleteavatar(yafUserId);
256+
247257
}
248258

249259
YafContext.Current.Get<IRaiseEvent>().Raise(new UpdateUserEvent(yafUserId));

yaf_dnn/YAF.DNN.Module.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<IISExpressWindowsAuthentication />
2626
<IISExpressUseClassicPipelineMode />
2727
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
28+
<UseGlobalApplicationHostFile />
2829
</PropertyGroup>
2930
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3031
<DebugSymbols>true</DebugSymbols>

yaf_dnn/YAF.DNN.Module.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.31101.0
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.23107.0
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DNN Module", "DNN Module", "{CD7F4B42-E9D3-4AE6-8217-AAB9BDBD76BB}"
66
EndProject

0 commit comments

Comments
 (0)