From aaf94782789be9f8ca1a488e07604b81cce0c599 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 26 Jan 2017 11:10:44 -0800 Subject: [PATCH] Database > Export : Rename file if theme/install/install.xml already exists. --- e107_handlers/xml_class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index e07ea0ccf..5f736bbd3 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -1005,7 +1005,14 @@ class xmlClass $path = e107::getParser()->replaceConstants($this->filePathDestination); if($path) { - file_put_contents($path."install.xml",$text,FILE_TEXT); + $fileName= "install.xml"; + + if(file_exists($path.$fileName)) + { + $fileName = "install_".date('Y-m-d').".xml"; + } + + file_put_contents($path.$fileName,$text,FILE_TEXT); return true; }