Changeset 6110 for trunk/upgrade.php


Ignore:
Timestamp:
May 8, 2010, 1:08:51 AM (14 years ago)
Author:
patdenice
Message:

Upgrade can be launched automaticaly if user is already connected as webmaster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upgrade.php

    r5982 r6110  
    3737}
    3838
    39 include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
    40 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    41 
    4239include(PHPWG_ROOT_PATH.'local/config/database.inc.php');
    4340include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
     
    4946define('PREFIX_TABLE', $prefixeTable);
    5047define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
     48
     49include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
     50include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    5151
    5252// +-----------------------------------------------------------------------+
     
    280280$mysql_changes = array();
    281281
    282 if (isset($_POST['username']) and isset($_POST['password']))
    283 {
    284   check_upgrade_access_rights($current_release, $_POST['username'], $_POST['password']);
    285 }
    286 
    287 if (isset($_POST['submit']) and check_upgrade())
     282check_upgrade_access_rights();
     283
     284if ((isset($_POST['submit']) or isset($_GET['now']))
     285  and check_upgrade())
    288286{
    289287  $upgrade_file = PHPWG_ROOT_PATH.'install/upgrade_'.$current_release.'.php';
Note: See TracChangeset for help on using the changeset viewer.