Ignore:
Timestamp:
Jan 20, 2011, 2:32:34 PM (13 years ago)
Author:
plg
Message:

bug 937 fixed: makes sure a user won't see the thumbnail of a photo that has a
higher privacy level than user privacy level.

For an acceptable solution at performance level, I have implemented a cache:
for a given user, each album has a representative_picture_id. This cache also
avoids to perform numerous "order by rand()" SQL queries which is the case
when $confallow_random_representative = true;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install/piwigo_structure-sqlite.sql

    r8651 r8802  
    426426  "count_images" INTEGER default 0,
    427427  "count_categories" INTEGER default 0,
     428  "user_representative_picture_id" INTEGER,
    428429  PRIMARY KEY ("user_id","cat_id")
    429430);
     
    536537CREATE INDEX "comments_i2" ON "piwigo_comments" ("validation_date");
    537538CREATE INDEX "comments_i1" ON "piwigo_comments" ("image_id");
     539
Note: See TracChangeset for help on using the changeset viewer.