One Hat Cyber Team
  • Dir : ~/var/softaculous/piwigo/
  • View File Name : orig_upgrade.php

    '; } } // Deactivate non standard extensions deactivate_non_standard_plugins(); deactivate_non_standard_themes(); deactivate_templates(); $page['upgrade_end'] = get_moment(); $template->assign( 'upgrade', array( 'VERSION' => $current_release, 'TOTAL_TIME' => get_elapsed_time( $page['upgrade_start'], $page['upgrade_end'] ), 'SQL_TIME' => number_format( $page['queries_time'], 3, '.', ' ' ).' s', 'NB_QUERIES' => $page['count_queries'] ) ); $page['infos'][] = l10n('Perform a maintenance check in [Administration>Tools>Maintenance] if you encounter any problem.'); // Save $page['infos'] in order to restore after maintenance actions $page['infos_sav'] = $page['infos']; $page['infos'] = array(); $template->assign( array( 'button_label' => l10n('Home'), 'button_link' => 'index.php', ) ); // if the webmaster has a session, let's give a link to discover new features if (!empty($_SESSION['pwg_uid'])) { $version_ = str_replace('.', '_', get_branch_from_version(PHPWG_VERSION).'.0'); 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() load_conf_from_db(); $template->assign( array( 'button_label' => l10n('Discover what\'s new in Piwigo %s', get_branch_from_version(PHPWG_VERSION)), 'button_link' => 'admin.php?submited_tour_path=tours/'.$version_.'&pwg_token='.get_pwg_token(), ) ); } } // Delete cache data include(PHPWG_ROOT_PATH . 'include/cache.class.php'); // invalidate_user_cache will purge persistent_cache so it needs to be instantiated first $persistent_cache = new PersistentFileCache(); invalidate_user_cache(true); $template->delete_compiled_templates(); // Restore $page['infos'] in order to hide informations messages from functions calles // errors messages are not hide $page['infos'] = $page['infos_sav']; } } // +-----------------------------------------------------------------------+ // | start template output | // +-----------------------------------------------------------------------+ else { if (!defined('PWG_CHARSET')) { define('PWG_CHARSET', 'utf-8'); } include_once(PHPWG_ROOT_PATH.'admin/include/languages.class.php'); $languages = new languages(); foreach ($languages->fs_languages as $language_code => $fs_language) { if ($language == $language_code) { $template->assign('language_selection', $language_code); } $languages_options[$language_code] = $fs_language['name']; } $template->assign('language_options', $languages_options); $template->assign('introduction', array( 'CURRENT_RELEASE' => $current_release, 'F_ACTION' => 'upgrade.php?language=' . $language)); if (!check_upgrade()) { $template->assign('login', true); } } if (count($page['errors']) != 0) { $template->assign('errors', $page['errors']); } if (count($page['infos']) != 0) { $template->assign('infos', $page['infos']); } // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+ $template->pparse('upgrade'); ?>