Ignore:
Timestamp:
Apr 28, 2010, 4:28:05 PM (14 years ago)
Author:
plg
Message:

feature 1630: upgrade to Piwigo 2.1 :-)

bug 1604: only activate core themes not all themes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upgrade.php

    r5387 r5982  
    7777
    7878  $standard_plugins = array(
    79     'add_index',
    80     'admin_advices',
    8179    'admin_multi_view',
    8280    'c13y_upgrade',
     
    222220  try
    223221  {
    224     $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
    225                                   $conf['db_password'], $conf['db_base']);
     222    $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], $conf['db_password'], $conf['db_base']);
     223    if ($pwg_db_link)
     224    {
     225      pwg_db_check_version();
     226    }
    226227  }
    227228  catch (Exception $e)
     
    231232}
    232233
     234/**
     235 *  Get languages defined in the language directory
     236 */ 
     237function get_fs_languages($target_charset = null)
     238{
     239  if ( empty($target_charset) )
     240  {
     241    $target_charset = get_pwg_charset();
     242  }
     243  $target_charset = strtolower($target_charset);
     244 
     245  $dir = opendir(PHPWG_ROOT_PATH.'language');
     246 
     247  while ($file = readdir($dir))
     248  {
     249    $path = PHPWG_ROOT_PATH.'language/'.$file;
     250    if (!is_link($path) and is_dir($path) and file_exists($path.'/iso.txt'))
     251    {
     252      list($language_name) = @file($path.'/iso.txt');
     253     
     254      $languages[$file] = convert_charset($language_name, $target_charset);
     255    }
     256  }
     257  closedir($dir);
     258  @asort($languages);
     259 
     260  return $languages;
     261}
     262
    233263?>
Note: See TracChangeset for help on using the changeset viewer.