From 04db9363bdbe389445ff8b1bc5092c4fe2748348 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 10 Aug 2013 15:48:24 +0200 Subject: [PATCH] Small optimization --- .../install/files/lib/data/category/Category.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wcfsetup/install/files/lib/data/category/Category.class.php b/wcfsetup/install/files/lib/data/category/Category.class.php index 2f84c8f056..16efde165f 100644 --- a/wcfsetup/install/files/lib/data/category/Category.class.php +++ b/wcfsetup/install/files/lib/data/category/Category.class.php @@ -166,6 +166,16 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I return WCF::getLanguage()->get($this->title); } + /** + * Returns the description of this category. + * + * @return string + */ + public function getDescription() { + if ($this->description) return WCF::getLanguage()->get($this->description); + return ''; + } + /** * @see wcf\data\DatabaseObject::handleData() */ -- 2.20.1