Fixes in importer

main
Inga 🏳‍🌈 12 years ago
parent a72dfa90c6
commit 406b0fb622
  1. 2
      Builder/IISMainHandler/build.txt
  2. 4
      FLocal.Migration.Console/ShallerDBProcessor.cs
  3. 5
      FLocal.Migration.Console/UploadProcessor.cs

@ -234,8 +234,10 @@ namespace FLocal.Migration.Console {
{ User.TableSpec.FIELD_REGDATE, new ScalarFieldValue(date.ToUTCString()) },
{ User.TableSpec.FIELD_SHOWPOSTSTOUSERS, new ScalarFieldValue(User.ENUM_SHOWPOSTSTOUSERS_ALL) },
{ User.TableSpec.FIELD_BIOGRAPHY, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_BIOGRAPHYUBB, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_LOCATION, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_SIGNATURE, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_SIGNATUREUBB, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_TITLE, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_TOTALPOSTS, new ScalarFieldValue("0") },
{ User.TableSpec.FIELD_USERGROUPID, new ScalarFieldValue("1") },
@ -305,7 +307,9 @@ namespace FLocal.Migration.Console {
}
}
System.Console.WriteLine();
System.Console.WriteLine("Finished parsing");
System.Console.WriteLine("Total inserts: " + inserts.Count);
System.Console.ReadLine();
int j=0;
foreach(var insert in inserts) {

@ -24,7 +24,7 @@ namespace FLocal.Migration.Console {
} else {
string[] parts = info.Name.Split('.');
if(parts.Length != 2) throw new FLocalException("wrong file name");
int raw = int.Parse(parts[0].PHPSubstring(4));
int raw = int.Parse(parts[0].Substring(4));
int id;
switch(parts[1].ToLower()) {
case "jpg":
@ -41,8 +41,9 @@ namespace FLocal.Migration.Console {
}
if(info != null) {
try {
Upload.LoadById(id);
Upload.LoadById(id).LoadIfNotLoaded();
System.Console.Write("-");
//System.Console.WriteLine("-" + id);
} catch(NotFoundInDBException) {
try {
UploadManager.UploadFile(

Loading…
Cancel
Save