summaryrefslogtreecommitdiff
path: root/htdocs/src
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/src')
-rw-r--r--htdocs/src/Post.inc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/htdocs/src/Post.inc.php b/htdocs/src/Post.inc.php
index 906778e..eaad6b3 100644
--- a/htdocs/src/Post.inc.php
+++ b/htdocs/src/Post.inc.php
@@ -155,6 +155,22 @@ class Post {
}
}
+ public function getSourceName() {
+ $source = $this->getSource();
+
+ if ($source !== false) {
+ // Get source from source id
+ $sourceObj = Source::getById($source);
+ $source = $sourceObj->getName();
+
+ } else {
+ // Get other
+ $source = "Other: " . $post->getOtherSource();
+ }
+
+ return $source;
+ }
+
public function getOtherSource() {
return $this->info['reason'];
}