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/admin/include/functions.php

    r8762 r8802  
    884884
    885885/**
    886  * stupidly returns the current microsecond since Unix epoch
    887  */
    888 function micro_seconds()
    889 {
    890   $t1 = explode(' ', microtime());
    891   $t2 = explode('.', $t1[0]);
    892   $t2 = $t1[1].substr($t2[1], 0, 6);
    893   return $t2;
    894 }
    895 
    896 /**
    897886 * synchronize base users list and related users list
    898887 *
Note: See TracChangeset for help on using the changeset viewer.