From 207cc0b9b3cfdfb29e4f02e83014320fd12eeb68 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 16 Feb 2011 05:48:11 -0500
Subject: [PATCH] - Applied plugin changes since 0.5-stable release
---
plugins/database_attachments/database_attachments.php | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php
index 28ccde4..919beac 100644
--- a/plugins/database_attachments/database_attachments.php
+++ b/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();
--
Gitblit v1.9.1