Ignore:
Timestamp:
May 1, 2010, 12:38:17 AM (14 years ago)
Author:
plg
Message:

bug 1637: make the privacy level the same everywher, use "who can see this photo?"
instead of "minimum privacy level".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r5982 r6025  
    15251525  }
    15261526}
     1527
     1528
     1529function get_privacy_level_options()
     1530{
     1531  global $conf;
     1532 
     1533  $options = array();
     1534  foreach (array_reverse($conf['available_permission_levels']) as $level)
     1535  {
     1536    $label = null;
     1537 
     1538    if (0 == $level)
     1539    {
     1540      $label = l10n('Everybody');
     1541    }
     1542    else
     1543    {
     1544      $labels = array();
     1545      $sub_levels = array_reverse($conf['available_permission_levels']);
     1546      foreach ($sub_levels as $sub_level)
     1547      {
     1548        if ($sub_level == 0 or $sub_level < $level)
     1549        {
     1550          break;
     1551        }
     1552        array_push(
     1553          $labels,
     1554          l10n(
     1555            sprintf(
     1556              'Level %d',
     1557              $sub_level
     1558              )
     1559            )
     1560          );
     1561      }
     1562     
     1563      $label = implode(', ', $labels);
     1564    }
     1565    $options[$level] = $label;
     1566  }
     1567  return $options;
     1568}
    15271569?>
Note: See TracChangeset for help on using the changeset viewer.