summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PhpBB3.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/PhpBB3.php b/src/PhpBB3.php
index 381c9a4..f5f0df9 100644
--- a/src/PhpBB3.php
+++ b/src/PhpBB3.php
@@ -120,6 +120,20 @@ class PhpBB3 {
return $row ? $row['post_time'] : false;
}
+ public function getAttachmentData($attachId) {
+ throw_if_null($attachId);
+
+ global $db;
+
+ $sql = 'SELECT physical_filename, real_filename, ' .
+ 'attach_comment, mimetype, filesize ' .
+ 'FROM ' . ATTACHMENTS_TABLE .
+ 'WHERE attach_id = ' . $attachId;
+
+ $row = $this->get_exactly_one_row($sql);
+ return $row;
+ }
+
public function postMessage($postType, $forumId, $topicId, $msg) {
throw_if_null($msg);