Ignore:
Timestamp:
Mar 13, 2010, 1:00:52 AM (14 years ago)
Author:
plg
Message:

feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo
manages template/theme in a simpler "theme only level" architecture. It
supports multiple level inheritance.

File:
1 edited

Legend:

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

    r5102 r5123  
    612612    trigger_action('loading_lang');
    613613    load_language('local.lang', '', array('no_fallback'=>true) );
    614     list($tmpl, $thm) = explode('/', get_default_template());
    615     $template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm);
     614    $template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme());
    616615  }
    617616  else
    618617  {
    619     $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']);
     618    $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme']);
    620619  }
    621620
     
    711710
    712711/**
    713  * returns available template/theme
     712 * returns available themes
    714713 */
    715714function get_pwg_themes()
     
    718717  $themes = array();
    719718
    720   $template_dir = PHPWG_ROOT_PATH.'template';
    721 
    722   foreach (get_dirs($template_dir) as $template)
    723   {
    724     if ( $template != 'default' )
    725         {
    726       foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme)
    727       {
    728         array_push($themes, $template.'/'.$theme);
    729       }
    730         }
     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          }
    731727  }
    732728
Note: See TracChangeset for help on using the changeset viewer.