Changeset 3519 in subversion


Ignore:
Timestamp:
Apr 21, 2010 6:30:47 AM (3 years ago)
Author:
alec
Message:
  • Hide IMAP host dropdown when single host is defined (#1486326)
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r3515 r3519  
    22=========================== 
    33 
     4- Hide IMAP host dropdown when single host is defined (#1486326) 
    45- Add images pre-loading on login page (#1451160) 
    56- Add HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR to successful logins log (#1486441) 
  • trunk/roundcubemail/program/include/rcube_template.php

    r3515 r3519  
    10251025        $input_host   = null; 
    10261026 
    1027         if (is_array($default_host)) { 
     1027        if (is_array($default_host) && count($default_host) > 1) { 
    10281028            $input_host = new html_select(array('name' => '_host', 'id' => 'rcmloginhost')); 
    10291029 
     
    10381038            } 
    10391039        } 
     1040        else if (is_array($default_host) && ($host = array_pop($default_host))) { 
     1041            $hide_host = true; 
     1042            $input_host = new html_hiddenfield(array( 
     1043                'name' => '_host', 'id' => 'rcmloginhost', 'value' => $host) + $attrib); 
     1044        } 
    10401045        else if (empty($default_host)) { 
    10411046            $input_host = new html_inputfield(array('name' => '_host', 'id' => 'rcmloginhost') + $attrib); 
     
    10551060 
    10561061        // add host selection row 
    1057         if (is_object($input_host)) { 
     1062        if (is_object($input_host) && !$hide_host) { 
    10581063            $table->add('title', html::label('rcmloginhost', Q(rcube_label('server')))); 
    10591064            $table->add(null, $input_host->show(get_input_value('_host', RCUBE_INPUT_POST))); 
     
    10641069        $out .= $input_url->show(); 
    10651070        $out .= $table->show(); 
     1071         
     1072        if ($hide_host) { 
     1073            $out .= $input_host->show(); 
     1074        } 
    10661075 
    10671076        // surround html output with a form tag 
    10681077        if (empty($attrib['form'])) { 
    1069             $out = $this->form_tag(array('name' => $form_name, 'method' => "post"), $out); 
     1078            $out = $this->form_tag(array('name' => $form_name, 'method' => 'post'), $out); 
    10701079        } 
    10711080 
Note: See TracChangeset for help on using the changeset viewer.