aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_migrate
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-08-26 17:30:07 +0200
commit72e9a2ce57ee88503db83614cec5ccda71f0b58e (patch)
tree8bc301ca22d9ca08ea54426bcb61f62bd1c1cb75 /apps/user_migrate
parent32bad688bdb4fea55eba9d4255fc55f1c60a0aca (diff)
downloadnextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.tar.gz
nextcloud-server-72e9a2ce57ee88503db83614cec5ccda71f0b58e.zip
moved to apps repository
Diffstat (limited to 'apps/user_migrate')
-rw-r--r--apps/user_migrate/ajax/export.php62
-rw-r--r--apps/user_migrate/appinfo/app.php33
-rw-r--r--apps/user_migrate/appinfo/info.xml11
-rw-r--r--apps/user_migrate/appinfo/version1
-rw-r--r--apps/user_migrate/js/export.js27
-rw-r--r--apps/user_migrate/l10n/.gitkeep0
-rw-r--r--apps/user_migrate/l10n/ca.php10
-rw-r--r--apps/user_migrate/l10n/cs_CZ.php10
-rw-r--r--apps/user_migrate/l10n/de.php10
-rw-r--r--apps/user_migrate/l10n/el.php8
-rw-r--r--apps/user_migrate/l10n/eo.php10
-rw-r--r--apps/user_migrate/l10n/es.php5
-rw-r--r--apps/user_migrate/l10n/fi_FI.php9
-rw-r--r--apps/user_migrate/l10n/fr.php10
-rw-r--r--apps/user_migrate/l10n/it.php10
-rw-r--r--apps/user_migrate/l10n/ja_JP.php10
-rw-r--r--apps/user_migrate/l10n/lt_LT.php10
-rw-r--r--apps/user_migrate/l10n/pl.php10
-rw-r--r--apps/user_migrate/l10n/ru.php10
-rw-r--r--apps/user_migrate/l10n/sl.php10
-rw-r--r--apps/user_migrate/l10n/sv.php10
-rw-r--r--apps/user_migrate/l10n/th_TH.php10
-rw-r--r--apps/user_migrate/settings.php89
-rw-r--r--apps/user_migrate/templates/settings.php19
24 files changed, 0 insertions, 394 deletions
diff --git a/apps/user_migrate/ajax/export.php b/apps/user_migrate/ajax/export.php
deleted file mode 100644
index 07c35c73470..00000000000
--- a/apps/user_migrate/ajax/export.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-/**
- * ownCloud - user_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/>.
- *
- */
-// Init owncloud
-
-
-// Check if we are a user
-OCP\JSON::checkLoggedIn();
-OCP\App::checkAppEnabled('user_migrate');
-// Which operation
-if( $_GET['operation']=='create' ){
- $uid = !empty( $_POST['uid'] ) ? $_POST['uid'] : OCP\USER::getUser();
- if( $uid != OCP\USER::getUser() ){
- // Needs to be admin to export someone elses account
- OCP\JSON::error();
- die();
- }
- // Create the export zip
- $response = json_decode( OC_Migrate::export( $uid ) );
- if( !$response->success ){
- // Error
- OCP\JSON::error();
- die();
- } else {
- // Save path in session
- $_SESSION['ocuserexportpath'] = $response->data;
- }
- OCP\JSON::success();
- die();
-} else if( $_GET['operation']=='download' ){
- // Download the export
- $path = isset( $_SESSION['ocuserexportpath'] ) ? $_SESSION['ocuserexportpath'] : false;
- if( !$path ){
- OCP\JSON::error();
- }
- header("Content-Type: application/zip");
- header("Content-Disposition: attachment; filename=" . basename($path));
- header("Content-Length: " . filesize($path));
- @ob_end_clean();
- readfile($path);
- unlink( $path );
- $_SESSION['ocuserexportpath'] = '';
-}
diff --git a/apps/user_migrate/appinfo/app.php b/apps/user_migrate/appinfo/app.php
deleted file mode 100644
index 366c4004932..00000000000
--- a/apps/user_migrate/appinfo/app.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/**
-* ownCloud - user_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/>.
-*
-*/
-
-OCP\App::registerPersonal( 'user_migrate', 'settings' );
-OCP\Util::addscript( 'user_migrate', 'export');
-
-// add settings page to navigation
-$entry = array(
- 'id' => "user_migrate_settings",
- 'order'=>1,
- 'href' => OCP\Util::linkTo( "user_migrate", "admin.php" ),
- 'name' => 'Import'
-);
diff --git a/apps/user_migrate/appinfo/info.xml b/apps/user_migrate/appinfo/info.xml
deleted file mode 100644
index a128742480a..00000000000
--- a/apps/user_migrate/appinfo/info.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<info>
- <id>user_migrate</id>
- <name>User Account Migration</name>
- <description>Migrate your user accounts</description>
- <licence>AGPL</licence>
- <author>Tom Needham</author>
- <require>4</require>
- <shipped>true</shipped>
- <default_enable/>
-</info>
diff --git a/apps/user_migrate/appinfo/version b/apps/user_migrate/appinfo/version
deleted file mode 100644
index ceab6e11ece..00000000000
--- a/apps/user_migrate/appinfo/version
+++ /dev/null
@@ -1 +0,0 @@
-0.1 \ No newline at end of file
diff --git a/apps/user_migrate/js/export.js b/apps/user_migrate/js/export.js
deleted file mode 100644
index aef45c45a7b..00000000000
--- a/apps/user_migrate/js/export.js
+++ /dev/null
@@ -1,27 +0,0 @@
-$(document).ready(function(){
- // Do the export
- $('#exportbtn').click(function(){
- // Show loader
- $('.loading').show();
- $.getJSON(
- OC.filePath('user_migrate','ajax','export.php'),
- {operation:'create'},
- function(result){
- if(result.status == 'success'){
- // Download the file
- window.location = OC.linkTo('user_migrate','ajax/export.php') + '?operation=download';
- $('.loading').hide();
- $('#exportbtn').val(t('user_migrate', 'Export'));
- } else {
- // Cancel loading
- $('#exportbtn').html('Failed');
- // Show Dialog
- OC.dialogs.alert(t('user_migrate', 'Something went wrong while the export file was being generated'), t('user_migrate', 'An error has occurred'), function(){
- $('#exportbtn').html(t('user_migrate', 'Export')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />');
- });
- }
- }
- // End ajax
- );
- });
-}); \ No newline at end of file
diff --git a/apps/user_migrate/l10n/.gitkeep b/apps/user_migrate/l10n/.gitkeep
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/apps/user_migrate/l10n/.gitkeep
+++ /dev/null
diff --git a/apps/user_migrate/l10n/ca.php b/apps/user_migrate/l10n/ca.php
deleted file mode 100644
index 6e423c01b0b..00000000000
--- a/apps/user_migrate/l10n/ca.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Exporta",
-"Something went wrong while the export file was being generated" => "Alguna cosa ha anat malament en generar el fitxer d'exportació",
-"An error has occurred" => "S'ha produït un error",
-"Export your user account" => "Exportar el compte d'usuari",
-"This will create a compressed file that contains your ownCloud account." => "Això crearà un fitxer comprimit que conté el vostre compte ownCloud.",
-"Import user account" => "Importar el compte d'usuari",
-"ownCloud User Zip" => "zip d'usuari ownCloud",
-"Import" => "Importa"
-);
diff --git a/apps/user_migrate/l10n/cs_CZ.php b/apps/user_migrate/l10n/cs_CZ.php
deleted file mode 100644
index 81a5a45d978..00000000000
--- a/apps/user_migrate/l10n/cs_CZ.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Export",
-"Something went wrong while the export file was being generated" => "Během vytváření souboru exportu došlo k chybě",
-"An error has occurred" => "Nastala chyba",
-"Export your user account" => "Export Vašeho uživatelského účtu",
-"This will create a compressed file that contains your ownCloud account." => "Bude vytvořen komprimovaný soubor, obsahující Váš ownCloud účet.",
-"Import user account" => "Import uživatelského účtu",
-"ownCloud User Zip" => "Zip soubor uživatele ownCloud",
-"Import" => "Import"
-);
diff --git a/apps/user_migrate/l10n/de.php b/apps/user_migrate/l10n/de.php
deleted file mode 100644
index 928a211dd4e..00000000000
--- a/apps/user_migrate/l10n/de.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Export",
-"Something went wrong while the export file was being generated" => "Beim Export der Datei ist etwas schiefgegangen.",
-"An error has occurred" => "Es ist ein Fehler aufgetreten.",
-"Export your user account" => "Ihr Konto exportieren",
-"This will create a compressed file that contains your ownCloud account." => "Eine komprimierte Datei wird erzeugt, die Ihr ownCloud-Konto enthält.",
-"Import user account" => "Konto importieren",
-"ownCloud User Zip" => "Zip-Archiv mit Benutzerdaten",
-"Import" => "Importieren"
-);
diff --git a/apps/user_migrate/l10n/el.php b/apps/user_migrate/l10n/el.php
deleted file mode 100644
index 5b57e69a637..00000000000
--- a/apps/user_migrate/l10n/el.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Εξαγωγή",
-"An error has occurred" => "Παρουσιάστηκε σφάλμα",
-"Export your user account" => "Εξαγωγή του λογαριασμού χρήστη σας",
-"This will create a compressed file that contains your ownCloud account." => "Αυτό θα δημιουργήσει ένα συμπιεσμένο αρχείο που θα περιέχει τον λογαριασμό σας ownCloud.",
-"Import user account" => "Εισαγωγή λογαριασμού χρήστη",
-"Import" => "Εισαγωγή"
-);
diff --git a/apps/user_migrate/l10n/eo.php b/apps/user_migrate/l10n/eo.php
deleted file mode 100644
index ca918061691..00000000000
--- a/apps/user_migrate/l10n/eo.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Malenporti",
-"Something went wrong while the export file was being generated" => "Io malsukcesis dum la enportota dosiero generiĝis",
-"An error has occurred" => "Eraro okazis",
-"Export your user account" => "Malenporti vian uzantokonton",
-"This will create a compressed file that contains your ownCloud account." => "Ĉi tio kreos densigitan dosieron, kiu enhavas vian konton de ownCloud.",
-"Import user account" => "Enporti uzantokonton",
-"ownCloud User Zip" => "ZIP-dosiero de uzanto de ownCloud",
-"Import" => "Enporti"
-);
diff --git a/apps/user_migrate/l10n/es.php b/apps/user_migrate/l10n/es.php
deleted file mode 100644
index 6a0551fe235..00000000000
--- a/apps/user_migrate/l10n/es.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Exportar",
-"ownCloud User Zip" => "Zip de usuario de ownCloud",
-"Import" => "Importar"
-);
diff --git a/apps/user_migrate/l10n/fi_FI.php b/apps/user_migrate/l10n/fi_FI.php
deleted file mode 100644
index 2616bee6f2a..00000000000
--- a/apps/user_migrate/l10n/fi_FI.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Vie",
-"Something went wrong while the export file was being generated" => "Jokin meni pieleen vientiä suorittaessa",
-"An error has occurred" => "Tapahtui virhe",
-"Export your user account" => "Vie käyttäjätilisi",
-"This will create a compressed file that contains your ownCloud account." => "Tämä luo ownCloud-käyttäjätilisi sisältävän pakatun tiedoston.",
-"Import user account" => "Tuo käyttäjätili",
-"Import" => "Tuo"
-);
diff --git a/apps/user_migrate/l10n/fr.php b/apps/user_migrate/l10n/fr.php
deleted file mode 100644
index 70ab2f8f22d..00000000000
--- a/apps/user_migrate/l10n/fr.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Exporter",
-"Something went wrong while the export file was being generated" => "Une erreur s'est produite pendant la génération du fichier d'export",
-"An error has occurred" => "Une erreur s'est produite",
-"Export your user account" => "Exportez votre compte utilisateur",
-"This will create a compressed file that contains your ownCloud account." => "Cette action va créer une archive compressée qui contiendra les données de votre compte ownCloud.",
-"Import user account" => "Importer un compte utilisateur",
-"ownCloud User Zip" => "Archive Zip de l'utilisateur",
-"Import" => "Importer"
-);
diff --git a/apps/user_migrate/l10n/it.php b/apps/user_migrate/l10n/it.php
deleted file mode 100644
index f3eeb15dab5..00000000000
--- a/apps/user_migrate/l10n/it.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Esporta",
-"Something went wrong while the export file was being generated" => "Si è verificato un errore durante la creazione del file di esportazione",
-"An error has occurred" => "Si è verificato un errore",
-"Export your user account" => "Esporta il tuo account utente",
-"This will create a compressed file that contains your ownCloud account." => "Questa operazione creerà un file compresso che contiene il tuo account ownCloud.",
-"Import user account" => "Importa account utente",
-"ownCloud User Zip" => "Zip account utente",
-"Import" => "Importa"
-);
diff --git a/apps/user_migrate/l10n/ja_JP.php b/apps/user_migrate/l10n/ja_JP.php
deleted file mode 100644
index 86c66e6319c..00000000000
--- a/apps/user_migrate/l10n/ja_JP.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "エクスポート",
-"Something went wrong while the export file was being generated" => "エクスポートファイルの生成時に何か不具合が発生しました。",
-"An error has occurred" => "エラーが発生しました",
-"Export your user account" => "ユーザアカウントのエクスポート",
-"This will create a compressed file that contains your ownCloud account." => "あなたのownCloudアカウントを含む圧縮ファイルを生成します。",
-"Import user account" => "ユーザアカウントをインポート",
-"ownCloud User Zip" => "ownCloudユーザZip",
-"Import" => "インポート"
-);
diff --git a/apps/user_migrate/l10n/lt_LT.php b/apps/user_migrate/l10n/lt_LT.php
deleted file mode 100644
index 20add8037bf..00000000000
--- a/apps/user_migrate/l10n/lt_LT.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Eksportuoti",
-"Something went wrong while the export file was being generated" => "Įvyko klaida kuriant eksportuojamą failą",
-"An error has occurred" => "Įvyko klaida",
-"Export your user account" => "Eksportuoti jūsų vartotojo paskyrą",
-"This will create a compressed file that contains your ownCloud account." => "Bus sukurtas suglaudintas failas su jūsų ownCloud vartotojo paskyra.",
-"Import user account" => "Importuoti vartotojo paskyrą",
-"ownCloud User Zip" => "ownCloud vartotojo paskyros Zip archyvas",
-"Import" => "Importuoti"
-);
diff --git a/apps/user_migrate/l10n/pl.php b/apps/user_migrate/l10n/pl.php
deleted file mode 100644
index c3a6332578e..00000000000
--- a/apps/user_migrate/l10n/pl.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Eksport",
-"Something went wrong while the export file was being generated" => "Coś poszło źle, podczas generowania pliku eksportu",
-"An error has occurred" => "Wystąpił błąd",
-"Export your user account" => "Eksportuj konto użytkownika",
-"This will create a compressed file that contains your ownCloud account." => "Spowoduje to utworzenie pliku skompresowanego, który zawiera konto ownCloud.",
-"Import user account" => "Importuj konto użytkownika",
-"ownCloud User Zip" => "paczka Zip użytkownika ownCloud",
-"Import" => "Importuj"
-);
diff --git a/apps/user_migrate/l10n/ru.php b/apps/user_migrate/l10n/ru.php
deleted file mode 100644
index c8889ad0215..00000000000
--- a/apps/user_migrate/l10n/ru.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Экспорт",
-"Something went wrong while the export file was being generated" => "В процессе создания файла экспорта что-то пошло не так",
-"An error has occurred" => "Произошла ошибка",
-"Export your user account" => "Экспортировать ваш аккаунт пользователя",
-"This will create a compressed file that contains your ownCloud account." => "Будет создан сжатый файл, содержащий ваш аккаунт ownCloud",
-"Import user account" => "Импортировать аккаунт пользователя",
-"ownCloud User Zip" => "Архив пользователя ownCloud",
-"Import" => "Импорт"
-);
diff --git a/apps/user_migrate/l10n/sl.php b/apps/user_migrate/l10n/sl.php
deleted file mode 100644
index c14bca0f709..00000000000
--- a/apps/user_migrate/l10n/sl.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Izvozi",
-"Something went wrong while the export file was being generated" => "Med ustvarjanjem datoteke za izvoz je prišlo do napake",
-"An error has occurred" => "Prišlo je do napake",
-"Export your user account" => "Izvozi vaš uporabniški račun",
-"This will create a compressed file that contains your ownCloud account." => "Ustvarjena bo stisnjena datoteka z vašim ownCloud računom.",
-"Import user account" => "Uvozi uporabniški račun",
-"ownCloud User Zip" => "Zip datoteka ownCloud uporabnika",
-"Import" => "Uvozi"
-);
diff --git a/apps/user_migrate/l10n/sv.php b/apps/user_migrate/l10n/sv.php
deleted file mode 100644
index 98e649632b8..00000000000
--- a/apps/user_migrate/l10n/sv.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "Exportera",
-"Something went wrong while the export file was being generated" => "Något gick fel när exportfilen skulle genereras",
-"An error has occurred" => "Ett fel har uppstått",
-"Export your user account" => "Exportera ditt användarkonto",
-"This will create a compressed file that contains your ownCloud account." => "Detta vill skapa en komprimerad fil som innehåller ditt ownCloud-konto.",
-"Import user account" => "Importera ett användarkonto",
-"ownCloud User Zip" => "ownCloud Zip-fil",
-"Import" => "Importera"
-);
diff --git a/apps/user_migrate/l10n/th_TH.php b/apps/user_migrate/l10n/th_TH.php
deleted file mode 100644
index d2c36bb4edd..00000000000
--- a/apps/user_migrate/l10n/th_TH.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php $TRANSLATIONS = array(
-"Export" => "ส่งออก",
-"Something went wrong while the export file was being generated" => "เกิดข้อผิดพลาดบางประการในระหว่างการส่งออกไฟล์",
-"An error has occurred" => "เกิดข้อผิดพลาดบางประการ",
-"Export your user account" => "ส่งออกบัญชีผู้ใช้งานของคุณ",
-"This will create a compressed file that contains your ownCloud account." => "ส่วนนี้จะเป็นการสร้างไฟล์บีบอัดที่บรรจุข้อมูลบัญชีผู้ใช้งาน ownCloud ของคุณ",
-"Import user account" => "นำเข้าบัญชีผู้ใช้งาน",
-"ownCloud User Zip" => "ไฟล์ Zip ผู้ใช้งาน ownCloud",
-"Import" => "นำเข้า"
-);
diff --git a/apps/user_migrate/settings.php b/apps/user_migrate/settings.php
deleted file mode 100644
index 098927fa17d..00000000000
--- a/apps/user_migrate/settings.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/**
- * ownCloud - user_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/>.
- *
- */
-OCP\App::checkAppEnabled('user_migrate');
-if (isset($_POST['user_import'])) {
- $root = OC::$SERVERROOT . "/";
- $importname = "owncloud_import_" . date("y-m-d_H-i-s");
-
- // Save data dir for later
- $datadir = OCP\Config::getSystemValue( 'datadirectory' );
-
- // Copy the uploaded file
- $from = $_FILES['owncloud_import']['tmp_name'];
- $to = get_temp_dir().'/'.$importname.'.zip';
- if( !move_uploaded_file( $from, $to ) ){
-
- $error = array('error'=>'Failed to move the uploaded file','hint'=>'Try checking the permissions of the '.get_temp_dir().' dir.');
- OCP\Util::writeLog( 'user_migrate', "Failed to copy the uploaded file", OCP\Util::ERROR );
- $tmpl = new OCP\Template('user_migrate', 'settings');
- $tmpl->assign('error',$error);
- //return $tmpl->fetchPage();
- }
-
-
- $response = json_decode( OC_Migrate::import( $to, 'user' ) );
- if( !$response->success ){
- $error = array('error'=>'There was an error while importing the user!','hint'=>'Please check the logs for a more detailed explaination');
- $tmpl = new OCP\Template('user_migrate', 'settings');
- $tmpl->assign('error',$error);
- //return $tmpl->fetchPage();
- } else {
- // Check import status
- foreach( $response->data as $app => $status ){
- if( $status != 'true' ){
- // It failed for some reason
- if( $status == 'notsupported' ){
- $notsupported[] = $app;
- } else if( !$status ){
- $failed[] = $app;
- }
- }
- }
- // Any problems?
- if( isset( $notsupported ) || isset( $failed ) ){
- if( count( $failed ) > 0 ){
- $error = array('error'=>'Some app data failed to import','hint'=>'App data for: '.implode(', ', $failed).' failed to import.');
- $tmpl = new OCP\Template('user_migrate', 'settings');
- $tmpl->assign('error',$error);
- //return $tmpl->fetchPage();
- } else if( count( $notsupported ) > 0 ){
- $error = array('error'=>'Some app data could not be imported, as the apps are not installed on this instance','hint'=>'App data for: '.implode(', ', $notsupported).' failed to import as they were not found. Please install the apps and try again');
- $tmpl = new OCP\Template('user_migrate', 'settings');
- $tmpl->assign('error',$error);
- //return $tmpl->fetchPage();
- }
- } else {
- // Went swimmingly!
- $tmpl = new OCP\Template('user_migrate', 'settings');
- //return $tmpl->fetchPage();
- }
-
- }
-
-} else {
- // fill template
- $tmpl = new OCP\Template('user_migrate', 'settings');
- return $tmpl->fetchPage();
-} \ No newline at end of file
diff --git a/apps/user_migrate/templates/settings.php b/apps/user_migrate/templates/settings.php
deleted file mode 100644
index d6f3e2f8f6b..00000000000
--- a/apps/user_migrate/templates/settings.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<fieldset class="personalblock">
- <legend><strong><?php echo $l->t('Export your user account');?></strong></legend>
- <p><?php echo $l->t('This will create a compressed file that contains your ownCloud account.');?>
- </p>
- <button id="exportbtn">Export<img style="display: none;" class="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" /></button>
-</fieldset>
-<form id="import" action="#" method="post" enctype="multipart/form-data">
- <fieldset class="personalblock">
- <?php if(isset($_['error'])){ ?>
- <h3><?php echo $_['error']['error']; ?></h3>
- <p><?php echo $_['error']['hint']; ?></p>
- <?php } ?>
- <legend><strong><?php echo $l->t('Import user account');?></strong></legend>
- </p>
- <p><input type="file" id="owncloud_import" name="owncloud_import" style="width:280px;"><label for="owncloud_import"> <?php echo $l->t('ownCloud User Zip');?></label>
- </p>
- <input type="submit" name="user_import" value="<?php echo $l->t('Import'); ?>" />
- </fieldset>
-</form>