allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [05/18] git commit: [#7589] ticket:622 Fix field types/appearance in the index
Date Tue, 09 Sep 2014 14:28:25 GMT
[#7589] ticket:622 Fix field types/appearance in the index


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/dd4752b1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/dd4752b1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/dd4752b1

Branch: refs/heads/je/42cc_7656
Commit: dd4752b1e7c0b524aea324476c6af9f0dd356a9e
Parents: 88a8e01
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Aug 4 15:19:22 2014 +0300
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Tue Sep 9 12:25:28 2014 +0300

----------------------------------------------------------------------
 Allura/allura/model/auth.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/dd4752b1/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index fb59d0e..43de922 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -288,12 +288,14 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
         localization = '%s/%s' % (
             self.get_pref('localization')['country'],
             self.get_pref('localization')['city'])
+        socialnetworks = ' '.join(['%s: %s' % (n['socialnetwork'], n['accounturl'])
+                                   for n in self.get_pref('socialnetworks')])
         fields = dict(
             id=self.index_id(),
             title='User %s' % self.username,
             type_s=self.type_s,
             username_s=self.username,
-            email_addresses=self.email_addresses,
+            email_addresses_t=' '.join(self.email_addresses),
             last_password_updated_dt=self.last_password_updated,
             disabled_b=self.disabled,
             results_per_page_i=self.get_pref('results_per_page'),
@@ -302,15 +304,20 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
             disable_user_messages_b=self.get_pref('disable_user_messages'),
             display_name_s=self.get_pref('display_name'),
             sex_s=self.get_pref('sex'),
-            birthday_dt=self.get_pref('birthday'),
+            birthdate_dt=self.get_pref('birthdate'),
             localization_s=localization,
             timezone_s=self.get_pref('timezone'),
-            socialnetworks=self.get_pref('socialnetworks'),
-            telnumbers=self.get_pref('telnumbers'),
+            socialnetworks_t=socialnetworks,
+            telnumbers_t=' '.join(self.get_pref('telnumbers')),
             skypeaccount_s=self.get_pref('skypeaccount'),
-            webpages=self.get_pref('webpages'),
-            skills=self.get_skills(),
-            last_access=self.last_access,
+            webpages_t=' '.join(self.get_pref('webpages')),
+            skills_t=' '.join([s['skill'].fullpath for s in self.get_skills()]),
+            last_access_login_date_dt=self.last_access['login_date'],
+            last_access_login_ip_s=self.last_access['login_ip'],
+            last_access_login_ua_t=self.last_access['login_ua'],
+            last_access_session_date_dt=self.last_access['session_date'],
+            last_access_session_ip_s=self.last_access['session_ip'],
+            last_access_session_ua_t=self.last_access['session_ua'],
         )
         return dict(provider.index_user(self), **fields)
 


Mime
View raw message