Changeset 9b624ba in github


Ignore:
Timestamp:
Feb 24, 2011 7:12:09 AM (2 years ago)
Author:
alecpl <alec@…>
Children:
01a3689
Parents:
207cc0b
Message:
  • Merge fixes from trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r207cc0b r9b624ba  
    22=========================== 
    33 
     4- Add variable for 'Today' label in date_today option (#1486120) 
    45- Applied plugin changes since 0.5-stable release 
    56- Fix SQL query in rcube_user::query() so it uses index on MySQL again 
  • config/main.inc.php.dist

    rb46e5b74 r9b624ba  
    348348 
    349349// use this format for today's date display (date or strftime format) 
     350// Note: $ character will be replaced with 'Today' label 
    350351$rcmail_config['date_today'] = 'H:i'; 
    351352 
  • plugins/managesieve/Changelog

    r207cc0b r9b624ba  
    11- Fix escaping of backslash character in quoted strings (#1487780) 
    22- Fix STARTTLS for timsieved < 2.3.10 
     3- Fix handling of non-safe characters (double-quote, backslash) 
     4  or UTF-8 characters (dovecot's implementation bug workaround) 
     5  in script names 
    36 
    47* version 3.0 [2011-02-01] 
  • plugins/managesieve/lib/Net/Sieve.php

    r207cc0b r9b624ba  
    476476            return PEAR::raiseError('Not currently in TRANSACTION state', 1); 
    477477        } 
    478         if (PEAR::isError($res = $this->_doCmd(sprintf('HAVESPACE "%s" %d', $scriptname, $size)))) { 
     478 
     479        $command = sprintf('HAVESPACE %s %d', $this->_escape($scriptname), $size); 
     480        if (PEAR::isError($res = $this->_doCmd($command))) { 
    479481            return $res; 
    480482        } 
     
    741743            return PEAR::raiseError('Not currently in AUTHORISATION state', 1); 
    742744        } 
    743         if (PEAR::isError($res = $this->_doCmd(sprintf('DELETESCRIPT "%s"', $scriptname)))) { 
     745 
     746        $command = sprintf('DELETESCRIPT %s', $this->_escape($scriptname)); 
     747        if (PEAR::isError($res = $this->_doCmd($command))) { 
    744748            return $res; 
    745749        } 
     
    760764        } 
    761765 
    762         if (PEAR::isError($res = $this->_doCmd(sprintf('GETSCRIPT "%s"', $scriptname)))) { 
     766        $command = sprintf('GETSCRIPT %s', $this->_escape($scriptname)); 
     767        if (PEAR::isError($res = $this->_doCmd($command))) { 
    763768            return $res; 
    764769        } 
     
    780785            return PEAR::raiseError('Not currently in AUTHORISATION state', 1); 
    781786        } 
    782         if (PEAR::isError($res = $this->_doCmd(sprintf('SETACTIVE "%s"', $scriptname)))) { 
     787 
     788        $command = sprintf('SETACTIVE %s', $this->_escape($scriptname)); 
     789        if (PEAR::isError($res = $this->_doCmd($command))) { 
    783790            return $res; 
    784791        } 
     792 
    785793        $this->_activeScript = $scriptname; 
    786794        return true; 
     
    809817        foreach ($res as $value) { 
    810818            if (preg_match('/^"(.*)"( ACTIVE)?$/i', $value, $matches)) { 
    811                 $scripts[] = $matches[1]; 
     819                $script_name = stripslashes($matches[1]); 
     820                $scripts[] = $script_name; 
    812821                if (!empty($matches[2])) { 
    813                     $activescript = $matches[1]; 
     822                    $activescript = $script_name; 
    814823                } 
    815824            } 
     
    834843 
    835844        $stringLength = $this->_getLineLength($scriptdata); 
    836  
    837         if (PEAR::isError($res = $this->_doCmd(sprintf("PUTSCRIPT \"%s\" {%d+}\r\n%s", $scriptname, $stringLength, $scriptdata)))) { 
     845        $command      = sprintf("PUTSCRIPT %s {%d+}\r\n%s", 
     846            $this->_escape($scriptname), $stringLength, $scriptdata); 
     847 
     848        if (PEAR::isError($res = $this->_doCmd($command))) { 
    838849            return $res; 
    839850        } 
     
    12141225 
    12151226    /** 
     1227     * Convert string into RFC's quoted-string or literal-c2s form 
     1228     * 
     1229     * @param string $string The string to convert. 
     1230     * 
     1231     * @return string Result string 
     1232     */ 
     1233    function _escape($string) 
     1234    { 
     1235        // Some implementations doesn't allow UTF-8 characters in quoted-string 
     1236        // It's safe to use literal-c2s 
     1237        if (preg_match('/[^\x01-\x09\x0B-\x0C\x0E-\x7F]/', $string)) { 
     1238            return sprintf("{%d+}\r\n%s", $this->_getLineLength($string), $string); 
     1239        } 
     1240 
     1241        return '"' . addcslashes($string, '\\"') . '"'; 
     1242    } 
     1243 
     1244    /** 
    12161245     * Write debug text to the current debug output handler. 
    12171246     * 
  • program/include/main.inc

    r1a2754d r9b624ba  
    10681068  } 
    10691069 
    1070   return $today ? (rcube_label('today') . ' ' . $out) : $out; 
     1070  if ($today) { 
     1071    $label = rcube_label('today'); 
     1072    // replcae $ character with "Today" label (#1486120) 
     1073    if (strpos($out, '$') !== false) { 
     1074      $out = preg_replace('/\$/', $label, $out, 1); 
     1075    } 
     1076    else { 
     1077      $out = $label . ' ' . $out; 
     1078    } 
     1079  } 
     1080 
     1081  return $out; 
    10711082} 
    10721083 
     
    16861697  global $RCMAIL, $CONFIG; 
    16871698 
    1688   $hook = $RCMAIL->plugins->exec_hook('hmtl_editor', array('mode' => $mode)); 
     1699  $hook = $RCMAIL->plugins->exec_hook('html_editor', array('mode' => $mode)); 
    16891700 
    16901701  if ($hook['abort']) 
  • skins/default/templates/messageprint.html

    r83ba22c r9b624ba  
    33<head> 
    44<title><roundcube:object name="pagetitle" /></title> 
     5<link rel="shortcut icon" href="/images/favicon.ico"/> 
    56<link rel="stylesheet" type="text/css" href="/print.css" /> 
    67</head> 
Note: See TracChangeset for help on using the changeset viewer.