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

    r8728 r8802  
    3333
    3434//----------------------------------------------------------- generic functions
     35
     36/**
     37 * stupidly returns the current microsecond since Unix epoch
     38 */
     39function micro_seconds()
     40{
     41  $t1 = explode(' ', microtime());
     42  $t2 = explode('.', $t1[0]);
     43  $t2 = $t1[1].substr($t2[1], 0, 6);
     44  return $t2;
     45}
    3546
    3647// The function get_moment returns a float value coresponding to the number
Note: See TracChangeset for help on using the changeset viewer.