Ignore:
Timestamp:
Feb 15, 2010, 11:29:00 AM (15 years ago)
Author:
plg
Message:

feature 1435: usability improvement. Replace "minimum privacy level" by "who
can see these photos?".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/upload_form/upload.php

    r4875 r4887  
    396396foreach ($conf['available_permission_levels'] as $level)
    397397{
    398   $tpl_options[$level] = l10n( sprintf('Level %d', $level) );
     398  $label = null;
     399 
     400  if (0 == $level)
     401  {
     402    $label = l10n('Everybody');
     403  }
     404  else
     405  {
     406    $labels = array();
     407    $sub_levels = array_reverse($conf['available_permission_levels']);
     408    foreach ($sub_levels as $sub_level)
     409    {
     410      if ($sub_level == 0 or $sub_level < $level)
     411      {
     412        break;
     413      }
     414      array_push(
     415        $labels,
     416        l10n(
     417          sprintf(
     418            'Level %d',
     419            $sub_level
     420            )
     421          )
     422        );
     423    }
     424   
     425    $label = implode(', ', array_reverse($labels));
     426  }
     427  $tpl_options[$level] = $label;
    399428}
    400429$selected_level = isset($_POST['level']) ? $_POST['level'] : 0;
Note: See TracChangeset for help on using the changeset viewer.