Index: /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/RefVal.pm
===================================================================
--- /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/RefVal.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/RefVal.pm	(revision 1694)
@@ -37,5 +37,5 @@
             foreach my $attr (@{ $c->config->{objects}{$oref}{quick_search} || [ 'name' ]}) {
                 foreach ($base->search_objects(
-                        $oref, "$attr~" . $term)) {
+                        $oref, "$attr~" . $term, 'exported=true')) {
                     $objs{$_} = 1;
                 }
Index: /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm
===================================================================
--- /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm	(revision 1694)
@@ -123,5 +123,4 @@
     }
 
-
     if (my $date = $ouser->get_attributes('endEmployment')) {
         push(@{$var->{employments}{events}}, {
Index: /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm
===================================================================
--- /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm	(revision 1694)
@@ -27,16 +27,47 @@
     my $base = $c->model('Accounts')->base;
 
-    my @users = $base->search_objects('user', 'active=1');
+    my $users = $base->fetchObjectInfo(
+        'user',
+        [ qw(sn givenName) ],
+        'active=1'
+    );
 
-    foreach ( $base->search_objects('address', 'active=1', map { "user=$_" } @users)) {
+    my $sites = $base->fetchObjectInfo(
+        'site',
+        [ qw(l description) ],
+        'exported=true'
+    );
 
-        my $add = $base->get_object('address', $_) or next;
-        my $site = $add->get_attributes('site')
-            || $add->get_attributes('l');
-        my $office = $add->get_attributes('physicalDeliveryOfficeName') || '';
+    my $addresses = $base->fetchObjectInfo(
+        'address',
+        [ qw(user site physicalDeliveryOfficeName telephoneNumber l isMainAddress) ],
+        'exported=true'
+    );
 
-        $site or next;
+    foreach my $ad (keys %$addresses) {
+        my $sitename = $addresses->{$ad}{site}[0] || $c->loc('(other)');
 
-        push (@{$c->stash->{office}{$site}{$office}}, $add);
+        my $loc = $addresses->{$ad}{site}[0]
+            ? $sites->{ $addresses->{$ad}{site}[0] }{l}[0]
+            : $addresses->{$ad}{l}[0];
+
+        my $office = $addresses->{$ad}{physicalDeliveryOfficeName}[0] || '';
+
+        my $user = $users->{ $addresses->{$ad}{user}[0] } or next;
+
+        $c->stash->{sites} = $sites;
+
+        push (
+            @{$c->stash->{office}{$sitename}{$office}},
+            {
+                displayName => sprintf('%s %s', $user->{givenName}[0], $user->{sn}[0]),
+                phone => $addresses->{$ad}{telephoneNumber}[0],
+                isMainAddress => $addresses->{$ad}{isMainAddress}[0],
+                id => $ad,
+                user => $addresses->{$ad}{user}[0],
+                l => $loc,
+                site => $sitename,
+            }
+        );
     }
 }
Index: /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/fr.po
===================================================================
--- /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/fr.po	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/fr.po	(revision 1694)
@@ -42,10 +42,14 @@
 msgstr "(sans)"
 
-#: root/html/includes/sidebar.tt:77
+#: lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm:48
+msgid "(other)"
+msgstr "(autre)"
+
+#: root/html/includes/sidebar.tt:76
 msgid "About"
 msgstr "Ã propos"
 
-#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:128
-#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:137
+#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:127
+#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:136
 msgid "Activity end"
 msgstr "Fin d'activitÃ©"
Index: /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/messages.pot
===================================================================
--- /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/messages.pot	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/messages.pot	(revision 1694)
@@ -35,9 +35,13 @@
 msgstr ""
 
-#: root/html/includes/sidebar.tt:77
+#: lib/LATMOS/Accounts/Web/Controller/Summary/Offices.pm:48
+msgid "(other)"
+msgstr ""
+
+#: root/html/includes/sidebar.tt:76
 msgid "About"
 msgstr ""
 
-#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:128 lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:137
+#: lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:127 lib/LATMOS/Accounts/Web/Controller/Json/Timeline.pm:136
 msgid "Activity end"
 msgstr ""
Index: /trunk/LATMOS-Accounts-Web/root/html/summary/offices/index.tt
===================================================================
--- /trunk/LATMOS-Accounts-Web/root/html/summary/offices/index.tt	(revision 1693)
+++ /trunk/LATMOS-Accounts-Web/root/html/summary/offices/index.tt	(revision 1694)
@@ -4,10 +4,11 @@
 [% FOREACH site = office.keys.sort %]
 [% "<ul>" IF loop.first %]
-<li><a href="#[% site | html %]">[% site | html %]</a></li>
+<li><a href="#[% site | html %]">[% sites.$site.description.0 || site | html %]</a></li>
 [% "</ul>" IF loop.last %]
 [% END %]
 [% FOREACH site = office.keys.sort %]
+[% s = office.$site.site %]
 
-<h3><a name="[% site | html %]">[% site | html %]</a><a href="#top">â</a></h3>
+<h3><a name="[% site | html %]">[% sites.$site.description.0 || site | html %]</a><a href="#top">â</a></h3>
 
 [% FOREACH off = office.$site.keys.sort %]
@@ -23,11 +24,11 @@
 
 <li>
-[% "<b>" IF add.get_attributes('isMainAddress') %]
-<a href="[% c.uri_for('/users', add.get_attributes('user'), 'address', add.id) %]">
-[% add.get_attributes('displayName') | html %]
+[% "<b>" IF add.isMainAddress %]
+<a href="[% c.uri_for('/users', add.user, 'address', add.id) %]">
+[% add.displayName | html %]
 </a>
-[% "</b>" IF add.get_attributes('isMainAddress') %]
+[% "</b>" IF add.isMainAddress %]
 
-[% add.get_attributes('telephoneNumber') | html %]
+[% add.phone | html %]
 </li>
 
Index: /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
===================================================================
--- /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm	(revision 1694)
@@ -983,4 +983,27 @@
 }
 
+=head2 fetchObjectInfo($otype, $attributes, @filters)
+
+Return an hashref with attribute data for each object matching @filters.
+
+If C<$attributes> can be an array ref to a list of attributes.
+
+=cut
+
+sub fetchObjectInfo {
+    my ($self, $otype, $attributes, @filters) = @_;
+
+    my %results = map { $_ => {} }  $self->search_objects($otype, @filters);
+
+    foreach my $attr ( ref $attributes ? @$attributes : $attributes) {
+        my %res = $self->attributes_summary_by_object($otype, $attr);
+        foreach my $obj (keys %results) {
+            $results{$obj}{$attr} = $res{$obj};
+        }
+    }
+
+    \%results;
+}
+
 =head2 find_next_numeric_id($otype, $field, $min, $max)
 
Index: /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm
===================================================================
--- /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm	(revision 1694)
@@ -158,5 +158,5 @@
         }
     } elsif (my $ref = $self->reference) {
-        return $self->base->list_objects($ref);
+        return $self->base->search_objects($ref, 'exported=true');
     } else { return }
 }
Index: /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
===================================================================
--- /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm	(revision 1693)
+++ /trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm	(revision 1694)
@@ -695,5 +695,5 @@
             ? sprintf(
                 q{
-                select name, %s as value from %s} . ($base->{wexported} ? '' : ' and "exported" = true'),
+                select name, %s as value from %s} . ($base->{wexported} ? '' : ' where "exported" = true'),
                 $base->db->quote_identifier($attr->iname),
                 $base->db->quote_identifier($class->_object_table),
