From 558684e32769d9dbd0d27a6feb3bbb9cf9aa22d7 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 30 Aug 2011 10:37:35 -0700 Subject: Abstracted source name code and added a source name listing to the moderation index. (Eventum #33). --- htdocs/postings.php | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'htdocs/postings.php') diff --git a/htdocs/postings.php b/htdocs/postings.php index 15d3d5f..0440ab0 100644 --- a/htdocs/postings.php +++ b/htdocs/postings.php @@ -49,7 +49,8 @@ if (isset($_SESSION['currentUser'])) { , $post->getid(), $post->getid()); // Print Source information - printSourceInfo($post); + printf("

This post was posted by %s from %s.

", + $post->getEmail(), $post->getSourceName()); echo "

return to moderation

"; echo ""; @@ -63,7 +64,9 @@ if (isset($_SESSION['currentUser'])) { . "reject post", $post->getid(), $post->getid()); - printSourceInfo($post); + // Print source info. + printf("

This post was posted by %s from %s.

", + $post->getEmail(), $post->getSourceName()); echo ""; } @@ -98,24 +101,6 @@ foreach ($post->getImages() as $imgid) { require_once "src/footer.inc.php"; -function printSourceInfo($post) { - // Print Source information - $source = $post->getSource(); - - if ($source !== false) { - // Get source from source id - $sourceObj = Source::getById($source); - $source = $sourceObj->getName(); - - - } else { - // Get other - $source = $post->getOtherSource(); - } - - printf("

This post was posted by %s from %s.

", - $post->getEmail(), $source); -} function errorNotFound() { // Get the 404 page -- cgit v1.2.3