load bookmarks provider class

This commit is contained in:
Tom Needham 2012-02-03 21:28:58 +00:00
parent ee88ded463
commit 1133eaa679
4 changed files with 9 additions and 6 deletions

View File

@ -13,3 +13,4 @@ class OC_Migrate_Provider_Bookmarks extends OC_Migrate_Provider{
return $xml;
}
}
new OC_Migrate_Provider_Bookmarks('bookmarks');

View File

@ -63,7 +63,7 @@ if (isset($_POST['user_migrate'])) {
//header("Content-Disposition: attachment; filename=" . basename($filename));
//header("Content-Length: " . filesize($filename));
//@ob_end_clean();
echo $appdata;
echo htmlspecialchars($appdata);
//readfile($filename);
unlink($filename);
} else {

View File

@ -33,7 +33,6 @@ class OC_Migrate{
*/
public static function registerProvider($provider){
self::$providers[]=$provider;
OC_Log::write('user_migrate','Provider registered',OC_Log::INFO);
}
/**
@ -42,12 +41,12 @@ class OC_Migrate{
* @return string xml of app data
*/
public static function export($uid){
OC_Log::write('user_migrate','Starting user appdata export for: '.$uid,OC_Log::INFO);
OC_Log::write('user_migrate','App data export started for user: '.$uid,OC_Log::INFO);
$xml = '';
foreach(self::$providers as $provider){
OC_Log::write('user_migrate','Getting app data for app:'.$provider->appid,OC_Log::INFO);
$xml .= '<app>';
//$xml .= self::appInfoXML($provider->$appid);
$xml .= self::appInfoXML($provider->appid);
$xml .= $provider->export($uid);
$xml .= '</app>';
}
@ -62,7 +61,7 @@ class OC_Migrate{
public static function appInfoXML($appid){
$info = OC_App::getAppInfo($appid);
$xml = '<appinfo>';
$zml .= 'INFO HERE';
$xml .= 'INFO HERE';
$xml .= '</appinfo>';
return $xml;
}

View File

@ -3,7 +3,10 @@
* provides search functionalty
*/
abstract class OC_Migrate_Provider{
public function __construct(){
public $appid;
public function __construct($appid){
$this->appid = $appid;
OC_Migrate::registerProvider($this);
}
//public static $appid;