aboutsummaryrefslogtreecommitdiff
path: root/classes/File.php
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2014-08-05 11:30:45 +0200
committerMikael Nordfeldth <mmn@hethane.se>2014-08-05 11:30:45 +0200
commit1c04601a9c3fe9b2a358a01478cf7cd141808d48 (patch)
tree105b224358aa8fd8a8893abbf49af9016673e7b1 /classes/File.php
parent17b9614ff8ec0070f6ea8c7ac7d38167f862cde5 (diff)
downloadgnu-social-1c04601a9c3fe9b2a358a01478cf7cd141808d48.tar
gnu-social-1c04601a9c3fe9b2a358a01478cf7cd141808d48.zip
Removing excessive "inline" attachment listings
Diffstat (limited to 'classes/File.php')
-rw-r--r--classes/File.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/File.php b/classes/File.php
index 029ff487a4..210e758419 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -541,4 +541,11 @@ class File extends Managed_DataObject
// And finally remove the entry from the database
return parent::delete($useWhere);
}
+
+ public function getTitle()
+ {
+ $title = $this->title ?: $this->filename;
+
+ return $title ?: null;
+ }
}