Yes. I've added the two can_view functions to the output while loop of my script.
But now the output stays empty. I also have doubts that the speed could be affected if I call these functions in a loop.
It would also be better for the database if I only queried the right albums, and not all of them. Let's say I query 20 albums, because they will fill up the page nicely. If 19 people have set their albums to private, the script would only output 1 album. The page would be almost empty.
So I need to already tackle this problem in the SQL query.
|