diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-03-13 21:28:53 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-03-13 21:28:53 +0000 |
commit | fa8b66ca4f266ebc72ca204e85cf0e69c4c4aa25 (patch) | |
tree | 072ae89e082d85c537ed56c5477f3258f6eeed0d /lib/migrate.php | |
parent | a919a136c418f99bded289034090b4e8d4e23533 (diff) | |
download | nextcloud-server-fa8b66ca4f266ebc72ca204e85cf0e69c4c4aa25.tar.gz nextcloud-server-fa8b66ca4f266ebc72ca204e85cf0e69c4c4aa25.zip |
Add getApps() method to return apps supporting migration
Diffstat (limited to 'lib/migrate.php')
-rw-r--r-- | lib/migrate.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/migrate.php b/lib/migrate.php index a6a6432d0de..863cf261f4e 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -122,6 +122,21 @@ class OC_Migrate{ } /** + * @breif returns an array of apps that support migration + * @return array + */ + static public function getApps(){ + $allapps = OC_App::getAllApps(); + foreach($allapps as $app){ + $path = OC::$SERVERROOT . '/apps/' . $app . '/lib/migrate.php'; + if( file_exists( $path ) ){ + $supportsmigration[] = $app; + } + } + reutrn $supportsmigration; + } + + /** * @breif imports a new user * @param $db string path to migration.db * @param $migrateinfo array of migration ino |