Conference page: Stop if there is DB connection error
parent
1ad19492f6
commit
8c37fea093
|
@ -4,12 +4,15 @@ require '../app/classes/conference.php';
|
|||
|
||||
// connect to database
|
||||
$response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $platform_id);
|
||||
|
||||
// if DB connection has error, display it and stop here
|
||||
if ($response['db'] === null) {
|
||||
$error = $response['error'];
|
||||
include '../app/templates/block-message.php';
|
||||
|
||||
// otherwise if DB connectio is OK, go on
|
||||
} else {
|
||||
$db = $response['db'];
|
||||
}
|
||||
|
||||
// specify time range
|
||||
include '../app/helpers/time_range.php';
|
||||
|
@ -38,7 +41,6 @@ if (isset($_REQUEST['id']) && $_REQUEST['id'] != '') {
|
|||
// Conference listings
|
||||
//
|
||||
|
||||
|
||||
$conferenceObject = new Conference($db);
|
||||
|
||||
// pagination variables
|
||||
|
@ -152,4 +154,6 @@ if (!empty($conferences['records'])) {
|
|||
// display the widget
|
||||
include '../app/templates/event-list-conferences.php';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue