Ignore:
Timestamp:
Feb 6, 2014, 3:03:57 PM (10 years ago)
Author:
mistic100
Message:

import privacy level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/flickr2piwigo/include/ws_functions.inc.php

    r26180 r27242  
    9898    $photo['category'] = array($photo['category']);
    9999  }
     100 
     101  // level
     102  $level = 0;
     103  if (in_array('level', $photo['fills']) && !$photo['visibility']['ispublic'])
     104  {
     105    $level = 8;
     106    if ($photo['visibility']['isfamily']) $level = 4;
     107    if ($photo['visibility']['isfriend']) $level = 2;
     108  }
    100109
    101110  // add photo
    102   $photo['image_id'] = add_uploaded_file($photo['path'], basename($photo['path']), $photo['category']);
     111  $photo['image_id'] = add_uploaded_file($photo['path'], basename($photo['path']), $photo['category'], $level);
    103112
    104113  // do some updates
Note: See TracChangeset for help on using the changeset viewer.