]> source.dussan.org Git - nextcloud-server.git/commitdiff
rename admin_export -> admin_migrate
authorTom Needham <needham.thomas@gmail.com>
Sat, 7 Apr 2012 17:23:25 +0000 (17:23 +0000)
committerTom Needham <needham.thomas@gmail.com>
Sat, 7 Apr 2012 17:23:25 +0000 (17:23 +0000)
apps/admin_export/appinfo/app.php [deleted file]
apps/admin_export/appinfo/info.xml [deleted file]
apps/admin_export/settings.php [deleted file]
apps/admin_export/templates/settings.php [deleted file]
apps/admin_migrate/appinfo/app.php [new file with mode: 0644]
apps/admin_migrate/appinfo/info.xml [new file with mode: 0644]
apps/admin_migrate/settings.php [new file with mode: 0644]
apps/admin_migrate/templates/settings.php [new file with mode: 0644]

diff --git a/apps/admin_export/appinfo/app.php b/apps/admin_export/appinfo/app.php
deleted file mode 100644 (file)
index 4e896ab..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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'
-);
diff --git a/apps/admin_export/appinfo/info.xml b/apps/admin_export/appinfo/info.xml
deleted file mode 100644 (file)
index e434705..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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>
diff --git a/apps/admin_export/settings.php b/apps/admin_export/settings.php
deleted file mode 100644 (file)
index 719bedb..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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
diff --git a/apps/admin_export/templates/settings.php b/apps/admin_export/templates/settings.php
deleted file mode 100644 (file)
index 36eec84..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<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>
diff --git a/apps/admin_migrate/appinfo/app.php b/apps/admin_migrate/appinfo/app.php
new file mode 100644 (file)
index 0000000..e45d3f6
--- /dev/null
@@ -0,0 +1,33 @@
+<?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'
+);
diff --git a/apps/admin_migrate/appinfo/info.xml b/apps/admin_migrate/appinfo/info.xml
new file mode 100644 (file)
index 0000000..67fc3f9
--- /dev/null
@@ -0,0 +1,11 @@
+<?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>
diff --git a/apps/admin_migrate/settings.php b/apps/admin_migrate/settings.php
new file mode 100644 (file)
index 0000000..981d5f4
--- /dev/null
@@ -0,0 +1,55 @@
+<?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
diff --git a/apps/admin_migrate/templates/settings.php b/apps/admin_migrate/templates/settings.php
new file mode 100644 (file)
index 0000000..36eec84
--- /dev/null
@@ -0,0 +1,24 @@
+<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>