fix database_dump regex not working with no password
This commit is contained in:
parent
857f7e4041
commit
5a4b089a61
@ -164,7 +164,7 @@ class AdminPage extends Extension {
|
||||
global $page;
|
||||
|
||||
$matches = array();
|
||||
preg_match("#^(?P<proto>\w+)\:(?:user=(?P<user>\w+)(?:;|$)|password=(?P<password>\w+)(?:;|$)|host=(?P<host>[\w\.\-]+)(?:;|$)|dbname=(?P<dbname>[\w_]+)(?:;|$))+#", DATABASE_DSN, $matches);
|
||||
preg_match("#^(?P<proto>\w+)\:(?:user=(?P<user>\w+)(?:;|$)|password=(?P<password>\w*)(?:;|$)|host=(?P<host>[\w\.\-]+)(?:;|$)|dbname=(?P<dbname>[\w_]+)(?:;|$))+#", DATABASE_DSN, $matches);
|
||||
$software = $matches['proto'];
|
||||
$username = $matches['user'];
|
||||
$password = $matches['password'];
|
||||
@ -184,6 +184,8 @@ class AdminPage extends Extension {
|
||||
break;
|
||||
}
|
||||
|
||||
//FIXME: .SQL dump is empty if cmd doesn't exist
|
||||
|
||||
$page->set_mode("data");
|
||||
$page->set_type("application/x-unknown");
|
||||
$page->set_filename('shimmie-'.date('Ymd').'.sql');
|
||||
|
Loading…
x
Reference in New Issue
Block a user