summaryrefslogtreecommitdiffstats
path: root/apps/user_migrate
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-03-27 21:21:14 +0000
committerTom Needham <needham.thomas@gmail.com>2012-03-27 21:21:14 +0000
commitef33219e4f83652676c7a668b6126c3c1c0da34d (patch)
treea246aedbefe5d7b31492bb171db35d1bab1a2379 /apps/user_migrate
parent31d268fe929abefbbf14e76a96c02f18235451a8 (diff)
downloadnextcloud-server-ef33219e4f83652676c7a668b6126c3c1c0da34d.tar.gz
nextcloud-server-ef33219e4f83652676c7a668b6126c3c1c0da34d.zip
import method returns each apps' import status
Diffstat (limited to 'apps/user_migrate')
-rw-r--r--apps/user_migrate/admin.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/user_migrate/admin.php b/apps/user_migrate/admin.php
index c1afb0aed4f..1c4894c0f22 100644
--- a/apps/user_migrate/admin.php
+++ b/apps/user_migrate/admin.php
@@ -40,8 +40,22 @@ if (isset($_POST['user_import'])) {
exit();
}
- if( !OC_Migrate::import( $to, 'user' ) ){
+ if( !$appsstatus = OC_Migrate::import( $to, 'user' ) ){
die( 'failed to to import' );
+ } else {
+ // Check import status
+ foreach( $appsstatus as $app => $status ){
+ if( $status != 'true' ){
+ // It failed for some reason
+ if( $status == 'notsupported' ){
+ $notsupported[] = $app;
+ } else if( !$status ){
+ $failed[] = $app;
+ }
+ }
+ }
+ die(print_r($notsupported));
+ die( 'Some apps failed to import, or were not supported.' );
}