Option if the site doesn't have the class that we would use for PDO.
This will create it's own PDO connection to the database.
$smarty->setConfigDir('./configs/');
$smarty->setCacheDir('./cache/');
$smarty->setConfigDir('./configs/');
$smarty->setCacheDir('./cache/');
-$dbh = Toolkit_Database::getInstance();
+if ( class_exists( Toolkit_Database ) ) {
+ $dbh = Toolkit_Database::getInstance();
+} else {
+ $dsn = 'pgsql:' . CONN_STR;
+ $driverOptions = array( PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_BOTH );
+ $dbh = new PDO($dsn, null, null, $driverOptions);
+ $dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
+}