Changeset 897 for trunk/about.php


Ignore:
Timestamp:
10/17/05 23:29:51 (14 years ago)
Author:
plg
Message:
  • improvement: use new function get_language_filepath in about.php (complement of bug 168 correction)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/about.php

    r862 r897  
    3737include(PHPWG_ROOT_PATH.'include/page_header.php'); 
    3838 
    39 $template->set_filenames(array('about'=>'about.tpl')); 
     39$template->set_filenames( 
     40  array( 
     41    'about'=>'about.tpl', 
     42    'about_content' => get_language_filepath('about.html') 
     43    ) 
     44  ); 
     45   
    4046$template->assign_vars( 
    4147  array( 
     
    4450  ); 
    4551 
    46 // language files 
    47 $user_langdir = PHPWG_ROOT_PATH.'language/'.$user['language']; 
    48 $conf_langdir = PHPWG_ROOT_PATH.'language/'.$conf['default_language']; 
    49  
    50 if (file_exists($user_langdir.'/about.html')) 
    51 { 
    52   $html_file = $user_langdir.'/about.html'; 
    53 } 
    54 else 
    55 { 
    56   $html_file = $conf_langdir.'/about.html'; 
    57 } 
    58  
    59 $template->set_filenames(array('about_content' => $html_file)); 
    6052$template->assign_var_from_handle('ABOUT_MESSAGE', 'about_content'); 
    6153   
Note: See TracChangeset for help on using the changeset viewer.