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_REGDATE, new ScalarFieldValue(date.ToUTCString()) },
{ User.TableSpec.FIELD_SHOWPOSTSTOUSERS, new ScalarFieldValue(User.ENUM_SHOWPOSTSTOUSERS_ALL) }, { User.TableSpec.FIELD_SHOWPOSTSTOUSERS, new ScalarFieldValue(User.ENUM_SHOWPOSTSTOUSERS_ALL) },
{ User.TableSpec.FIELD_BIOGRAPHY, new ScalarFieldValue("") }, { User.TableSpec.FIELD_BIOGRAPHY, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_BIOGRAPHYUBB, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_LOCATION, new ScalarFieldValue("") }, { User.TableSpec.FIELD_LOCATION, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_SIGNATURE, new ScalarFieldValue("") }, { User.TableSpec.FIELD_SIGNATURE, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_SIGNATUREUBB, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_TITLE, new ScalarFieldValue("") }, { User.TableSpec.FIELD_TITLE, new ScalarFieldValue("") },
{ User.TableSpec.FIELD_TOTALPOSTS, new ScalarFieldValue("0") }, { User.TableSpec.FIELD_TOTALPOSTS, new ScalarFieldValue("0") },
{ User.TableSpec.FIELD_USERGROUPID, new ScalarFieldValue("1") }, { 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("Finished parsing");
System.Console.WriteLine("Total inserts: " + inserts.Count);
System.Console.ReadLine(); System.Console.ReadLine();
int j=0; int j=0;
foreach(var insert in inserts) { foreach(var insert in inserts) {

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

Loading…
Cancel
Save