MSD-15: If the mysql user is changed in the database panel (tab database) the menu shows the right list of databases now.
Dieser Commit ist enthalten in:
Ursprung
870fdc667d
Commit
7deb0249dd
2 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
|
@ -182,6 +182,14 @@ class ConfigController extends Zend_Controller_Action
|
||||||
array_combine($databases, $databases)
|
array_combine($databases, $databases)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// set dynamic actual database if it's changed in the panel
|
||||||
|
if ($this->_request->isPost()) {
|
||||||
|
$actualDb = $this->view->config->get('dynamic.dbActual');
|
||||||
|
if (isset($_POST['defaultDb']) && ($_POST['defaultDb'] != $actualDb)) {
|
||||||
|
$this->view->config->set('dynamic.dbActual', $_POST['defaultDb']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $formDb;
|
return $formDb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,8 @@ $this->jQuery()->onLoadCaptureEnd();
|
||||||
<?php if (count($this->databases) > 0 ) { ?>
|
<?php if (count($this->databases) > 0 ) { ?>
|
||||||
<select name="selectedDb" id="selectedDb" style="width:157px;" onchange="this.form.submit()">
|
<select name="selectedDb" id="selectedDb" style="width:157px;" onchange="this.form.submit()">
|
||||||
<?php
|
<?php
|
||||||
|
$dbAdapter = Msd_Db::getAdapter();
|
||||||
|
$this->databases = $dbAdapter->getDatabaseNames();
|
||||||
foreach ($this->databases as $db) {
|
foreach ($this->databases as $db) {
|
||||||
echo '<option value="'.base64_encode($db).'"';
|
echo '<option value="'.base64_encode($db).'"';
|
||||||
if ($db == $this->config->get('dynamic.dbActual')) {
|
if ($db == $this->config->get('dynamic.dbActual')) {
|
||||||
|
|
Laden …
In neuem Issue referenzieren