Changeset 8802 for trunk/install


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;

Location:
trunk/install
Files:
1 added
4 edited

Legend:

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

    r8651 r8802  
    369369  `count_images` mediumint(8) unsigned default '0',
    370370  `count_categories` mediumint(8) unsigned default '0',
     371  `user_representative_picture_id` mediumint(8) unsigned default NULL,
    371372  PRIMARY KEY  (`user_id`,`cat_id`)
    372373) TYPE=MyISAM;
  • trunk/install/piwigo_structure-pdo-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);
  • trunk/install/piwigo_structure-pgsql.sql

    r8651 r8802  
    515515  "count_images" INTEGER default 0,
    516516  "count_categories" INTEGER default 0,
     517  "user_representative_picture_id" INTEGER,
    517518  PRIMARY KEY ("user_id","cat_id")
    518519);
  • 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.