Bug #22557 » 14265.diff
class.tx_dbal_installtool.php (working copy) | ||
---|---|---|
* @return void
|
||
*/
|
||
protected function createConnectionForm($driver, array &$markers, tx_install $instObj) {
|
||
// Normalize current driver
|
||
if (!$driver) {
|
||
$driver = $this->getDefaultDriver();
|
||
}
|
||
// Get the template file
|
||
$templateFile = @file_get_contents(
|
||
t3lib_extMgm::extPath('dbal') . $this->templateFilePath . 'install.html'
|
||
... | ... | |
$formSubPart = t3lib_parsehtml::getSubpart(
|
||
$template, '###CONNECTION_FORM###'
|
||
);
|
||
$driverTemplate = t3lib_parsehtml::getSubpart(
|
||
$formSubPart, '###DATABASE_DRIVER###'
|
||
);
|
||
$driverSubPart = $this->prepareDatabaseDrivers($driverTemplate);
|
||
if ($this->getNumberOfAvailableDrivers() == 1 && $this->getDefaultDriver() === 'mysql') {
|
||
// Only MySQL is actually available (PDO support may be compiled in
|
||
// PHP itself and as such DBAL was activated, behaves as if DBAL were
|
||
// not activated
|
||
$driverSubPart = '';
|
||
} else {
|
||
$driverTemplate = t3lib_parsehtml::getSubpart(
|
||
$formSubPart, '###DATABASE_DRIVER###'
|
||
);
|
||
$driverSubPart = $this->prepareDatabaseDrivers($driverTemplate);
|
||
}
|
||
$formSubPart = t3lib_parsehtml::substituteSubpart(
|
||
$formSubPart,
|
||
'###DATABASE_DRIVER###',
|
||
$driverSubPart
|
||
);
|
||
if (!$driver) {
|
||
$driver = $this->getDefaultDriver();
|
||
}
|
||
// Get the subpart related to selected database driver
|
||
... | ... | |
}
|
||
/**
|
||
* Returns the number of available drivers.
|
||
*
|
||
* @return boolean
|
||
*/
|
||
protected function getNumberOfAvailableDrivers() {
|
||
$count = 0;
|
||
foreach ($this->availableDrivers as $drivers) {
|
||
$count += count($drivers);
|
||
}
|
||
return $count;
|
||
}
|
||
/**
|
||
* Returns the driver that is selected by default in the
|
||
* Install Tool dropdown list.
|
||
*
|
- « Previous
- 1
- 2
- Next »