Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Revert the automatic switch to MySQLi, add a parameter instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Mar 17, 2015
1 parent fcf6c1f commit 88f4d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/core/classes/dibi/libs/Dibi.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ public static function connect($config = array(), $name = 0)
if ($name) {
trigger_error(__METHOD__ . '(): named connections are deprecated.', E_USER_DEPRECATED);
}
if ($config["driver"] == "mysql" && extension_loaded("mysqli")){
$config["driver"] = dibi::$defaultDriver;
if ($config["driver"] == "mysql" && isSet($config["use_mysqli"])
&& $config["use_mysqli"] !== false && extension_loaded("mysqli")){
$config["driver"] = "mysqli";
}
return self::$connection = self::$registry[$name] = new DibiConnection($config, $name);
}
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/core.ajaxplorer/ajxp_mixins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<global_param group_switch_name="dibi_provider" group_switch_label="MySQL" group_switch_value="mysql" name="mysql_database" default="pydio" label="Database" description="Database name" type="string" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="MySQL" group_switch_value="mysql" name="mysql_username" default="" label="User" description="User name" type="string" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="MySQL" group_switch_value="mysql" name="mysql_password" default="" label="Password" description="User password" type="password" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="MySQL" group_switch_value="mysql" name="mysql_use_mysqli" default="false" label="Use MySQLi" description="Use PHP MySQLi extension" type="boolean" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="Sqlite 3" group_switch_value="sqlite3" name="sqlite3_driver" default="sqlite3" label="Driver" description="Driver type (do not touch)" type="hidden" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="Sqlite 3" group_switch_value="sqlite3" name="sqlite3_formatDate" default="'Y-m-d'" label="formatDate" description="formatDate (do not touch)" type="hidden" mandatory="true"/>
<global_param group_switch_name="dibi_provider" group_switch_label="Sqlite 3" group_switch_value="sqlite3" name="sqlite3_formatDateTime" default="'Y-m-d H:i:s'" label="formatDateTime" description="formatDateTime (do not touch)" type="hidden" mandatory="true"/>
Expand Down

0 comments on commit 88f4d8e

Please sign in to comment.