- update: upgrade from 1.4.0 or 1.4.1. Upgrade from 1.3.x is not available
anymore. - update: README files updated for very near branch 1.5 :-) - new: file tools/config_local.inc.php as example for optional include/config_local.inc.php - bug fixed: configuration parameter show_picture_name_on_title was useless git-svn-id: http://piwigo.org/svn/trunk@870 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
541c302c40
commit
1673892026
15 changed files with 691 additions and 2089 deletions
27
upgrade.php
27
upgrade.php
|
|
@ -25,7 +25,6 @@
|
|||
// | USA. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
define('IN_UPGRADE', true);
|
||||
define('PHPWG_ROOT_PATH', './');
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
|
||||
|
|
@ -34,17 +33,20 @@ include(PHPWG_ROOT_PATH.'include/template.php');
|
|||
|
||||
include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
|
||||
// Is PhpWebGallery already installed ?
|
||||
if (defined('PHPWG_INSTALLED'))
|
||||
if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
|
||||
{
|
||||
$message = 'PhpWebGallery is already installed. In include/mysql.inc.php,
|
||||
remove line
|
||||
$message = 'PhpWebGallery is not in upgrade mode. In include/mysql.inc.php,
|
||||
insert line
|
||||
<pre style="background-color:lightgray">
|
||||
define(\'PHPWG_INSTALLED\', true);
|
||||
define(\'PHPWG_IN_UPGRADE\', true);
|
||||
</pre>
|
||||
if you want to upgrade';
|
||||
die($message);
|
||||
}
|
||||
|
||||
// concerning upgrade, we use the default users table
|
||||
$conf['users_table'] = $prefixeTable.'users';
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'include/constants.php');
|
||||
define('PREFIX_TABLE', $prefixeTable);
|
||||
|
||||
|
|
@ -113,9 +115,11 @@ function execute_sqlfile($filepath, $replaced, $replacing)
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | template initialization |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$template = setup_style('default');
|
||||
|
||||
$template = new Template(PHPWG_ROOT_PATH.'template/yoga');
|
||||
$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
|
||||
$template->assign_vars(array('RELEASE'=>PHPWG_VERSION));
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | versions upgradable |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
@ -178,7 +182,16 @@ else
|
|||
array_push(
|
||||
$infos,
|
||||
'[security] delete files "upgrade.php", "install.php" and "install"
|
||||
directory');
|
||||
directory'
|
||||
);
|
||||
|
||||
array_push(
|
||||
$infos,
|
||||
'in include/mysql.inc.php, remove
|
||||
<pre style="background-color:lightgray">
|
||||
define(\'PHPWG_IN_UPGRADE\', true);
|
||||
</pre>'
|
||||
);
|
||||
|
||||
$template->assign_block_vars('upgrade.infos', array());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue