core

Changeset 24448

Show
Ignore:
Timestamp:
07/07/08 10:08:59 (6 months ago)
Author:
markwest
Message:

Fixed #30 - upgrade.php should check database connection

Location:
branches/zikula-1.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/zikula-1.0/includes/pnAPI.php

    r24364 r24448  
    311311                } 
    312312                pnShutDown(); 
     313            } else { 
     314                return false; 
    313315            } 
    314316        } 
  • branches/zikula-1.0/upgrade.php

    r24364 r24448  
    5555if ($action === 'regenerate' || $action === 'install' || $action === 'upgrademodules') { 
    5656    include 'includes/pnAPI.php'; 
    57     pnInit(PN_CORE_ALL & ~PN_CORE_TOOLS & ~PN_CORE_DECODEURLS & ~PN_CORE_SESSIONS); 
    58      
     57    if (!pnInit(PN_CORE_ALL & ~PN_CORE_TOOLS & ~PN_CORE_DECODEURLS & ~PN_CORE_SESSIONS)) { 
     58        Loader::requireOnce('includes/templates/dbconnectionerror.htm'); 
     59        pnShutDown(); 
     60    } 
     61 
    5962    $username = FormUtil::getPassedValue('username'); 
    6063    $password = FormUtil::getPassedValue('password'); 
     
    137140    $_SESSION['_PNUpgrader']['_PNUpgradeFrom76x'] = true; 
    138141    include 'includes/pnAPI.php'; 
    139     pnInit(PN_CORE_ALL & ~PN_CORE_THEME & ~PN_CORE_AJAX & ~PN_CORE_SESSIONS & ~PN_CORE_TOOLS); 
     142    if (!pnInit(PN_CORE_ALL & ~PN_CORE_THEME & ~PN_CORE_AJAX & ~PN_CORE_SESSIONS & ~PN_CORE_TOOLS)) { 
     143        Loader::requireOnce('includes/templates/dbconnectionerror.htm'); 
     144        pnShutDown(); 
     145    } 
    140146 
    141147    _upg_header(); 
 
 
Powered by Trac
Design by Arcsin