YAFLogo

MrData
  • MrData
  • 62.6% (Friendly)
  • YAF Forumling Topic Starter
15 years ago
Hello,

I found following issues in the 1.9.4 beta

1)

When you use: the UrlBuilder produces URLs like this: ...domain.com/app/forum//default.aspx?...

A little workaround:

public string BuildUrl(string url)
		{
			// escape & to &
			url = url.Replace("&", "&");

			// return URL to current script with URL from parameter as script's parameter
            return String.Format("{0}{1}?{2}", UrlBuilder.BaseUrl, 
UrlBuilder.ScriptName, url).Replace(@"//", @"/");
		}

2)

The "comment" is not updated in yaf_prov_updateuser

ALTER PROCEDURE [dbo].[yaf_prov_updateuser]
(
@ApplicationName nvarchar(256),
@UserKey nvarchar(64),
@UserName nvarchar(256),
@Email nvarchar(256),
@Comment text,
@IsApproved bit,
@LastLogin datetime,
@LastActivity datetime,
@UniqueEmail bit
)
AS
BEGIN
	DECLARE @ApplicationID uniqueidentifier

	EXEC [dbo].[yaf_prov_CreateApplication] @ApplicationName, @ApplicationID OUTPUT
	
		-- Check UserKey
	IF (@UserKey IS NULL)
        RETURN(1) -- 

	-- Check for UniqueEmail
	IF (@UniqueEmail = 1)
	BEGIN
		IF (EXISTS (SELECT 1 FROM [dbo].[yaf_prov_Membership] m WHERE m.UserID != @UserKey AND m.EmailLwd=LOWER(@Email) AND m.ApplicationID=@ApplicationID) )
			RETURN (2)
	END
	
	UPDATE [dbo].[yaf_prov_Membership] SET
	Username = @Username,
	UsernameLwd = LOWER(@Username),
	Email = @Email,
	EmailLwd = LOWER(@Email),
	IsApproved = @IsApproved,
	LastLogin = @LastLogin,
	LastActivity = @LastActivity,
	Comment = @Comment --                            [color=red]<-- Missing![/color]	WHERE ApplicationID = @ApplicationID AND
	UserID = @UserKey;

	-- Return successful
	RETURN(0)
END

MrData

Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
15 years ago
1. Already taken care of in latest code.

2. I'll commit the change -- thanks.