Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Lots of albums with the same name
lhakesley
#1 Posted : Tuesday, 25 May 2010 10:09:37 AM(UTC)
Rank: Member

Joined: 1/04/2010(UTC)
Posts: 18

Hi Roger,

The company I'm working for has a corporate wellness site where they offer fitness/diet/goal management to a number of small companies for their employees. Each company has a little administration area and a set of company wellness pages within the main site if the member happens to also be part of a corporate wellness program.

They want to provide each company a photo album (really, a media gallery). No problem. However, they want to name each album "Media Gallery" -- for all companies. We have about 30 now, but of course it will soon expand to thousands :).

I know GSP has code to manage duplicate album names in terms of the database and file system, but I'm reluctant to recommend to them that it's OK to name every single company album the same thing. (BTW, I plan to create them all under the same parent album for organizational convenience.)

Do you forsee an issue with this? If so, any suggestions? (I can add code to GSP to special case album titles and substitute a different string for display, so that I can name them something unique behind-the-scenes, but that's icky and I don't really want to go there if not necessary...)

Thank you!

Lisa Hakesley
Roger Martin
#2 Posted : Tuesday, 25 May 2010 1:19:42 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

You should be fine. When you create an album, there is a function that continues altering the name until it finds a unique one. For example, when you try to create the 10,000th album named "Media Gallery", the directory will end up with a name like "Media Gallery(9999)". I think the upper limit is the max value for an integer, which is over 2 billion.

You may notice a slight delay as it loops 10,000 times, but I wouldn't expect it to be significant. If you want to be sure, just write some test code where you call System.IO.Directory.Exists() 10,000 times to see how long it takes.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
lhakesley
#3 Posted : Wednesday, 26 May 2010 7:12:36 AM(UTC)
Rank: Member

Joined: 1/04/2010(UTC)
Posts: 18

Thank you Roger! :)
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.