From 72e9a2ce57ee88503db83614cec5ccda71f0b58e Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 26 Aug 2012 17:30:07 +0200 Subject: moved to apps repository --- apps/user_migrate/ajax/export.php | 62 ---------------------- apps/user_migrate/appinfo/app.php | 33 ------------ apps/user_migrate/appinfo/info.xml | 11 ---- apps/user_migrate/appinfo/version | 1 - apps/user_migrate/js/export.js | 27 ---------- apps/user_migrate/l10n/.gitkeep | 0 apps/user_migrate/l10n/ca.php | 10 ---- apps/user_migrate/l10n/cs_CZ.php | 10 ---- apps/user_migrate/l10n/de.php | 10 ---- apps/user_migrate/l10n/el.php | 8 --- apps/user_migrate/l10n/eo.php | 10 ---- apps/user_migrate/l10n/es.php | 5 -- apps/user_migrate/l10n/fi_FI.php | 9 ---- apps/user_migrate/l10n/fr.php | 10 ---- apps/user_migrate/l10n/it.php | 10 ---- apps/user_migrate/l10n/ja_JP.php | 10 ---- apps/user_migrate/l10n/lt_LT.php | 10 ---- apps/user_migrate/l10n/pl.php | 10 ---- apps/user_migrate/l10n/ru.php | 10 ---- apps/user_migrate/l10n/sl.php | 10 ---- apps/user_migrate/l10n/sv.php | 10 ---- apps/user_migrate/l10n/th_TH.php | 10 ---- apps/user_migrate/settings.php | 89 -------------------------------- apps/user_migrate/templates/settings.php | 19 ------- 24 files changed, 394 deletions(-) delete mode 100644 apps/user_migrate/ajax/export.php delete mode 100644 apps/user_migrate/appinfo/app.php delete mode 100644 apps/user_migrate/appinfo/info.xml delete mode 100644 apps/user_migrate/appinfo/version delete mode 100644 apps/user_migrate/js/export.js delete mode 100644 apps/user_migrate/l10n/.gitkeep delete mode 100644 apps/user_migrate/l10n/ca.php delete mode 100644 apps/user_migrate/l10n/cs_CZ.php delete mode 100644 apps/user_migrate/l10n/de.php delete mode 100644 apps/user_migrate/l10n/el.php delete mode 100644 apps/user_migrate/l10n/eo.php delete mode 100644 apps/user_migrate/l10n/es.php delete mode 100644 apps/user_migrate/l10n/fi_FI.php delete mode 100644 apps/user_migrate/l10n/fr.php delete mode 100644 apps/user_migrate/l10n/it.php delete mode 100644 apps/user_migrate/l10n/ja_JP.php delete mode 100644 apps/user_migrate/l10n/lt_LT.php delete mode 100644 apps/user_migrate/l10n/pl.php delete mode 100644 apps/user_migrate/l10n/ru.php delete mode 100644 apps/user_migrate/l10n/sl.php delete mode 100644 apps/user_migrate/l10n/sv.php delete mode 100644 apps/user_migrate/l10n/th_TH.php delete mode 100644 apps/user_migrate/settings.php delete mode 100644 apps/user_migrate/templates/settings.php (limited to 'apps/user_migrate') 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 @@ -. - * - */ -// 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 @@ -. -* -*/ - -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 @@ - - - user_migrate - User Account Migration - Migrate your user accounts - AGPL - Tom Needham - 4 - true - - 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')+''); - }); - } - } - // 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 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 @@ - "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 @@ - "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 @@ - "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 @@ - "Εξαγωγή", -"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 @@ - "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 @@ - "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 @@ - "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 @@ - "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 @@ - "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 @@ - "エクスポート", -"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 @@ - "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 @@ - "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 @@ - "Экспорт", -"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 @@ - "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 @@ - "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 @@ - "ส่งออก", -"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 @@ -. - * - */ -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 @@ -
- t('Export your user account');?> -

t('This will create a compressed file that contains your ownCloud account.');?> -

- -
-
-
- -

-

- - t('Import user account');?> -

-

-

- -
-
-- cgit v1.2.3