during upgrade, reactivate TakeATour only when relevant

This commit is contained in:
plegall 2023-12-11 21:32:05 +01:00
parent 4ca786c6a9
commit 847424c255

View file

@ -461,13 +461,6 @@ if ((isset($_POST['submit']) or isset($_GET['now']))
$page['infos_sav'] = $page['infos']; $page['infos_sav'] = $page['infos'];
$page['infos'] = array(); $page['infos'] = array();
$query = '
REPLACE INTO '.PLUGINS_TABLE.'
(id, state)
VALUES (\'TakeATour\', \'active\')
;';
pwg_query($query);
$template->assign( $template->assign(
array( array(
'button_label' => l10n('Home'), 'button_label' => l10n('Home'),
@ -482,6 +475,13 @@ REPLACE INTO '.PLUGINS_TABLE.'
if (file_exists(PHPWG_PLUGINS_PATH .'TakeATour/tours/'.$version_.'/config.inc.php')) if (file_exists(PHPWG_PLUGINS_PATH .'TakeATour/tours/'.$version_.'/config.inc.php'))
{ {
$query = '
REPLACE INTO '.PLUGINS_TABLE.'
(id, state)
VALUES (\'TakeATour\', \'active\')
;';
pwg_query($query);
// we need the secret key for get_pwg_token() // we need the secret key for get_pwg_token()
load_conf_from_db(); load_conf_from_db();