From 0b1deccfe6cbe7fca0a6abd03abb18cafca59c60 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 9 Jun 2011 15:01:53 -0700 Subject: Added category options and descriptions. --- htdocs/src/Category.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'htdocs/src/Category.inc.php') diff --git a/htdocs/src/Category.inc.php b/htdocs/src/Category.inc.php index edc0303..fdcd210 100644 --- a/htdocs/src/Category.inc.php +++ b/htdocs/src/Category.inc.php @@ -27,7 +27,8 @@ class Category { $result = array(); foreach ($rows as $row) { - $result[$row['shortname']] = $row['name']; + $cat = new Category($row); + $result[$row['shortname']] = $cat; } return $result; @@ -80,6 +81,10 @@ class Category { public function getShortname() { return htmlspecialchars($this->info['shortname']); } + + public function getDescription() { + return htmlspecialchars($this->info['description']); + } } ?> -- cgit v1.2.3