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