Allow $VIRTUALSERVER_ID and $VIRTUALSERVER_CREATED variables for "Default database name"

The help description for the field mentions only limited variables:

Virtualmin allows very flexible database creation and permissions. This field allows you to specify the default name of databases created as part of domains created from this template. By default Virtualmin uses the ${PREFIX} variable, which is the first part of the domain name, and will generally also be the domain owner login name for Webmin. It may be useful to change this, in some circumstances to include a prefix that indicates the template from which it was generated, or to include additonal information about the database. It is possible to combine variables and any characters that are allowed in a PostgreSQL and/or MySQL database (depending on which databases are available). Other substitutions available here include ${DOM} for the domain name, ${USER} for the administration user, ${UID} for Unix user ID number and ${GID} for the group ID.

Would be very nice if we could use other $VIRTUALSERVER variables like, for example, $VIRTUALSERVER_ID and $VIRTUALSERVER_CREATED, or for that matter all other $VIRTUALSERVER variables as template database name pattern.

By the way, there is a typo in additonal, which should be additional in the help text above.



Assigned: Unassigned ยป

Actually you can use $ID and $CREATED in the DB name if you want.

And I will fix that typo..

Actually you can use $ID and $CREATED in the DB name if you want.

Excellent! So I guess all the variables without appending prefix $VIRTUALSERVER_ are available then? Would be nice to reflect that in the help text.

Yeah, I will bring the docs into sync for these variables