Skip to content
Snippets Groups Projects

Provide option to set character_set on drupalConnectionCallback

Open Lawxen Liu requested to merge issue/drupacle-3477605:2.0.x into 2.0.x
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -37,13 +37,13 @@ class DrupacleController extends ControllerBase {
/**
* {@inheritdoc}
*/
public function drupalConnectionCallback(DrupacleConnectionInterface $drupacle_connection) {
public function drupalConnectionCallback(DrupacleConnectionInterface $drupacle_connection, $character_set = 'utf8') {
$connectionId = $drupacle_connection->get('id');
$db_username = $drupacle_connection->get('username');
$db_password = $drupacle_connection->get('password');
$getHost = $drupacle_connection->getHostWithPortAndService();
$oracleDB = oci_connect($db_username, $db_password, $getHost);
$oracleDB = oci_connect($db_username, $db_password, $getHost, $character_set);
if ($oracleDB) {
$response[$connectionId] = $oracleDB;
}
Loading