Changeset 5642


Ignore:
Timestamp:
Apr 4, 2010, 8:45:58 PM (10 years ago)
Author:
grum
Message:

initialize the 'is_default' key to false when the item (theme, language) is not the default item

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/languages_installed.php

    r5496 r5642  
    6767    $language['state'] = 'active';
    6868    $language['deactivable'] = true;
    69    
     69
    7070    if (count($languages->db_languages) <= 1)
    7171    {
     
    8484    $language['state'] = 'inactive';
    8585  }
    86  
     86
    8787  if ($language_id == $default_language)
    8888  {
     
    9292  else
    9393  {
     94    $language['is_default'] = false;
    9495    array_push($tpl_languages, $language);
    9596  }
  • trunk/admin/themes_installed.php

    r5382 r5642  
    7979  {
    8080    $fs_theme['deactivable'] = true;
    81    
     81
    8282    if (count($db_theme_ids) <= 1)
    8383    {
     
    8585      $fs_theme['deactivate_tooltip'] = l10n('Impossible to deactivate this theme, you need at least one theme.');
    8686    }
    87    
     87
    8888    if ($theme_id == $default_theme)
    8989    {
     
    9393    else
    9494    {
     95      $fs_theme['is_default'] = false;
    9596      array_push($active_themes, $fs_theme);
    9697    }
     
    100101    // is the theme "activable" ?
    101102    $fs_theme['activable'] = true;
    102    
     103
    103104    $missing_parent = $themes->missing_parent_theme($theme_id);
    104105    if (isset($missing_parent))
    105106    {
    106107      $fs_theme['activable'] = false;
    107      
     108
    108109      $fs_theme['activate_tooltip'] = sprintf(
    109110        l10n('Impossible to activate this theme, the parent theme is missing: %s'),
     
    116117
    117118    $fs_theme['deletable'] = true;
    118    
     119
    119120    if (count($children) > 0)
    120121    {
    121122      $fs_theme['deletable'] = false;
    122      
     123
    123124      $fs_theme['delete_tooltip'] = sprintf(
    124125        l10n('Impossible to delete this theme. Other themes depends on it: %s'),
     
    126127        );
    127128    }
    128    
     129
    129130    array_push($inactive_themes, $fs_theme);
    130131  }
Note: See TracChangeset for help on using the changeset viewer.