Changeset 2819


Ignore:
Timestamp:
Nov 3, 2008, 8:52:33 PM (15 years ago)
Author:
patdenice
Message:
  • Add roma theme to upgrade page.
  • Upgrade translation.
Location:
trunk
Files:
6 added
5 edited

Legend:

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

    r2815 r2819  
    133133    mysql_query($query);
    134134
    135     array_push(
    136       $page['infos'],
    137       'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:
    138 <pre>' . implode(', ', $plugins) . '</pre>'
    139       );
     135    array_push($page['infos'],
     136      l10n('deactivated plugins') . '<pre>' . implode(', ', $plugins) . '</pre>');
    140137  }
    141138}
  • trunk/admin/template/goto/install.tpl

    r2752 r2819  
    22<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    33"http://www.w3.org/TR/html4/strict.dtd">
    4 <html lang="fr">
     4<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
    55<head>
    66<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
  • trunk/admin/template/goto/upgrade.tpl

    r2787 r2819  
    11{* $Id$ *}
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     3"http://www.w3.org/TR/html4/strict.dtd">
     4<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
     5<head>
     6<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     7<meta http-equiv="Content-script-type" content="text/javascript">
     8<meta http-equiv="Content-Style-Type" content="text/css">
     9<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico">
     10<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/layout.css">
     11<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/default-colors.css">
     12<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css">
     13{literal}
     14<style type="text/css">
     15#theHeader { height: 105px; }
    416
    5   <head>
    6     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"  />
    7     <title>Piwigo : Upgrade to {$RELEASE}</title>
    8   </head>
     17.content {
     18 width: 800px;
     19 min-height: 0px !important;
     20 margin: auto;
     21 padding: 25px;
     22 text-align: left;
     23}
    924
    10   <body>
    11     {if isset($introduction)}
    12     <h1>Welcome to Piwigo upgrade page.</h1>
     25h2 { width: 770px !important; }
     26</style>
     27{/literal}
     28<title>Piwigo {$RELEASE} - {'Upgrade'|@translate}</title>
     29</head>
    1330
    14     <p>This page proposes to upgrade your database corresponding to your old
    15 version of Piwigo to the current version. The upgrade assistant
    16 thinks you are currently running a
    17 <strong>release {$introduction.CURRENT_RELEASE}</strong> (or equivalent).</p>
     31<body>
     32<div id="headbranch"></div> {* Dummy block for double background management *}
     33<div id="theHeader"></div>
     34<div id="content" class="content">
    1835
    19     <p><a href="{$introduction.RUN_UPGRADE_URL}">Upgrade from release
    20 {$introduction.CURRENT_RELEASE} to {$RELEASE}</a></p>
    21     {/if}
     36{if isset($introduction)}
     37<h2>Piwigo {$RELEASE} - {'Upgrade'|@translate}</h2>
    2238
    23     {if isset($upgrade)}
    24     <h1>Upgrade from version {$upgrade.VERSION} to {$RELEASE}</h1>
     39<p>{'language'|@translate} &nbsp;
     40<select name="language" onchange="document.location = 'upgrade.php?language='+this.options[this.selectedIndex].value;">
     41  {html_options options=$language_options selected=$language_selection}
     42</select>
     43</p>
    2544
    26     <p>Statistics</p>
    27     <ul>
    28       <li>total upgrade time : {$upgrade.TOTAL_TIME}</li>
    29       <li>total SQL time : {$upgrade.SQL_TIME}</li>
    30       <li>SQL queries : {$upgrade.NB_QUERIES}</li>
    31     </ul>
     45<p>{'introduction message'|@translate|@sprintf:$introduction.CURRENT_RELEASE}</p>
    3246
    33     <p>Upgrade informations</p>
     47<p style="text-align: center;">
     48<a href="{$introduction.RUN_UPGRADE_URL}">{'Upgrade from %s to %s'|@translate|@sprintf:$introduction.CURRENT_RELEASE:$RELEASE}</b>
     49</p>
     50{/if}
    3451
    35     <ul>
    36       {foreach from=$infos item=info}
    37       <li>{$info}</li>
    38       {/foreach}
    39     </ul>
     52{if isset($upgrade)}
     53<h2>{'Upgrade from %s to %s'|@translate|@sprintf:$upgrade.VERSION:$RELEASE}</h2>
    4054
    41     {/if}
    42   </body>
     55<p><b>{'Statistics'|@translate}</b></p>
     56<ul>
     57  <li>{'total upgrade time'|@translate} : {$upgrade.TOTAL_TIME}</li>
     58  <li>{'total SQL time'|@translate} : {$upgrade.SQL_TIME}</li>
     59  <li>{'SQL queries'|@translate} : {$upgrade.NB_QUERIES}</li>
     60</ul>
    4361
     62<p><b>{'Upgrade informations'|@translate}</b></p>
     63<ul>
     64  {foreach from=$infos item=info}
     65  <li>{$info}</li>
     66  {/foreach}
     67</ul>
     68{/if}
     69
     70</div> {* content *}
     71</body>
    4472</html>
  • trunk/install/upgrade_1.7.0.php

    r2815 r2819  
    8686// +-----------------------------------------------------------------------+
    8787
     88ob_start();
    8889echo '<pre>';
    8990
     
    116117
    117118echo '</pre>';
     119ob_clean();
    118120
    119121// now we upgrade from 2.0.0
  • trunk/upgrade.php

    r2815 r2819  
    149149
    150150// +-----------------------------------------------------------------------+
     151// |                             language                                  |
     152// +-----------------------------------------------------------------------+
     153if (isset($_GET['language']))
     154{
     155  $language = strip_tags($_GET['language']);
     156}
     157else
     158{
     159  $language = 'en_UK';
     160  // Try to get browser language
     161  foreach (get_languages('utf-8') as $language_code => $language_name)
     162  {
     163    if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2))
     164    {
     165      $language = $language_code;
     166      break;
     167    }
     168  }
     169}
     170
     171load_language( 'common.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') );
     172load_language( 'admin.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') );
     173load_language( 'upgrade.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') );
     174
     175// +-----------------------------------------------------------------------+
    151176// |                        template initialization                        |
    152177// +-----------------------------------------------------------------------+
    153178
    154 $template = new Template(PHPWG_ROOT_PATH.'admin/template/goto');
     179$template = new Template(PHPWG_ROOT_PATH.'admin/template/goto', 'roma');
    155180$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
    156181$template->assign('RELEASE', PHPWG_VERSION);
     182
     183foreach (get_languages('utf-8') as $language_code => $language_name)
     184{
     185  if ($language == $language_code)
     186  {
     187    $template->assign('language_selection', $language_code);
     188  }
     189  $languages_options[$language_code] = $language_name;
     190}
     191$template->assign('language_options', $languages_options);
    157192
    158193// +-----------------------------------------------------------------------+
     
    211246      'CURRENT_RELEASE' => $current_release,
    212247      'RUN_UPGRADE_URL' =>
    213         PHPWG_ROOT_PATH.'upgrade.php?version='.$current_release,
     248        PHPWG_ROOT_PATH.'upgrade.php?version='.$current_release.'&amp;language='.$language,
    214249      )
    215250    );
     
    264299      );
    265300
    266     array_push(
    267       $page['infos'],
    268       '[security] delete files "upgrade.php", "upgrade_feed.php", "install.php" and "install"
    269 directory'
    270       );
    271 
    272     array_push(
    273       $page['infos'],
    274       'in include/mysql.inc.php, remove
    275 <pre style="background-color:lightgray">
    276 define(\'PHPWG_IN_UPGRADE\', true);
    277 </pre>'
    278       );
    279 
    280     array_push(
    281       $page['infos'],
    282       'Perform a maintenance check in [Administration>General>Maintenance]
    283 if you encounter any problem.'
     301    array_push($page['infos'],
     302      l10n('delete upgrade files'),
     303      l10n('remove line from mysql.inc.php') . '<pre>define(\'PHPWG_IN_UPGRADE\', true);</pre>',
     304      l10n('perform a maintenance check')
    284305      );
    285306
Note: See TracChangeset for help on using the changeset viewer.