YAFLogo

balbes
  • balbes
  • 94% (Exalted)
  • YAF Lover Topic Starter
13 years ago
1. Column DownloadAccess in view vaccess missing
fix

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[yaf_vaccess]
AS
	SELECT
		UserID				= a.UserID,
		ForumID				= x.ForumID,
		IsAdmin				= max(convert(int,b.Flags & 1)),
		IsForumModerator	= max(convert(int,b.Flags & 8)),
		IsModerator			= (select count(1) from [dbo].[yaf_UserGroup] v,[dbo].[yaf_Group] w,[dbo].[yaf_ForumAccess] x,[dbo].[yaf_AccessMask] y where v.UserID=a.UserID and w.GroupID=v.GroupID and x.GroupID=w.GroupID and y.AccessMaskID=x.AccessMaskID and (y.Flags & 64)<>0),
		ReadAccess			= max(x.ReadAccess),
		PostAccess			= max(x.PostAccess),
		ReplyAccess			= max(x.ReplyAccess),
		PriorityAccess		= max(x.PriorityAccess),
		PollAccess			= max(x.PollAccess),
		VoteAccess			= max(x.VoteAccess),
		ModeratorAccess		= max(x.ModeratorAccess),
		EditAccess			= max(x.EditAccess),
		DeleteAccess		= max(x.DeleteAccess),
		UploadAccess		= max(x.UploadAccess),		
		DownloadAccess		= max(x.DownloadAccess)			
	FROM
		[dbo].[yaf_vaccessfull] as x WITH(NOLOCK)
		INNER JOIN [dbo].[yaf_UserGroup] a WITH(NOLOCK) on a.UserID=x.UserID
		INNER JOIN [dbo].[yaf_Group] b WITH(NOLOCK) on b.GroupID=a.GroupID
	GROUP BY
		a.UserID,x.ForumID
GO

2. Method GetStringSafely (~/pages/members.ascx.cs line 71) throws exception if parameter svalue == null
fix

return svalue == null ? string.Empty : HtmlEncode(svalue.ToString());

mir scheissegal
Sponsor

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
13 years ago
First issue: Can't seem to find this as an error in the code. The SQL I see has the DownloadAccess column.

Second thing: thanks. Committed to SVN.
balbes
  • balbes
  • 94% (Exalted)
  • YAF Lover Topic Starter
13 years ago
View vaccess already exists in YAF 1.9.1.8
I don't see upgrade procedure for it in views.sql (drop or anything else).
mir scheissegal
balbes
  • balbes
  • 94% (Exalted)
  • YAF Lover Topic Starter
13 years ago
Issue with view vaccess fixed in rev.2836
Many thanks!
mir scheissegal
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button