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

feature 1514: new screen to manage installed themes; activate, deactivate,
delete, set as default.

plugins.class.php was merged back to a state it doesn't manage themes at all.
themes.class.php was created instead, from a duplication of plugins.class.php
and strongly modified then.

feature 1507: the display of available themes is now much more "graphic".

File:
1 edited

Legend:

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

    r5138 r5153  
    714714function get_pwg_themes()
    715715{
    716   global $conf;
    717716  $themes = array();
    718717
    719   $template_dir = PHPWG_ROOT_PATH.'themes';
    720 
    721   foreach (get_dirs($template_dir) as $theme)
    722   {
    723     if ( $theme != 'default' )
    724           {
    725       array_push($themes, $theme);
    726           }
     718  $query = '
     719SELECT
     720    id,
     721    name
     722  FROM '.THEMES_TABLE.'
     723  ORDER BY name ASC
     724;';
     725  $result = pwg_query($query);
     726  while ($row = pwg_db_fetch_assoc($result))
     727  {
     728    $themes[ $row['id'] ] = $row['name'];
    727729  }
    728730
    729731  // plugins want remove some themes based on user status maybe?
    730732  $themes = trigger_event('get_pwg_themes', $themes);
     733 
    731734  return $themes;
    732735}
Note: See TracChangeset for help on using the changeset viewer.