use readable time and version in file name

This commit is contained in:
Uwe Steinmann 2015-12-09 21:20:43 +01:00
parent 656bd7482f
commit da52cea6c9

View File

@ -16,6 +16,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Version.php");
include("../inc/inc.Settings.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.DBInit.php");
@ -27,7 +28,8 @@ if (!$user->isAdmin()) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
$dump_name = $settings->_contentDir.time().".sql";
$v = new SeedDMS_Version;
$dump_name = $settings->_contentDir.date('Y-m-d\TH:i:s')."_".$v->_number.".sql";
if(!$dms->createDump($dump_name))
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));