diff --git a/apps/bookmarks/appinfo/app.php b/apps/bookmarks/appinfo/app.php index 479d8ed476..5481218841 100644 --- a/apps/bookmarks/appinfo/app.php +++ b/apps/bookmarks/appinfo/app.php @@ -17,3 +17,7 @@ OC_App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'hr OC_App::registerPersonal('bookmarks', 'settings'); require_once('apps/bookmarks/lib/search.php'); OC_Util::addScript('bookmarks','bookmarksearch'); + +// Include the migration provider + +require_once('apps/bookmarks/lib/migrate.php'); \ No newline at end of file diff --git a/apps/bookmarks/lib/migrate.php b/apps/bookmarks/lib/migrate.php index 2e6581cd9f..d5a6a75ca8 100644 --- a/apps/bookmarks/lib/migrate.php +++ b/apps/bookmarks/lib/migrate.php @@ -1,18 +1,15 @@ appid = 'bookmarks'; // Create the xml for the user supplied function export($uid){ - $xml = ''; - $query = OC_DB::prepare("SELECT * FROM *PREFIX*bookmarks WHERE *PREFIX*bookmakrs.user_id = ?"); - $bookmarks = $query->execute($uid); - OC_Log::write('user_migrate',print_r($bookmarks)); - foreach($bookmarks as $bookmark){ - $xml .= ''; - $xml .='DATA WILL BE HERE'; - $xml .= ''; - } + $xml = 'debugfrombookmarks'; + //$query = OC_DB::prepare("SELECT * FROM *PREFIX*bookmarks WHERE *PREFIX*bookmakrs.user_id = ?"); + //$bookmarks = $query->execute($uid); + //foreach($bookmarks as $bookmark){ + // $xml .= ''; + // $xml .='DATA WILL BE HERE'; + // $xml .= ''; + //} return $xml; } } diff --git a/apps/user_migrate/settings.php b/apps/user_migrate/settings.php index 5831bf54cb..4fa4d23a6f 100644 --- a/apps/user_migrate/settings.php +++ b/apps/user_migrate/settings.php @@ -47,7 +47,7 @@ if (isset($_POST['user_migrate'])) { // Does the user want their app data? if (isset($_POST['user_appdata'])) { // adding owncloud system files - OC_Log::write('user_migrate',"Adding app data to user export",OC_Log::INFO); + OC_Log::write('user_migrate',"Adding app data to user export file",OC_Log::INFO); // Call to OC_Migrate for the xml file. //$appdatafile = $tempdir . "/appdata.xml"; //$fh = fopen($appdatafile, 'w'); diff --git a/lib/migrate.php b/lib/migrate.php index b3345ccd1a..e3394c5a67 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -25,7 +25,7 @@ * provides an interface to all search providers */ class OC_Migrate{ - static public $providers=array(); + static private $providers=array(); /** * register a new migration provider @@ -33,6 +33,7 @@ class OC_Migrate{ */ public static function registerProvider($provider){ self::$providers[]=$provider; + OC_Log::write('user_migrate','Provider registered',OC_Log::INFO); } /** @@ -46,7 +47,7 @@ class OC_Migrate{ foreach(self::$providers as $provider){ OC_Log::write('user_migrate','Getting app data for app:'.$provider->appid,OC_Log::INFO); $xml .= ''; - $xml .= self::appInfoXML($provider->$appid); + //$xml .= self::appInfoXML($provider->$appid); $xml .= $provider->export($uid); $xml .= ''; } diff --git a/lib/migrate/provider.php b/lib/migrate/provider.php index 920fde7db3..b604a01072 100644 --- a/lib/migrate/provider.php +++ b/lib/migrate/provider.php @@ -6,7 +6,7 @@ abstract class OC_Migrate_Provider{ public function __construct(){ OC_Migrate::registerProvider($this); } - public static $appid; + //public static $appid; /** * exports data for apps * @param string $uid @@ -19,5 +19,5 @@ abstract class OC_Migrate_Provider{ * @param string $query * @return array An array of OC_Search_Result's */ - abstract function import($data); + //abstract function import($data); }