forked from emilrising/mantis-to-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdbc.php
More file actions
28 lines (23 loc) · 698 Bytes
/
dbc.php
File metadata and controls
28 lines (23 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
include ('classes/MyPDO.class.php');
// Initialize the global variable $pdo which will be used for all database
// communication.
global $pdo_mantis;
try {
$pdo_mantis = new MyPDO('conf/mantis.ini');
$pdo_mantis -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo_mantis -> setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
} catch (MyPDOException $ex) {
echo $ex;
exit();
}
global $pdo_gitlab;
try {
$pdo_gitlab = new MyPDO('conf/gitlab.ini');
$pdo_gitlab -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo_mantis -> setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
} catch (MyPDOException $ex) {
echo $ex;
exit();
}
?>