Details
-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.7.21, 4.7.22
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Minor (add functionality in backwards-compatible manner)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:Yes
-
Overview:
-
How it works currently:The connect function is invoked without a database name, even though this parameter is passed to mysqli_connect function.
-
How it should work:Since the database name is present in all scopes of a connect invocation, this can be passed directly into the function.
Description
Related to the issue of the installation impossibility of version 4.7.21 described in Stackexchange, this improvement:
- adds the database name to all invocations of the recently introduced connect function in civicrm/install/index.php as follows:
$this->connect($server, $username, $password, $database);
For allowing the database name to be passed through all the invocations, the respective $database parameter for requireMySQLAutoIncrementIncrementOne and requireMysqlConnection was added.
- adds the $port parameter to the connect function with NULL as default value (avoiding the need to have an else block assigning this variable to NULL).