Changeset 168 in subversion


Ignore:
Timestamp:
Mar 20, 2006 5:11:35 PM (7 years ago)
Author:
roundcube
Message:

Minor improvements and bugfixes (see changelog)

Location:
trunk/roundcubemail
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r165 r168  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42006/03/20 
     5---------- 
     6- Fixed hard-coded cols selection for sent folder (Bug #1354586) 
     7- Enable some HTML links for use with "open in new window" or "save target" 
     8- Check meta-key instead of ctrl on Macs 
     9- Ignore double clicks when holding down a modifier key 
     10- Fixed reloading of the login page 
     11- Fixed typo in compose template (Bug #1446852) 
     12- Added compose button to message read step (Request #1433288) 
     13- New config parameter for persistent database connections (Bug #1431817) 
     14 
    315 
    4162006/03/14 
  • trunk/roundcubemail/UPGRADING

    r146 r168  
    102102  $rcmail_config['db_sequence_message_ids'] = 'message_ids'; 
    103103   
     104   
     105form version 0.1-beta 
     106---------------------------------------- 
     107- replace index.php 
     108- replace all files in folder /program/ 
     109- replace all files in folder /skins/default/ 
     110- add these lines to /config/db.inc.php 
     111  $rcmail_config['db_persistent'] = TRUE; 
     112 
     113   
  • trunk/roundcubemail/index.php

    r164 r168  
    33 +-----------------------------------------------------------------------+ 
    44 | RoundCube Webmail IMAP Client                                         | 
    5  | Version 0.1-20060314                                                  | 
     5 | Version 0.1-20060320                                                  | 
    66 |                                                                       | 
    77 | Copyright (C) 2005, RoundCube Dev. - Switzerland                      | 
     
    4141*/ 
    4242 
    43 define('RCMAIL_VERSION', '0.1-20060220'); 
     43define('RCMAIL_VERSION', '0.1-20060320'); 
    4444 
    4545 
    4646// define global vars 
    47 $INSTALL_PATH = dirname($_SERVER['SCRIPT_FILENAME']); 
     47$CHARSET = 'UTF-8'; 
    4848$OUTPUT_TYPE = 'html'; 
    4949$JS_OBJECT_NAME = 'rcmail'; 
    50 $CHARSET = 'UTF-8'; 
     50$INSTALL_PATH = dirname($_SERVER['SCRIPT_FILENAME']); 
     51$MAIN_TASKS = array('mail','settings','addressbook','logout'); 
    5152 
    5253if (empty($INSTALL_PATH)) 
     
    332333 
    333334 
     335// parse main template 
    334336// only allow these templates to be included 
    335 $valid_tasks = array('mail','settings','addressbook'); 
    336  
    337 // parse main template 
    338 if (in_array($_task, $valid_tasks)) 
     337if (in_array($_task, $MAIN_TASKS)) 
    339338  parse_template($_task); 
    340339 
  • trunk/roundcubemail/program/include/main.inc

    r164 r168  
    7373  require_once('include/rcube_'.(empty($CONFIG['db_backend']) ? 'db' : $CONFIG['db_backend']).'.inc'); 
    7474   
    75   $DB = new rcube_db($CONFIG['db_dsnw'], $CONFIG['db_dsnr']); 
     75  $DB = new rcube_db($CONFIG['db_dsnw'], $CONFIG['db_dsnr'], $CONFIG['db_persistent']); 
    7676  $DB->sqlite_initials = $INSTALL_PATH.'SQL/sqlite.initial.sql'; 
    7777  $DB->db_connect('w'); 
     
    11241124      if ($object_handlers[$object] && function_exists($object_handlers[$object])) 
    11251125        return call_user_func($object_handlers[$object], $attrib); 
    1126  
     1126         
     1127      else if ($object=='productname') 
     1128        { 
     1129        $name = !empty($CONFIG['product_name']) ? $CONFIG['product_name'] : 'RoundCube Webmail'; 
     1130        return rep_specialchars_output($name, 'html', 'all'); 
     1131        } 
    11271132      else if ($object=='pagetitle') 
    11281133        { 
     
    11521157function rcube_button($attrib) 
    11531158  { 
    1154   global $CONFIG, $OUTPUT, $JS_OBJECT_NAME, $BROWSER; 
     1159  global $CONFIG, $OUTPUT, $JS_OBJECT_NAME, $BROWSER, $COMM_PATH, $MAIN_TASKS; 
    11551160  static $sa_buttons = array(); 
    11561161  static $s_button_count = 100; 
     
    12241229  // register button in the system 
    12251230  if ($attrib['command']) 
     1231    { 
    12261232    $OUTPUT->add_script(sprintf("%s.register_button('%s', '%s', '%s', '%s', '%s', '%s');", 
    12271233                                $JS_OBJECT_NAME, 
     
    12321238                                $attirb['imagesel'] ? $skin_path.$attirb['imagesel'] : $attrib['classsel'], 
    12331239                                $attrib['imageover'] ? $skin_path.$attrib['imageover'] : '')); 
     1240 
     1241    // make valid href to task buttons 
     1242    if (in_array($attrib['command'], $MAIN_TASKS)) 
     1243      $attrib['href'] = ereg_replace('_task=[a-z]+', '_task='.$attrib['command'], $COMM_PATH); 
     1244    } 
    12341245 
    12351246  // overwrite attributes 
  • trunk/roundcubemail/program/js/app.js

    r162 r168  
    88 |                                                                       | 
    99 +-----------------------------------------------------------------------+ 
    10  | Author: Thomas Bruederli <roundcube@gmail.com>                        | 
     10 | Authors: Thomas Bruederli <roundcube@gmail.com>                       | 
     11 |          Charles McNulty <charles@charlesmcnulty.com>                 | 
    1112 +-----------------------------------------------------------------------+ 
    1213  
     
    232233 
    233234    // disable browser's contextmenus 
    234     document.oncontextmenu = function(){ return false; } 
     235    // document.oncontextmenu = function(){ return false; } 
    235236 
    236237    // load body click event 
     
    249250    if (this.kepp_alive_interval && this.task=='mail' && this.gui_objects.messagelist) 
    250251      this.kepp_alive_int = setInterval(this.ref+'.check_for_recent()', this.kepp_alive_interval); 
    251     else 
     252    else if (this.task!='login') 
    252253      this.kepp_alive_int = setInterval(this.ref+'.send_keep_alive()', this.kepp_alive_interval); 
    253254    }; 
     
    276277    var mod_key = this.get_modifier(e); 
    277278    var scroll_to = 0; 
    278  
     279     
    279280    var last_selected_row = this.list_rows[this.last_selected]; 
    280281 
     
    10901091  this.click_row = function(e, id) 
    10911092    { 
     1093    var mod_key = this.get_modifier(e); 
    10921094 
    10931095    // don't do anything (another action processed before) 
     
    10991101     
    11001102    // unselects currently selected row     
    1101     if (!this.drag_active && this.in_selection_before==id) { 
    1102       var mod_key = this.get_modifier(e); 
     1103    if (!this.drag_active && this.in_selection_before==id) 
    11031104      this.select_row(id,mod_key); 
    1104     } 
     1105 
    11051106    this.drag_start = false; 
    11061107    this.in_selection_before = false; 
    11071108         
    11081109    // row was double clicked 
    1109     if (this.task=='mail' && this.list_rows && this.list_rows[id].clicked) 
     1110    if (this.task=='mail' && this.list_rows && this.list_rows[id].clicked && !mod_key) 
    11101111      { 
    11111112      this.show_message(id); 
     
    29352936 
    29362937 
     2938/* deprecated methods 
     2939 
    29372940  // check if Shift-key is pressed on event 
    29382941  this.check_shiftkey = function(e) 
     
    29642967      return false; 
    29652968    } 
    2966  
    2967  
    2968 // returns modifier key (constants defined at top of file) 
     2969*/ 
     2970 
     2971  // returns modifier key (constants defined at top of file) 
    29692972  this.get_modifier = function(e) 
    29702973    { 
    29712974    var opcode = 0; 
    2972     if (e = e || window.event) 
    2973     { 
     2975    e = e || window.event; 
     2976 
     2977    if (bw.mac && e) 
     2978      { 
     2979      opcode += (e.metaKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); 
     2980      return opcode;     
     2981      } 
     2982    if (e) 
     2983      { 
    29742984      opcode += (e.ctrlKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); 
    2975           return opcode; 
    2976     } 
     2985      return opcode; 
     2986      } 
    29772987    if (e.cancelBubble) 
    2978     { 
     2988      { 
    29792989      e.cancelBubble = true; 
    29802990      e.returnValue = false; 
    2981     } 
     2991      } 
    29822992    else if (e.preventDefault) 
    29832993      e.preventDefault(); 
  • trunk/roundcubemail/program/lib/imap.inc

    r140 r168  
    4040                - Leave messageID unchanged in iil_C_FetchHeaders() 
    4141                - Avoid stripslahes in iil_Connect() 
     42                - Removed <br> from error messages (better for logging) 
    4243                - Removed some debuggers (echo ...) 
    4344 
     
    210211        return $conn->fp; 
    211212    }else{ 
    212         $conn->error .= 'Authentication failed (AUTH): <br>"'.htmlspecialchars($line)."\""; 
     213        $conn->error .= 'Authentication for '.$user.' failed (AUTH): "'.htmlspecialchars($line)."\""; 
    213214        $conn->errorNum = -2; 
    214215        return false; 
     
    231232        $result=false; 
    232233        fclose($conn->fp); 
    233         $conn->error .= 'Authentication failed (LOGIN):<br>"'.htmlspecialchars($line)."\""; 
     234        $conn->error .= 'Authentication for '.$user.' failed (LOGIN): "'.htmlspecialchars($line)."\""; 
    234235        $conn->errorNum = -2; 
    235236    } 
     
    336337         
    337338        //check input 
    338         if (empty($host)) $iil_error .= "Invalid host<br>\n"; 
    339         if (empty($user)) $iil_error .= "Invalid user<br>\n"; 
    340         if (empty($password)) $iil_error .= "Invalid password<br>\n"; 
     339        if (empty($host)) $iil_error .= "Invalid host\n"; 
     340        if (empty($user)) $iil_error .= "Invalid user\n"; 
     341        if (empty($password)) $iil_error .= "Invalid password\n"; 
    341342        if (!empty($iil_error)) return false; 
    342343        if (!$ICL_PORT) $ICL_PORT = 143; 
     
    15771578                if ($result_code==0) return $messages; 
    15781579                else{ 
    1579                         $conn->error = "iil_C_Search: ".$line."<br>\n"; 
     1580                        $conn->error = "iil_C_Search: ".$line."\n"; 
    15801581                        return false; 
    15811582                } 
    15821583                 
    15831584        }else{ 
    1584                 $conn->error = "iil_C_Search: Couldn't select \"$folder\" <br>\n"; 
     1585                $conn->error = "iil_C_Search: Couldn't select \"$folder\"\n"; 
    15851586                return false; 
    15861587        } 
     
    19301931         
    19311932                $result = (iil_ParseResult($line)==0); 
    1932                 if (!$result) $conn->error .= $line."<br>\n"; 
     1933                if (!$result) $conn->error .= $line."\n"; 
    19331934                return $result; 
    19341935         
    19351936        }else{ 
    1936                 $conn->error .= "Couldn't send command \"$request\"<br>\n"; 
     1937                $conn->error .= "Couldn't send command \"$request\"\n"; 
    19371938                return false; 
    19381939        } 
     
    19471948        if (file_exists(realpath($path))) $in_fp = fopen($path, "r"); 
    19481949        if (!$in_fp){  
    1949                 $conn->error .= "Couldn't open $path for reading<br>\n"; 
     1950                $conn->error .= "Couldn't open $path for reading\n"; 
    19501951                return false; 
    19511952        } 
     
    19771978                         
    19781979                $result = (iil_ParseResult($line)==0); 
    1979                 if (!$result) $conn->error .= $line."<br>\n"; 
     1980                if (!$result) $conn->error .= $line."\n"; 
    19801981                return $result; 
    19811982         
    19821983        }else{ 
    1983                 $conn->error .= "Couldn't send command \"$request\"<br>\n"; 
     1984                $conn->error .= "Couldn't send command \"$request\"\n"; 
    19841985                return false; 
    19851986        } 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r163 r168  
    162162function rcmail_render_folder_tree_html(&$arrFolders, &$special, &$mbox, $maxlength, $nestLevel=0) 
    163163  { 
    164   global $JS_OBJECT_NAME, $IMAP, $CONFIG, $OUTPUT; 
     164  global $JS_OBJECT_NAME, $COMM_PATH, $IMAP, $CONFIG, $OUTPUT; 
    165165 
    166166  $idx = 0; 
     
    191191    if ($unread_count = $IMAP->messagecount($folder['id'], 'RECENT', ($folder['id']==$mbox))) 
    192192      $foldername .= sprintf(' (%d)', $unread_count); 
    193        
     193 
    194194    // make folder name safe for ids and class names 
    195195    $folder_css = $class_name = preg_replace('/[^a-z0-9\-_]/', '', $folder_lc); 
     
    205205      $class_name = 'junk'; 
    206206 
    207     $out .= sprintf('<li id="rcmbx%s" class="mailbox %s %s%s%s"><a href="./#%s" onclick="return %s.command(\'list\',\'%s\')" onmouseup="return %s.mbox_mouse_up(\'%s\')"%s>%s</a>', 
     207    $out .= sprintf('<li id="rcmbx%s" class="mailbox %s %s%s%s"><a href="%s&_mbox=%s"'. 
     208                    ' onclick="return %s.command(\'list\',\'%s\')"'. 
     209                    ' onmouseup="return %s.mbox_mouse_up(\'%s\')"%s>%s</a>', 
    208210                    $folder_css, 
    209211                    $class_name, 
     
    211213                    $unread_count ? ' unread' : '', 
    212214                    $folder['id']==$mbox ? ' selected' : '', 
    213                     $folder['id'], 
     215                    $COMM_PATH, 
     216                    urlencode($folder['id']), 
    214217                    $JS_OBJECT_NAME, 
    215218                    $folder['id'], 
     
    296299   
    297300  // show 'to' instead of from in sent messages 
    298   if (strtolower($IMAP->get_mailbox_name())=='sent' && ($f = array_search('from', $a_show_cols))) 
     301  if (strtolower($IMAP->get_mailbox_name())=='sent' && ($f = array_search('from', $a_show_cols)) 
     302      && !array_search('to', $a_show_cols)) 
    299303    $a_show_cols[$f] = 'to'; 
    300  
     304   
    301305  // add col definition 
    302306  $out .= '<colgroup>'; 
     
    479483 
    480484  // show 'to' instead of from in sent messages 
    481   if (strtolower($IMAP->get_mailbox_name())=='sent' && ($f = array_search('from', $a_show_cols))) 
     485  if (strtolower($IMAP->get_mailbox_name())=='sent' && ($f = array_search('from', $a_show_cols)) 
     486      && !array_search('to', $a_show_cols)) 
    482487    $a_show_cols[$f] = 'to'; 
    483488 
  • trunk/roundcubemail/program/steps/mail/show.inc

    r62 r168  
    9696                        show_bytes($attach_prop['size'])); 
    9797      else 
    98         $out .= sprintf('<li><a href="#attachment" onclick="return %s.command(\'load-attachment\',{part:\'%s\', mimetype:\'%s\'},this)">%s</a></li>'."\n", 
     98        $out .= sprintf('<li><a href="%s&_part=%s" onclick="return %s.command(\'load-attachment\',{part:\'%s\', mimetype:\'%s\'},this)">%s</a></li>'."\n", 
     99                        $GET_URL, 
     100                        $attach_prop['part_id'], 
    99101                        $JS_OBJECT_NAME, 
    100102                        $attach_prop['part_id'], 
    101103                        $attach_prop['mimetype'], 
    102104                        $attach_prop['filename']); 
    103     /* direct link 
    104       else 
    105         $out .= sprintf('<li><a href="%s&_part=%s&_frame=1" target="rcubemailattachment">%s</a></li>'."\n", 
    106                         $GET_URL, 
    107                         $attach_prop['part_id'], 
    108                         $attach_prop['filename']); 
    109     */ 
    110105      } 
    111106 
Note: See TracChangeset for help on using the changeset viewer.