- in admin/configuration, add new step with "sections" (general, comments,

default, upload, metadata, sessions)

- admin/configuration.php and its template have been higly simplificated by
  making things more generic : for example, for each configuration
  parameter, its name must correspond to the name we find in the config
  table and belongs to a section, in the lang array we find :

  - $lang['conf_<section>_<param>']
  - $lang['conf_<section>_<param>_info']
  - $lang['conf_<section>_<param>_error'] optionnaly

- more described message when connection to database server is impossible

- redefinitions of get_languages and get_templates functions

- deletion of configuration parameters : webmaster, session_keyword

- rename of configuration parameters :

  - default_lang => default_language
  - default_style => default_template


git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub 2004-09-03 15:01:05 +00:00
parent fb5b21cbde
commit 1f71a31084
11 changed files with 511 additions and 668 deletions

View file

@ -113,22 +113,7 @@ function create_navigation_bar( $url, $nb_element, $start,
//
function language_select($default, $select_name = "language")
{
$dir = opendir(PHPWG_ROOT_PATH . 'language');
$available_lang= array();
while ( $file = readdir($dir) )
{
$path= realpath(PHPWG_ROOT_PATH . 'language/'.$file);
if (is_dir ($path) && !is_link($path) && file_exists($path . '/iso.txt'))
{
list($displayname) = @file($path . '/iso.txt');
$available_lang[$displayname] = $file;
}
}
closedir($dir);
@asort($available_lang);
@reset($available_lang);
$available_lang = get_languages();
$lang_select = '<select name="' . $select_name . '" onchange="this.form.submit()">';
foreach ($available_lang as $displayname => $code)
@ -146,19 +131,14 @@ function language_select($default, $select_name = "language")
//
function style_select($default_style, $select_name = "style")
{
$dir = opendir(PHPWG_ROOT_PATH . 'template');
$style_select = '<select name="' . $select_name . '">';
while ( $file = readdir($dir) )
$templates = get_templates();
foreach ($templates as $template)
{
if (is_dir ( realpath(PHPWG_ROOT_PATH.'template/'.$file) )
&& !is_link(realpath(PHPWG_ROOT_PATH . 'template/' . $file))
&& !strstr($file,'.'))
{
$selected = ( $file == $default_style ) ? ' selected="selected"' : '';
$style_select .= '<option value="' . $file . '"' . $selected . '>' . $file . '</option>';
}
$selected = ( $template == $default_style ) ? ' selected="selected"' : '';
$style_select.= '<option value="'.$template.'"'.$selected.'>';
$style_select.= $template.'</option>';
}
closedir($dir);
return $style_select;
}