Update database.xml locations. Fix dbexport.xml.
This commit is contained in:
parent
8188a9f51b
commit
86fed4c226
|
@ -62,8 +62,8 @@ if (isset($_POST['admin_export'])) {
|
|||
$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 );
|
||||
$dbexport = str_replace( $dbtableprefixstring, "<table>\n\n <name>*dbprefix*", $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 );
|
||||
|
@ -134,7 +134,8 @@ if (isset($_POST['admin_export'])) {
|
|||
exit();
|
||||
}
|
||||
|
||||
// TODO: Import db
|
||||
// TODO: Import db
|
||||
OC_DB::replaceDB( get_temp_dir() . '/' . $importname . '/dbexport.xml' );
|
||||
} else {
|
||||
// fill template
|
||||
$tmpl = new OC_Template('admin_export', 'settings');
|
||||
|
|
|
@ -493,10 +493,10 @@ class OC_DB {
|
|||
$apps = OC_App::getAllApps();
|
||||
|
||||
// Delete the old tables
|
||||
self::removeDBStructure( OC::$DOCUMENTROOT . 'db_structure.xml' );
|
||||
self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' );
|
||||
|
||||
foreach($apps as $app){
|
||||
$path = '/apps/'.$app.'/appinfo/database.xml';
|
||||
$path = OC::$SERVERROOT.'/apps/'.$app.'/appinfo/database.xml';
|
||||
if(file_exists($path)){
|
||||
self::removeDBStructure( $path );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue