load bookmarks provider class
This commit is contained in:
parent
ee88ded463
commit
1133eaa679
|
@ -13,3 +13,4 @@ class OC_Migrate_Provider_Bookmarks extends OC_Migrate_Provider{
|
||||||
return $xml;
|
return $xml;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
new OC_Migrate_Provider_Bookmarks('bookmarks');
|
|
@ -63,7 +63,7 @@ if (isset($_POST['user_migrate'])) {
|
||||||
//header("Content-Disposition: attachment; filename=" . basename($filename));
|
//header("Content-Disposition: attachment; filename=" . basename($filename));
|
||||||
//header("Content-Length: " . filesize($filename));
|
//header("Content-Length: " . filesize($filename));
|
||||||
//@ob_end_clean();
|
//@ob_end_clean();
|
||||||
echo $appdata;
|
echo htmlspecialchars($appdata);
|
||||||
//readfile($filename);
|
//readfile($filename);
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,7 +33,6 @@ class OC_Migrate{
|
||||||
*/
|
*/
|
||||||
public static function registerProvider($provider){
|
public static function registerProvider($provider){
|
||||||
self::$providers[]=$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
|
* @return string xml of app data
|
||||||
*/
|
*/
|
||||||
public static function export($uid){
|
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 = '';
|
$xml = '';
|
||||||
foreach(self::$providers as $provider){
|
foreach(self::$providers as $provider){
|
||||||
OC_Log::write('user_migrate','Getting app data for app:'.$provider->appid,OC_Log::INFO);
|
OC_Log::write('user_migrate','Getting app data for app:'.$provider->appid,OC_Log::INFO);
|
||||||
$xml .= '<app>';
|
$xml .= '<app>';
|
||||||
//$xml .= self::appInfoXML($provider->$appid);
|
$xml .= self::appInfoXML($provider->appid);
|
||||||
$xml .= $provider->export($uid);
|
$xml .= $provider->export($uid);
|
||||||
$xml .= '</app>';
|
$xml .= '</app>';
|
||||||
}
|
}
|
||||||
|
@ -62,7 +61,7 @@ class OC_Migrate{
|
||||||
public static function appInfoXML($appid){
|
public static function appInfoXML($appid){
|
||||||
$info = OC_App::getAppInfo($appid);
|
$info = OC_App::getAppInfo($appid);
|
||||||
$xml = '<appinfo>';
|
$xml = '<appinfo>';
|
||||||
$zml .= 'INFO HERE';
|
$xml .= 'INFO HERE';
|
||||||
$xml .= '</appinfo>';
|
$xml .= '</appinfo>';
|
||||||
return $xml;
|
return $xml;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
* provides search functionalty
|
* provides search functionalty
|
||||||
*/
|
*/
|
||||||
abstract class OC_Migrate_Provider{
|
abstract class OC_Migrate_Provider{
|
||||||
public function __construct(){
|
public $appid;
|
||||||
|
|
||||||
|
public function __construct($appid){
|
||||||
|
$this->appid = $appid;
|
||||||
OC_Migrate::registerProvider($this);
|
OC_Migrate::registerProvider($this);
|
||||||
}
|
}
|
||||||
//public static $appid;
|
//public static $appid;
|
||||||
|
|
Loading…
Reference in New Issue