|
|
@ -18,7 +18,7 @@ class zipdownload extends rcube_plugin
|
|
|
|
|
|
|
|
|
|
|
|
private $charset = 'ASCII';
|
|
|
|
private $charset = 'ASCII';
|
|
|
|
|
|
|
|
|
|
|
|
private $names = [];
|
|
|
|
private $names = array();
|
|
|
|
|
|
|
|
|
|
|
|
// RFC4155: mbox date format
|
|
|
|
// RFC4155: mbox date format
|
|
|
|
const MBOX_DATE_FORMAT = 'D M d H:i:s Y';
|
|
|
|
const MBOX_DATE_FORMAT = 'D M d H:i:s Y';
|
|
|
@ -210,7 +210,7 @@ class zipdownload extends rcube_plugin
|
|
|
|
* Adding a number before dot of extension on a name of file with same name on zip
|
|
|
|
* Adding a number before dot of extension on a name of file with same name on zip
|
|
|
|
* Ext: attach(1).txt on attach filename that has a attach.txt filename on same zip
|
|
|
|
* Ext: attach(1).txt on attach filename that has a attach.txt filename on same zip
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (isset($this->name[$displayname])) {
|
|
|
|
if (isset($this->names[$displayname])) {
|
|
|
|
list($filename, $ext) = preg_split("/\.(?=[^\.]*$)/", $displayname);
|
|
|
|
list($filename, $ext) = preg_split("/\.(?=[^\.]*$)/", $displayname);
|
|
|
|
$displayname = $filename . '(' . ($this->names[$displayname]++) . ').' . $ext;
|
|
|
|
$displayname = $filename . '(' . ($this->names[$displayname]++) . ').' . $ext;
|
|
|
|
$this->names[$displayname] = 1;
|
|
|
|
$this->names[$displayname] = 1;
|
|
|
|