Hello, Please consider integrating the patch in ticket #1485267
On Thu, 18 Sep 2008 17:52:11 +0400, "Dennis P. Nikolaenko" dennis@nikolaenko.ru wrote:
Hello, Please consider integrating the patch in ticket #1485267
Ok, I've made some investigation and here're my conclusions:
or some configured default, also we should add info about that in install instructions as requirement.
So, about your patch. I think, setlocale hack should be moved to roundcube's set_user() function.
Dennis P. Nikolaenko wrote:
Hello, Please consider integrating the patch in ticket #1485267
maybe in this way?:
--- mime.old 2008-09-21 10:40:36.000000000 +0200 +++ mime.php 2008-09-23 09:22:42.221738855 +0200 @@ -350,7 +350,7 @@ $err = PEAR::raiseError($msg); return $err; }
$filename = substr('s_'.basename($filename), 2);
$filename = $this->_basename($filename);
if (PEAR::isError($filedata)) {
return $filedata;
}
@@ -667,7 +667,7 @@
$this->_htmlbody = preg_replace($regex, $rep, $this->_htmlbody);
$this->_html_images[$key]['name'] =
substr(basename('s_'.$this->_html_images[$key]['name']), 2);
$this->_basename($this->_html_images[$key]['name']);
}
}
@@ -1114,6 +1114,20 @@ } }
* Get file's basename (locale independent)
*
* @param string Filename
*
* @return string Basename
* @access private
*/
return preg_replace('/^.*[\\\\\\/]/', '', $filename);
return preg_replace('/^.*[\/]/', '', $filename);
} // End of class
A.L.E.C wrote:
Dennis P. Nikolaenko wrote:
Hello, Please consider integrating the patch in ticket #1485267
maybe in this way?:
--- mime.old 2008-09-21 10:40:36.000000000 +0200 +++ mime.php 2008-09-23 09:22:42.221738855 +0200 @@ -350,7 +350,7 @@ $err = PEAR::raiseError($msg); return $err; }
$filename = substr('s_'.basename($filename), 2);
$filename = $this->_basename($filename); if (PEAR::isError($filedata)) { return $filedata; }
@@ -667,7 +667,7 @@
$this->_htmlbody = preg_replace($regex, $rep, $this->_htmlbody); $this->_html_images[$key]['name'] =
substr(basename('s_'.$this->_html_images[$key]['name']), 2);
$this->_basename($this->_html_images[$key]['name']); } }
@@ -1114,6 +1114,20 @@ } }
- /**
* Get file's basename (locale independent)
*
* @param string Filename
*
* @return string Basename
* @access private
*/
- function _basename($filename)
- {
- if (stristr(PHP_OS, 'win') || stristr(PHP_OS, 'netware'))
return preg_replace('/^.*[\\\\\\/]/', '', $filename);
- else
return preg_replace('/^.*[\/]/', '', $filename);
- }
} // End of class
Hi, Alec.
It works with Chinese Simp characters filenames. Thanks very much. Will it be merged into svn repository? http://trac.roundcube.net/ticket/1485267#comment:27 _______________________________________________ List info: http://lists.roundcube.net/dev/
Zhang Huangbin wrote:
It works with Chinese Simp characters filenames. Thanks very much. Will it be merged into svn repository? http://trac.roundcube.net/ticket/1485267#comment:27
After some tests I think yes, it will.
A.L.E.C wrote:
Dennis P. Nikolaenko wrote:
Hello, Please consider integrating the patch in ticket #1485267
maybe in this way?:
--- mime.old 2008-09-21 10:40:36.000000000 +0200 +++ mime.php 2008-09-23 09:22:42.221738855 +0200 @@ -350,7 +350,7 @@ $err = PEAR::raiseError($msg); return $err; }
$filename = substr('s_'.basename($filename), 2);
$filename = $this->_basename($filename); if (PEAR::isError($filedata)) { return $filedata; }
@@ -667,7 +667,7 @@
$this->_htmlbody = preg_replace($regex, $rep, $this->_htmlbody); $this->_html_images[$key]['name'] =
substr(basename('s_'.$this->_html_images[$key]['name']), 2);
$this->_basename($this->_html_images[$key]['name']); } }
@@ -1114,6 +1114,20 @@ } }
- /**
* Get file's basename (locale independent)
*
* @param string Filename
*
* @return string Basename
* @access private
*/
- function _basename($filename)
- {
- if (stristr(PHP_OS, 'win') || stristr(PHP_OS, 'netware'))
return preg_replace('/^.*[\\\\\\/]/', '', $filename);
- else
return preg_replace('/^.*[\/]/', '', $filename);
- }
} // End of class
Hi, Alec.
more testing on roundcube-0.2-beta:
Compose issue in roundcube? _______________________________________________ List info: http://lists.roundcube.net/dev/
Zhang Huangbin wrote:
more testing on roundcube-0.2-beta:
- without above patch:
in roundcube-0.2-beta, attachment filename with Chinese characters was removed, only filename suffix remained. 2) composed mail in outlook, sent mail to myself, view mail in roundcube-0.2-beta, attachment filename with Chinese characters was correct.
- composed mail in roundcube-0.2-beta, sent mail to myself, view mail
Compose issue in roundcube
Problems with attachment names are only when sending messages (exactly when building messages using Mail_mime class). There are no problems with incoming mail.
A.L.E.C wrote:
Zhang Huangbin wrote:
more testing on roundcube-0.2-beta:
- without above patch:
in roundcube-0.2-beta, attachment filename with Chinese characters was removed, only filename suffix remained. 2) composed mail in outlook, sent mail to myself, view mail in roundcube-0.2-beta, attachment filename with Chinese characters was correct.
- composed mail in roundcube-0.2-beta, sent mail to myself, view mail
Compose issue in roundcube
Problems with attachment names are only when sending messages (exactly when building messages using Mail_mime class). There are no problems with incoming mail.
Thanks for this detail.
OT: Can you put your managesieve plugin's localization to http://translator.roundcube.net/ ? So that others can translate it to other languages.
It's a useful plugin, thanks for your hard work. :)
Zhang Huangbin wrote:
OT: Can you put your managesieve plugin's localization to http://translator.roundcube.net/ ? So that others can translate it to other languages.
http://alec.pl/roundcube/translator