show password prompt also when running maintain.php via dbsv-update

This commit is contained in:
following
2013-06-23 23:30:40 +02:00
parent 371894d177
commit 33bee361aa
2 changed files with 3 additions and 1 deletions

View File

@@ -54,6 +54,7 @@
function update_triggers()
{
global $opt;
echo " "; // space for the case of a DB password prompt
system('php ' . $opt['rootpath'] . 'doc/sql/stored-proc/maintain.php');
}

View File

@@ -18,7 +18,8 @@
if ($db_root_password == '')
{
echo "enter DB $db_root_username password: ";
echo "enter DB $db_root_username password:\n";
flush();
$fh = fopen('php://stdin', 'r');
$db_root_password = trim(fgets($fh, 1024));
fclose($fh);