Ignore:
Timestamp:
Mar 2, 2010 9:48:26 AM (3 years ago)
Author:
alec
Message:
  • Hide 'add contact' icon if there's no writable address book
File:
1 edited

Legend:

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

    r3296 r3303  
    11711171function rcmail_address_string($input, $max=null, $linked=false, $addicon=null) 
    11721172{ 
    1173   global $IMAP, $PRINT_MODE, $CONFIG, $OUTPUT, $EMAIL_ADDRESS_PATTERN; 
     1173  global $IMAP, $RCMAIL, $PRINT_MODE, $CONFIG, $OUTPUT, $EMAIL_ADDRESS_PATTERN; 
     1174  static $got_writable_abook = null; 
    11741175 
    11751176  $a_parts = $IMAP->decode_address_list($input); 
     
    11821183  $out = ''; 
    11831184 
     1185  if ($got_writable_abook === null && $books = $RCMAIL->get_address_sources(true)) { 
     1186    $got_writable_abook = true; 
     1187  } 
     1188   
    11841189  foreach ($a_parts as $part) { 
    11851190    $j++; 
     
    12011206      } 
    12021207 
    1203       if ($addicon) { 
     1208      if ($addicon && $got_writable_abook) { 
    12041209        $out .= ' ' . html::a(array( 
    12051210            'href' => "#add", 
Note: See TracChangeset for help on using the changeset viewer.