alecpl
2011-02-16 207cc0b9b3cfdfb29e4f02e83014320fd12eeb68
plugins/database_attachments/database_attachments.php
@@ -63,6 +63,10 @@
        $rcmail = rcmail::get_instance();
        $key = $this->_key($args['name']);
   if ($args['path'])
       $args['data'] = file_get_contents($args['path']);
        $data = base64_encode($args['data']);
        $status = $rcmail->db->query(
@@ -105,19 +109,19 @@
    /**
     * When composing an html message, image attachments may be shown
     * For this plugin, $this->get_attachment will check the file and
     * For this plugin, $this->get() will check the file and
     * return it's contents
     */
    function display($args)
    {
        return $this->get_attachment($args);
        return $this->get($args);
    }
    /**
     * When displaying or sending the attachment the file contents are fetched
     * using this method. This is also called by the display_attachment hook.
     * using this method. This is also called by the attachment_display hook.
     */
    function get_attachment($args)
    function get($args)
    {
        $rcmail = rcmail::get_instance();