This commit is contained in:
@@ -249,8 +249,8 @@ namespace AyaNova.PlugIn.V8
|
||||
progress.Op("Exporting objects");
|
||||
//BIZ objects
|
||||
|
||||
if (progress.KeepGoing)
|
||||
await ExportLocales(progress);
|
||||
//if (progress.KeepGoing)
|
||||
// await ExportLocales(progress);
|
||||
|
||||
if (progress.KeepGoing)
|
||||
await ExportUsers(progress);
|
||||
@@ -259,7 +259,6 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
|
||||
|
||||
|
||||
//dumpGlobalSettings(tempArchiveFolder, progress);
|
||||
|
||||
//dumpSeedNumbers(tempArchiveFolder, progress);
|
||||
@@ -325,7 +324,7 @@ namespace AyaNova.PlugIn.V8
|
||||
{
|
||||
User admin = User.GetItem(User.AdministratorID);
|
||||
progress.Op("Administrator account");
|
||||
var adminTid=new TypeAndID(RootObjectTypes.User, User.AdministratorID);
|
||||
var adminTid = new TypeAndID(RootObjectTypes.User, User.AdministratorID);
|
||||
//Attachments and wiki
|
||||
string AdminWikiContent = null;
|
||||
var hasWiki = WikiPage.HasWiki(User.AdministratorID);
|
||||
@@ -373,7 +372,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
User c = User.GetItem(i.ID);
|
||||
|
||||
var UserTID=new TypeAndID(RootObjectTypes.User, c.ID);
|
||||
var UserTID = new TypeAndID(RootObjectTypes.User, c.ID);
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.name = c.FirstName + " " + c.LastName;
|
||||
@@ -439,7 +438,10 @@ namespace AyaNova.PlugIn.V8
|
||||
d = rOptions.ObjectResponse["data"];
|
||||
d.uiColor = System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor));
|
||||
d.emailAddress = string.IsNullOrWhiteSpace(c.EmailAddress) ? null : c.EmailAddress;
|
||||
d.translationId = LocaleMap[c.DefaultLanguage];
|
||||
if (LocaleMap.ContainsKey(c.DefaultLanguage))
|
||||
d.translationId = LocaleMap[c.DefaultLanguage];
|
||||
else
|
||||
d.translationId = 1;
|
||||
|
||||
await util.PutAsync("UserOptions/" + RavenId.ToString(), d.ToString());
|
||||
}
|
||||
@@ -448,13 +450,16 @@ namespace AyaNova.PlugIn.V8
|
||||
await ExportAttachments(UserTID, progress);
|
||||
|
||||
//docs
|
||||
string NonFileUrls= await ExportDocs(UserTID, c.Docs, progress);
|
||||
if (!string.IsNullOrEmpty(NonFileUrls)) {
|
||||
//need to repost the user with the notes modified
|
||||
d = rMainObject.ObjectResponse["data"];
|
||||
d.notes = NonFileUrls + "\r\n-----------------\r\n" + d.notes;
|
||||
await util.PutAsync("User", d.ToString());
|
||||
}
|
||||
string NonFileUrls = await ExportDocs(UserTID, c.Docs, progress);
|
||||
if (!string.IsNullOrEmpty(NonFileUrls))
|
||||
{
|
||||
//need to repost the user with the notes modified
|
||||
d = rMainObject.ObjectResponse["data"];
|
||||
d.login = null;
|
||||
d.password = null;
|
||||
d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
|
||||
await util.PutAsync("User/" + RavenId.ToString(), d.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1067,13 +1072,13 @@ namespace AyaNova.PlugIn.V8
|
||||
//is it a local file?
|
||||
if (!new Uri(doc.URL).IsFile)
|
||||
{
|
||||
NonFileUrls+=(doc.Description + "("+ImportTag+ ")\n" + doc.URL+"\n");
|
||||
NonFileUrls += (doc.Description + "(" + ImportTag + ")\n" + doc.URL + "\n");
|
||||
continue;
|
||||
}
|
||||
//can we see it?
|
||||
if (!File.Exists(doc.URL))
|
||||
{
|
||||
NonFileUrls+=(ImportTag + " - Assigned doc. file not found:\n" + doc.Description + "\n" + doc.URL + "\n");
|
||||
NonFileUrls += (ImportTag + " - Assigned doc. file not found:\n" + doc.Description + "\n" + doc.URL + "\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1104,7 @@ namespace AyaNova.PlugIn.V8
|
||||
//Form data like the bizobject type and id
|
||||
formDataContent.Add(new StringContent(util.RootObjectToAyaType(tid.RootObjectType).ToString()), name: "AttachToObjectType");
|
||||
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
|
||||
formDataContent.Add(new StringContent(doc.Description+" ("+ImportTag+")"), name: "Notes");
|
||||
formDataContent.Add(new StringContent(doc.Description + " (" + ImportTag + ")"), name: "Notes");
|
||||
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");
|
||||
|
||||
StreamContent AttachmentFile = new StreamContent(fi.OpenRead());
|
||||
|
||||
Reference in New Issue
Block a user