change <create> value in db export

This commit is contained in:
Tom Needham 2012-03-02 21:54:44 +00:00
parent 9c79de4aa0
commit 8188a9f51b
1 changed files with 2 additions and 0 deletions

View File

@ -59,9 +59,11 @@ if (isset($_POST['admin_export'])) {
$dbnamestring = "<database>\n\n <name>" . OC_Config::getValue( "dbname", "owncloud" );
$dbtableprefixstring = "<table>\n\n <name>" . OC_Config::getValue( "dbtableprefix", "_oc" );
$createstring = "<database>\n\n <name>*dbname*</name>\n <create>true</create>";
$dbexport = str_replace( $dbnamestring, "<database>\n\n <name>*dbname*", $dbexport );
$dbexport = str_replace( $dbtableprefixstring, "<table>\n\n <name>*dbtableprefix*", $dbexport );
$dbexport = str_replace( $createstring, "<database>\n\n <name>*dbname*</name>\n <create>false</create", $dbexport );
// Write the new db export file
file_put_contents( $dbfile, $dbexport );