Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0
2.0
10 changes: 1 addition & 9 deletions config/config-example.json → config/config-example_mysql.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@
"DEBUG_MODE": "QN_DEBUG_PHP | QN_DEBUG_ORM | QN_DEBUG_SQL",
"DEBUG_LEVEL": "E_ALL | E_ALL",
"DEFAULT_LANG": "fr",
"EMAIL_SMTP_HOST": "smtp.mailtrap.io",
"EMAIL_SMTP_PORT": "2525",
"EMAIL_SMTP_ACCOUNT_DISPLAYNAME": "equal.run",
"EMAIL_SMTP_ACCOUNT_USERNAME": "my_username",
"EMAIL_SMTP_ACCOUNT_PASSWORD": "my_password",
"EMAIL_SMTP_ACCOUNT_EMAIL": "nabu@equal.run",
"EMAIL_SMTP_ABUSE_EMAIL": "cloud.abuse@equal.run",
"DB_REPLICATION": "NO",
"DB_DBMS": "MYSQL",
"DB_CHARSET": "UTF8",
"DB_HOST": "127.0.0.1",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "test",
"DB_NAME": "equal",
"DEFAULT_PACKAGE": "lodging",
"DEFAULT_PACKAGE": "core",
"UPLOAD_MAX_FILE_SIZE": "64MB",
"L10N_TIMEZONE": "Europe/Brussels",
"L10N_LOCALE": "fr",
Expand Down
26 changes: 26 additions & 0 deletions config/config-example_sqlsrv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"CIPHER_KEY": "xxxxxxxxxxxxxxxxxxxxxxxx",
"ROUTING_METHOD": "JSON",
"FILE_STORAGE_MODE":"DB",
"DEFAULT_RIGHTS": "QN_R_CREATE | QN_R_READ | QN_R_DELETE | QN_R_WRITE",
"DEBUG_MODE": "QN_DEBUG_PHP | QN_DEBUG_ORM | QN_DEBUG_SQL",
"DEBUG_LEVEL": "E_ALL | E_ALL",
"DEFAULT_LANG": "en",
"DB_REPLICATION": "NO",
"DB_DBMS": "SQLSRV",
"DB_CHARSET": "UTF-8",
"DB_COLLATION": "LATIN1_GENERAL_100_CS_AS_SC",
"DB_HOST": "127.0.0.1",
"DB_PORT": "1433",
"DB_USER": "sa",
"DB_PASSWORD": "test",
"DB_NAME": "equal",
"LOGGING_ENABLED": true,
"DRAFT_VALIDITY": 0,
"VERSIONING_ENABLED": true,
"AUTH_SECRET_KEY": "my_secret_key",
"AUTH_ACCESS_TOKEN_VALIDITY": "1d",
"AUTH_REFRESH_TOKEN_VALIDITY": "90d",
"AUTH_TOKEN_HTTPS": false,
"ROOT_APP_URL": "http://equal.local"
}
2 changes: 1 addition & 1 deletion eq.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,4 +1217,4 @@ public static function get_last_context() {
}
}

}
}
2 changes: 1 addition & 1 deletion lib/equal/data/DataAdapter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ private function init() {
'php' => function($value) {
// read from DB
if(constant('FILE_STORAGE_MODE') == 'DB') {
// fields of type file/binary are stored as binary value (MEDIUMBLOB)
// fields of type file/binary are stored as binary value
$res = $value;
}
// read the content from filestore, filename is the received value
Expand Down
14 changes: 9 additions & 5 deletions lib/equal/db/DBConnection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ class DBConnection extends Service {

protected function __construct() {
switch(constant('DB_DBMS')) {
case 'MARIADB':
case 'MYSQL' :
$this->dbConnection = new DBManipulatorMySQL(constant('DB_HOST'), constant('DB_PORT'), constant('DB_NAME'), constant('DB_USER'), constant('DB_PASSWORD'));
break;
/*
// insert handling of other DBMS here
case 'XYZ' :
$this->dbConnection = new DBManipulatorXyz(DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD);
case 'SQLSRV' :
$this->dbConnection = new DBManipulatorSqlSrv(constant('DB_HOST'), constant('DB_PORT'), constant('DB_NAME'), constant('DB_USER'), constant('DB_PASSWORD'));
break;
case 'POSTGRE' :
// #todo
break;
case 'ORACLE' :
// #todo
break;
*/
default:
$this->dbConnection = null;
}
Expand Down
Loading