Aleksander Machniak
2016-03-06 9d4e5f5e493e76f51ba3f6ea824b6deb574c1494
plugins/zipdownload/zipdownload.php
@@ -6,7 +6,7 @@
 * Plugin to allow the download of all message attachments in one zip file
 * and downloading of many messages in one go.
 *
 * @version 3.0
 * @version 3.1
 * @requires php_zip extension (including ZipArchive class)
 * @author Philip Weir
 * @author Thomas Bruderli
@@ -63,7 +63,7 @@
                '_action' => 'plugin.zipdownload.attachments',
                '_mbox'   => $rcmail->output->env['mailbox'],
                '_uid'    => $rcmail->output->env['uid'],
            ));
            ), false, false, true);
            $link = html::a(array('href' => $href, 'class' => 'button zipdownload'),
                rcube::Q($this->gettext('downloadall'))
@@ -119,7 +119,11 @@
     */
    public function download_attachments()
    {
        $rcmail    = rcmail::get_instance();
        $rcmail = rcmail::get_instance();
        // require CSRF protected request
        $rcmail->request_security_check(rcube_utils::INPUT_GET);
        $imap      = $rcmail->get_storage();
        $temp_dir  = $rcmail->config->get('temp_dir');
        $tmpfname  = tempnam($temp_dir, 'zipdownload');