Changeset 5645 in subversion


Ignore:
Timestamp:
Dec 22, 2011 12:42:21 PM (17 months ago)
Author:
thomasb
Message:

Make count-display label selectable by skin; always show photo placeholder, even if source doesn't support a photo col

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r5492 r5645  
    383383    $OUTPUT->add_gui_object('countdisplay', $attrib['id']); 
    384384 
     385    if ($attrib['label']) 
     386      $_SESSION['contactcountdisplay'] = $attrib['label']; 
     387 
    385388    return html::span($attrib, rcube_label('loading')); 
    386389} 
     
    400403    else 
    401404        $out = rcube_label(array( 
    402             'name'  => 'contactsfromto', 
     405            'name'  => $_SESSION['contactcountdisplay'] ? $_SESSION['contactcountdisplay'] : 'contactsfromto', 
    403406            'vars'  => array( 
    404407            'from'  => $result->first + 1, 
     
    701704    global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; 
    702705 
    703     if (!$CONTACT_COLTYPES['photo']) 
    704         return ''; 
    705  
    706706    if ($result = $CONTACTS->get_result()) 
    707707        $record = $result->first(); 
     
    721721    $content = html::div($attrib, $img); 
    722722 
    723     if ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add') { 
     723    if ($CONTACT_COLTYPES['photo'] && ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add')) { 
    724724        $RCMAIL->output->add_gui_object('contactphoto', $attrib['id']); 
    725725        $hidden = new html_hiddenfield(array('name' => '_photo', 'id' => 'ff_photo', 'value' => $ff_value)); 
Note: See TracChangeset for help on using the changeset viewer.