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;
|
||||
}
|
||||
}
|
||||
new OC_Migrate_Provider_Bookmarks('bookmarks');
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue