aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs100
1 files changed, 54 insertions, 46 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
index f8b9ede..a66b002 100644
--- a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs
@@ -119,9 +119,9 @@ namespace OpenSim.Data.PGSQL
119 } 119 }
120 catch (Exception e) 120 catch (Exception e)
121 { 121 {
122 m_log.ErrorFormat("[PROFILES_DATA]" + 122 m_log.Error("[PROFILES_DATA]: UserAccount exception ", e);
123 ": UserAccount exception {0}", e.Message);
124 } 123 }
124
125 n.Add("classifieduuid", OSD.FromUUID(Id)); 125 n.Add("classifieduuid", OSD.FromUUID(Id));
126 n.Add("name", OSD.FromString(Name)); 126 n.Add("name", OSD.FromString(Name));
127 data.Add(n); 127 data.Add(n);
@@ -212,15 +212,14 @@ namespace OpenSim.Data.PGSQL
212 } 212 }
213 catch (Exception e) 213 catch (Exception e)
214 { 214 {
215 m_log.ErrorFormat("[PROFILES_DATA]" + 215 m_log.Error("[PROFILES_DATA]: ClassifiedsUpdate exception ", e);
216 ": ClassifiedesUpdate exception {0}", e.Message);
217 result = e.Message; 216 result = e.Message;
218 return false; 217 return false;
219 } 218 }
219
220 return true; 220 return true;
221 } 221 }
222 222
223
224 public bool DeleteClassifiedRecord(UUID recordId) 223 public bool DeleteClassifiedRecord(UUID recordId)
225 { 224 {
226 string query = string.Empty; 225 string query = string.Empty;
@@ -246,10 +245,10 @@ namespace OpenSim.Data.PGSQL
246 } 245 }
247 catch (Exception e) 246 catch (Exception e)
248 { 247 {
249 m_log.ErrorFormat("[PROFILES_DATA]" + 248 m_log.Error("[PROFILES_DATA]: DeleteClassifiedRecord exception ", e);
250 ": DeleteClassifiedRecord exception {0}", e.Message);
251 return false; 249 return false;
252 } 250 }
251
253 return true; 252 return true;
254 } 253 }
255 254
@@ -295,13 +294,14 @@ namespace OpenSim.Data.PGSQL
295 } 294 }
296 catch (Exception e) 295 catch (Exception e)
297 { 296 {
298 m_log.ErrorFormat("[PROFILES_DATA]" + 297 m_log.Error("[PROFILES_DATA]: GetClassifiedInfo exception ", e);
299 ": GetClassifiedInfo exception {0}", e.Message);
300 } 298 }
299
301 return true; 300 return true;
302 } 301 }
303 302
304 public static UUID GetUUID( object uuidValue ) { 303 public static UUID GetUUID(object uuidValue)
304 {
305 305
306 UUID ret = UUID.Zero; 306 UUID ret = UUID.Zero;
307 307
@@ -310,7 +310,6 @@ namespace OpenSim.Data.PGSQL
310 return ret; 310 return ret;
311 } 311 }
312 312
313
314 #endregion Classifieds Queries 313 #endregion Classifieds Queries
315 314
316 #region Picks Queries 315 #region Picks Queries
@@ -350,9 +349,9 @@ namespace OpenSim.Data.PGSQL
350 } 349 }
351 catch (Exception e) 350 catch (Exception e)
352 { 351 {
353 m_log.ErrorFormat("[PROFILES_DATA]" + 352 m_log.Error("[PROFILES_DATA]: GetAvatarPicks exception ", e);
354 ": GetAvatarPicks exception {0}", e.Message);
355 } 353 }
354
356 return data; 355 return data;
357 } 356 }
358 357
@@ -407,9 +406,9 @@ namespace OpenSim.Data.PGSQL
407 } 406 }
408 catch (Exception e) 407 catch (Exception e)
409 { 408 {
410 m_log.ErrorFormat("[PROFILES_DATA]" + 409 m_log.Error("[PROFILES_DATA]: GetPickInfo exception ", e);
411 ": GetPickInfo exception {0}", e.Message);
412 } 410 }
411
413 return pick; 412 return pick;
414 } 413 }
415 414
@@ -460,10 +459,10 @@ namespace OpenSim.Data.PGSQL
460 } 459 }
461 catch (Exception e) 460 catch (Exception e)
462 { 461 {
463 m_log.ErrorFormat("[PROFILES_DATA]" + 462 m_log.Error("[PROFILES_DATA]: UpdateAvatarNotes exception ", e);
464 ": UpdateAvatarNotes exception {0}", e.Message);
465 return false; 463 return false;
466 } 464 }
465
467 return true; 466 return true;
468 } 467 }
469 468
@@ -490,15 +489,17 @@ namespace OpenSim.Data.PGSQL
490 } 489 }
491 catch (Exception e) 490 catch (Exception e)
492 { 491 {
493 m_log.ErrorFormat("[PROFILES_DATA]" + 492 m_log.Error("[PROFILES_DATA]: DeleteUserPickRecord exception ", e);
494 ": DeleteUserPickRecord exception {0}", e.Message);
495 return false; 493 return false;
496 } 494 }
495
497 return true; 496 return true;
498 } 497 }
498
499 #endregion Picks Queries 499 #endregion Picks Queries
500 500
501 #region Avatar Notes Queries 501 #region Avatar Notes Queries
502
502 public bool GetAvatarNotes(ref UserProfileNotes notes) 503 public bool GetAvatarNotes(ref UserProfileNotes notes)
503 { // WIP 504 { // WIP
504 string query = string.Empty; 505 string query = string.Empty;
@@ -531,9 +532,9 @@ namespace OpenSim.Data.PGSQL
531 } 532 }
532 catch (Exception e) 533 catch (Exception e)
533 { 534 {
534 m_log.ErrorFormat("[PROFILES_DATA]" + 535 m_log.Error("[PROFILES_DATA]: GetAvatarNotes exception ", e);
535 ": GetAvatarNotes exception {0}", e.Message);
536 } 536 }
537
537 return true; 538 return true;
538 } 539 }
539 540
@@ -542,7 +543,7 @@ namespace OpenSim.Data.PGSQL
542 string query = string.Empty; 543 string query = string.Empty;
543 bool remove; 544 bool remove;
544 545
545 if(string.IsNullOrEmpty(note.Notes)) 546 if (string.IsNullOrEmpty(note.Notes))
546 { 547 {
547 remove = true; 548 remove = true;
548 query += "DELETE FROM usernotes WHERE "; 549 query += "DELETE FROM usernotes WHERE ";
@@ -571,6 +572,7 @@ namespace OpenSim.Data.PGSQL
571 { 572 {
572 if(!remove) 573 if(!remove)
573 cmd.Parameters.Add(m_database.CreateParameter("Notes", note.Notes)); 574 cmd.Parameters.Add(m_database.CreateParameter("Notes", note.Notes));
575
574 cmd.Parameters.Add(m_database.CreateParameter("TargetId", note.TargetId)); 576 cmd.Parameters.Add(m_database.CreateParameter("TargetId", note.TargetId));
575 cmd.Parameters.Add(m_database.CreateParameter("UserId", note.UserId)); 577 cmd.Parameters.Add(m_database.CreateParameter("UserId", note.UserId));
576 578
@@ -580,16 +582,17 @@ namespace OpenSim.Data.PGSQL
580 } 582 }
581 catch (Exception e) 583 catch (Exception e)
582 { 584 {
583 m_log.ErrorFormat("[PROFILES_DATA]" + 585 m_log.Error("[PROFILES_DATA]: UpdateAvatarNotes exception ", e);
584 ": UpdateAvatarNotes exception {0}", e.Message);
585 return false; 586 return false;
586 } 587 }
587 return true; 588
588 589 return true;
589 } 590 }
591
590 #endregion Avatar Notes Queries 592 #endregion Avatar Notes Queries
591 593
592 #region Avatar Properties 594 #region Avatar Properties
595
593 public bool GetAvatarProperties(ref UserProfileProperties props, ref string result) 596 public bool GetAvatarProperties(ref UserProfileProperties props, ref string result)
594 { 597 {
595 string query = string.Empty; 598 string query = string.Empty;
@@ -706,11 +709,11 @@ namespace OpenSim.Data.PGSQL
706 } 709 }
707 catch (Exception e) 710 catch (Exception e)
708 { 711 {
709 m_log.ErrorFormat("[PROFILES_DATA]" + 712 m_log.Error("[PROFILES_DATA]: GetAvatarProperties exception ", e);
710 ": Requst properties exception {0}", e.Message);
711 result = e.Message; 713 result = e.Message;
712 return false; 714 return false;
713 } 715 }
716
714 return true; 717 return true;
715 } 718 }
716 719
@@ -746,16 +749,17 @@ namespace OpenSim.Data.PGSQL
746 } 749 }
747 catch (Exception e) 750 catch (Exception e)
748 { 751 {
749 m_log.ErrorFormat("[PROFILES_DATA]" + 752 m_log.Error("[PROFILES_DATA]: AgentPropertiesUpdate exception ", e);
750 ": AgentPropertiesUpdate exception {0}", e.Message);
751
752 return false; 753 return false;
753 } 754 }
755
754 return true; 756 return true;
755 } 757 }
758
756 #endregion Avatar Properties 759 #endregion Avatar Properties
757 760
758 #region Avatar Interests 761 #region Avatar Interests
762
759 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result) 763 public bool UpdateAvatarInterests(UserProfileProperties up, ref string result)
760 { 764 {
761 string query = string.Empty; 765 string query = string.Empty;
@@ -788,13 +792,14 @@ namespace OpenSim.Data.PGSQL
788 } 792 }
789 catch (Exception e) 793 catch (Exception e)
790 { 794 {
791 m_log.ErrorFormat("[PROFILES_DATA]" + 795 m_log.Error("[PROFILES_DATA]: AgentInterestsUpdate exception ", e);
792 ": AgentInterestsUpdate exception {0}", e.Message);
793 result = e.Message; 796 result = e.Message;
794 return false; 797 return false;
795 } 798 }
799
796 return true; 800 return true;
797 } 801 }
802
798 #endregion Avatar Interests 803 #endregion Avatar Interests
799 804
800 public OSDArray GetUserImageAssets(UUID avatarId) 805 public OSDArray GetUserImageAssets(UUID avatarId)
@@ -868,13 +873,14 @@ namespace OpenSim.Data.PGSQL
868 } 873 }
869 catch (Exception e) 874 catch (Exception e)
870 { 875 {
871 m_log.ErrorFormat("[PROFILES_DATA]" + 876 m_log.Error("[PROFILES_DATA]: GetAvatarNotes exception ", e);
872 ": GetAvatarNotes exception {0}", e.Message);
873 } 877 }
878
874 return data; 879 return data;
875 } 880 }
876 881
877 #region User Preferences 882 #region User Preferences
883
878 public bool GetUserPreferences(ref UserPreferences pref, ref string result) 884 public bool GetUserPreferences(ref UserPreferences pref, ref string result)
879 { 885 {
880 string query = string.Empty; 886 string query = string.Empty;
@@ -922,10 +928,10 @@ namespace OpenSim.Data.PGSQL
922 } 928 }
923 catch (Exception e) 929 catch (Exception e)
924 { 930 {
925 m_log.ErrorFormat("[PROFILES_DATA]" + 931 m_log.Error("[PROFILES_DATA]: GetUserPreferences exception ", e);
926 ": Get preferences exception {0}", e.Message);
927 result = e.Message; 932 result = e.Message;
928 } 933 }
934
929 return true; 935 return true;
930 } 936 }
931 937
@@ -960,16 +966,18 @@ namespace OpenSim.Data.PGSQL
960 } 966 }
961 catch (Exception e) 967 catch (Exception e)
962 { 968 {
963 m_log.ErrorFormat("[PROFILES_DATA]" + 969 m_log.Error("[PROFILES_DATA]: AgentInterestsUpdate exception ", e);
964 ": AgentInterestsUpdate exception {0}", e.Message);
965 result = e.Message; 970 result = e.Message;
966 return false; 971 return false;
967 } 972 }
973
968 return true; 974 return true;
969 } 975 }
976
970 #endregion User Preferences 977 #endregion User Preferences
971 978
972 #region Integration 979 #region Integration
980
973 public bool GetUserAppData(ref UserAppData props, ref string result) 981 public bool GetUserAppData(ref UserAppData props, ref string result)
974 { 982 {
975 string query = string.Empty; 983 string query = string.Empty;
@@ -1023,11 +1031,11 @@ namespace OpenSim.Data.PGSQL
1023 } 1031 }
1024 catch (Exception e) 1032 catch (Exception e)
1025 { 1033 {
1026 m_log.ErrorFormat("[PROFILES_DATA]" + 1034 m_log.Error("[PROFILES_DATA]: GetUserAppData exception ", e);
1027 ": Requst application data exception {0}", e.Message);
1028 result = e.Message; 1035 result = e.Message;
1029 return false; 1036 return false;
1030 } 1037 }
1038
1031 return true; 1039 return true;
1032 } 1040 }
1033 1041
@@ -1063,13 +1071,13 @@ namespace OpenSim.Data.PGSQL
1063 } 1071 }
1064 catch (Exception e) 1072 catch (Exception e)
1065 { 1073 {
1066 m_log.ErrorFormat("[PROFILES_DATA]" + 1074 m_log.Error("[PROFILES_DATA]: SetUserData exception ", e);
1067 ": SetUserData exception {0}", e.Message);
1068 return false; 1075 return false;
1069 } 1076 }
1077
1070 return true; 1078 return true;
1071 } 1079 }
1080
1072 #endregion Integration 1081 #endregion Integration
1073 } 1082 }
1074} 1083} \ No newline at end of file
1075