This patch is for those who downloaded 3.9 before March. 16, 2011
The image scroller on the homepage and gallery page includes photos haven't been approved by moderator by mistake.
To fix the problem, please execute the following SQL statement, using the bundled DBManager or SQL Management Studio against your db
ALTER Proc spGetGalleryPagePhotoList
@memID int
As
Set Transaction Isolation Level Read Uncommitted
Set nocount on
declare @galleryList varchar(5000)
Exec spGetViewableGallery @memID = @memID, @galleryIDs = @galleryList output
Declare @photos table (
[photoID] int not null,
[title] nvarchar(50) not null,
[filename] varchar(50) not null,
[mem] int not null
)
Insert into @photos
SELECT top 20
p.[photoID] ,
Left(p.[title], 50),
p.[filename] ,
p.[mem]
FROM pgd_photo p
Inner join pgd_album a on a.albumID = p.albumID
inner join pgd_gallery g on g.galleryID = a.galleryID
WHERE
exists (SELECT 0 FROM dbo.CsvToInt(@galleryList) t WHERE t.IntValue = g.galleryID) and
(a.isSelf>0 OR (a.mem = @memID)) and p.moderated = 0
ORDER By NewID(), p.PhotoID DESC
SELECT
[photoID] ,
[title],
[filename] ,
[mem]
FROM @photos
GO