+++ /dev/null
-<?php
-
-/**
-* ownCloud - user_ldap
-*
-* @author Dominik Schmidt
-* @copyright 2011 Dominik Schmidt dev@dominik-schmidt.de
-* @author Tom Needham
-* @copyright 2012 Tom Needham tom@owncloud.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-OC_APP::registerAdmin('admin_export','settings');
-
-// add settings page to navigation
-$entry = array(
- 'id' => "admin_export_settings",
- 'order'=>1,
- 'href' => OC_Helper::linkTo( "admin_export", "settings.php" ),
- 'name' => 'Export'
-);
+++ /dev/null
-<?xml version="1.0"?>
-<info>
- <id>admin_export</id>
- <name>Import/Export</name>
- <description>Import/Export your owncloud data</description>
- <version>0.1</version>
- <licence>AGPL</licence>
- <author>Thomas Schmidt and Tom Needham</author>
- <require>2</require>
- <default_enable/>
-</info>
+++ /dev/null
-<?php
-
-/**
- * ownCloud - admin export
- *
- * @author Thomas Schmidt
- * @copyright 2011 Thomas Schmidt tom@opensuse.org
- * @author Tom Needham
- * @copyright 2012 Tom Needham tom@owncloud.com
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-OC_Util::checkAdminUser();
-OC_Util::checkAppEnabled('admin_export');
-
-// Export?
-if (isset($_POST['admin_export'])) {
- // Create the export zip
- if( !$path = OC_Migrate::export( null, $_POST['export_type'] ) ){
- // Error
- die('error');
- } else {
- // Download it
- header("Content-Type: application/zip");
- header("Content-Disposition: attachment; filename=" . basename($path));
- header("Content-Length: " . filesize($path));
- @ob_end_clean();
- readfile( $path );
- unlink( $path );
- }
-// Import?
-} else if( isset($_POST['admin_import']) ){
- $from = $_FILES['owncloud_import']['tmp_name'];
-
- if( !OC_Migrate::import( $from, 'instance' ) ){
- die('failed');
- }
-
-} else {
-// fill template
- $tmpl = new OC_Template('admin_export', 'settings');
- return $tmpl->fetchPage();
-}
\ No newline at end of file
+++ /dev/null
-<form id="export" action="#" method="post">
- <fieldset class="personalblock">
- <legend><strong><?php echo $l->t('Export this ownCloud instance');?></strong></legend>
- <p><?php echo $l->t('This will create a compressed file that contains the data of this owncloud instance.
- Please choose the export type:');?>
- </p>
- <h3>What would you like to export?</h3>
- <p>
- <input type="radio" name="export_type" value="instance" /> ownCloud instance ( suitable for import )<br />
- <input type="radio" name="export_type" value="system" /> ownCloud system files<br />
- <input type="radio" name="export_type" value="userfiles" /> Just user files<br />
- <input type="submit" name="admin_export" value="<?php echo $l->t('Export'); ?>" />
- </fieldset>
-</form>
-<form id="import" action="#" method="post" enctype="multipart/form-data">
- <fieldset class="personalblock">
- <legend><strong><?php echo $l->t('Import an ownCloud instance. THIS WILL DELETE ALL CURRENT OWNCLOUD DATA');?></strong></legend>
- <p><?php echo $l->t('All current ownCloud data will be replaced by the ownCloud instance that is uploaded.');?>
- </p>
- <p><input type="file" id="owncloud_import" name="owncloud_import"><label for="owncloud_import"><?php echo $l->t('ownCloud Export Zip File');?></label>
- </p>
- <input type="submit" name="admin_import" value="<?php echo $l->t('Import'); ?>" />
- </fieldset>
-</form>
--- /dev/null
+<?php
+
+/**
+* ownCloud - admin_migrate
+*
+* @author Tom Needham
+* @copyright 2012 Tom Needham tom@owncloud.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+
+OC_APP::registerAdmin('admin_migrate','settings');
+
+// add settings page to navigation
+$entry = array(
+ 'id' => "admin_migrate_settings",
+ 'order'=>1,
+ 'href' => OC_Helper::linkTo( "admin_migrate", "settings.php" ),
+ 'name' => 'Export'
+);
--- /dev/null
+<?xml version="1.0"?>
+<info>
+ <id>admin_migrate</id>
+ <name>ownCloud Instance Migration</name>
+ <description>Import/Export your owncloud instance</description>
+ <version>0.1</version>
+ <licence>AGPL</licence>
+ <author>Thomas Schmidt and Tom Needham</author>
+ <require>2</require>
+ <default_enable/>
+</info>
--- /dev/null
+<?php
+
+/**
+ * ownCloud - admin_migrate
+ *
+ * @author Thomas Schmidt
+ * @copyright 2011 Thomas Schmidt tom@opensuse.org
+ * @author Tom Needham
+ * @copyright 2012 Tom Needham tom@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+OC_Util::checkAdminUser();
+OC_Util::checkAppEnabled('admin_migrate');
+
+// Export?
+if (isset($_POST['admin_export'])) {
+ // Create the export zip
+ if( !$path = OC_Migrate::export( null, $_POST['export_type'] ) ){
+ // Error
+ die('error');
+ } else {
+ // Download it
+ header("Content-Type: application/zip");
+ header("Content-Disposition: attachment; filename=" . basename($path));
+ header("Content-Length: " . filesize($path));
+ @ob_end_clean();
+ readfile( $path );
+ unlink( $path );
+ }
+// Import?
+} else if( isset($_POST['admin_import']) ){
+ $from = $_FILES['owncloud_import']['tmp_name'];
+
+ if( !OC_Migrate::import( $from, 'instance' ) ){
+ die('failed');
+ }
+
+} else {
+// fill template
+ $tmpl = new OC_Template('admin_migrate', 'settings');
+ return $tmpl->fetchPage();
+}
\ No newline at end of file
--- /dev/null
+<form id="export" action="#" method="post">
+ <fieldset class="personalblock">
+ <legend><strong><?php echo $l->t('Export this ownCloud instance');?></strong></legend>
+ <p><?php echo $l->t('This will create a compressed file that contains the data of this owncloud instance.
+ Please choose the export type:');?>
+ </p>
+ <h3>What would you like to export?</h3>
+ <p>
+ <input type="radio" name="export_type" value="instance" /> ownCloud instance ( suitable for import )<br />
+ <input type="radio" name="export_type" value="system" /> ownCloud system files<br />
+ <input type="radio" name="export_type" value="userfiles" /> Just user files<br />
+ <input type="submit" name="admin_export" value="<?php echo $l->t('Export'); ?>" />
+ </fieldset>
+</form>
+<form id="import" action="#" method="post" enctype="multipart/form-data">
+ <fieldset class="personalblock">
+ <legend><strong><?php echo $l->t('Import an ownCloud instance. THIS WILL DELETE ALL CURRENT OWNCLOUD DATA');?></strong></legend>
+ <p><?php echo $l->t('All current ownCloud data will be replaced by the ownCloud instance that is uploaded.');?>
+ </p>
+ <p><input type="file" id="owncloud_import" name="owncloud_import"><label for="owncloud_import"><?php echo $l->t('ownCloud Export Zip File');?></label>
+ </p>
+ <input type="submit" name="admin_import" value="<?php echo $l->t('Import'); ?>" />
+ </fieldset>
+</form>