aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-03-06 00:25:47 +0000
committerrvelices <rv-github@modusoptimus.com>2008-03-06 00:25:47 +0000
commit37446caa5c362d998be6e1343995a5a7548a98a6 (patch)
tree3e124ec42bb7851756dd25229373172cf0400ccf /upgrade.php
parent7e1e705f8ba79c7579a1c433ad6cf3488a4e349b (diff)
- upgrade goes smarty
- event_tracer goes smarty - correction in index.tpl git-svn-id: http://piwigo.org/svn/trunk@2254 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'upgrade.php')
-rw-r--r--upgrade.php26
1 files changed, 8 insertions, 18 deletions
diff --git a/upgrade.php b/upgrade.php
index ee87a367f..effc008f9 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -147,7 +147,7 @@ function print_time($message)
$template = new Template(PHPWG_ROOT_PATH.'template/yoga');
$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
-$template->assign_vars(array('RELEASE'=>PHPWG_VERSION));
+$template->assign('RELEASE', PHPWG_VERSION);
// +-----------------------------------------------------------------------+
// | upgrade choice |
@@ -179,7 +179,7 @@ if (!isset($_GET['version']))
{
$current_release = '1.5.0';
}
- else if (!in_array(PREFIX_TABLE.'history_summary', $tables))
+ else if ( !in_array(PREFIX_TABLE.'history_summary', $tables) )
{
if (!in_array('auto_login_key', $columns_of[PREFIX_TABLE.'user_infos']))
{
@@ -195,7 +195,7 @@ if (!isset($_GET['version']))
die('No upgrade required, the database structure is up to date');
}
- $template->assign_block_vars(
+ $template->assign(
'introduction',
array(
'CURRENT_RELEASE' => $current_release,
@@ -215,7 +215,7 @@ else
{
die('No database upgrade required, do not refresh the page');
}
-
+
$upgrade_file = PHPWG_ROOT_PATH.'install/upgrade_'.$_GET['version'].'.php';
if (is_file($upgrade_file))
{
@@ -249,10 +249,10 @@ else
// Create empty local files to avoid log errors
create_empty_local_files();
-
+
$page['upgrade_end'] = get_moment();
- $template->assign_block_vars(
+ $template->assign(
'upgrade',
array(
'VERSION' => $_GET['version'],
@@ -290,18 +290,8 @@ define(\'PHPWG_IN_UPGRADE\', true);
if you encounter any problem.'
);
- $template->assign_block_vars('upgrade.infos', array());
+ $template->assign('infos', $page['infos']);
- foreach ($page['infos'] as $info)
- {
- $template->assign_block_vars(
- 'upgrade.infos.info',
- array(
- 'CONTENT' => $info,
- )
- );
- }
-
$query = '
UPDATE '.USER_CACHE_TABLE.'
SET need_update = \'true\'