Ignore:
Timestamp:
Mar 22, 2010, 4:03:43 PM (14 years ago)
Author:
plg
Message:

ture 1514: improvement, impossible to activate a theme is a parent is missing
(a parent includes grand father and his own father, and his own father, and so
on... until the root theme is "default" or has no parent declared)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes_installed.php

    r5258 r5259  
    9090  else
    9191  {
     92    // is the theme "activable" ?
     93    $fs_theme['activable'] = true;
     94   
     95    $missing_parent = $themes->missing_parent_theme($theme_id);
     96    if (isset($missing_parent))
     97    {
     98      $fs_theme['activable'] = false;
     99     
     100      $fs_theme['activate_tooltip'] = sprintf(
     101        l10n('Impossible to activate this theme, the parent theme is missing: %s'),
     102        $missing_parent
     103        );
     104    }
     105
     106    // is the theme "deletable" ?
    92107    $children = $themes->get_children_themes($theme_id);
     108
     109    $fs_theme['deletable'] = true;
    93110   
    94111    if (count($children) > 0)
     
    100117        implode(', ', $children)
    101118        );
    102     }
    103     else
    104     {
    105       $fs_theme['deletable'] = true;
    106119    }
    107120   
Note: See TracChangeset for help on using the changeset viewer.