summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-22 17:42:21 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-22 17:42:21 +0000
commitde33f2297cbbfe1d4a995283891cadf1523b7ac7 (patch)
tree36264986a20bdb7849d3aec68882a224bfa00529 /roundcubemail/program/steps
parent110c53304399895f828d4ae5481df2007de2b5ef (diff)
Make count-display label selectable by skin; always show photo placeholder, even if source doesn't support a photo col
git-svn-id: https://svn.roundcube.net/trunk@5645 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index 5010e8c22..fac8987f8 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -382,6 +382,9 @@ function rcmail_rowcount_display($attrib)
$OUTPUT->add_gui_object('countdisplay', $attrib['id']);
+ if ($attrib['label'])
+ $_SESSION['contactcountdisplay'] = $attrib['label'];
+
return html::span($attrib, rcube_label('loading'));
}
@@ -399,7 +402,7 @@ function rcmail_get_rowcount_text($result=null)
$out = rcube_label('nocontactsfound');
else
$out = rcube_label(array(
- 'name' => 'contactsfromto',
+ 'name' => $_SESSION['contactcountdisplay'] ? $_SESSION['contactcountdisplay'] : 'contactsfromto',
'vars' => array(
'from' => $result->first + 1,
'to' => min($result->count, $result->first + $CONFIG['pagesize']),
@@ -700,9 +703,6 @@ function rcmail_contact_photo($attrib)
{
global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG;
- if (!$CONTACT_COLTYPES['photo'])
- return '';
-
if ($result = $CONTACTS->get_result())
$record = $result->first();
@@ -720,7 +720,7 @@ function rcmail_contact_photo($attrib)
$img = html::img(array('src' => $photo_img, 'border' => 1, 'alt' => ''));
$content = html::div($attrib, $img);
- if ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add') {
+ if ($CONTACT_COLTYPES['photo'] && ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add')) {
$RCMAIL->output->add_gui_object('contactphoto', $attrib['id']);
$hidden = new html_hiddenfield(array('name' => '_photo', 'id' => 'ff_photo', 'value' => $ff_value));
$content .= $hidden->show();