Small optimization
authorMarcel Werk <burntime@woltlab.com>
Sat, 10 Aug 2013 13:48:24 +0000 (15:48 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 10 Aug 2013 13:48:24 +0000 (15:48 +0200)
wcfsetup/install/files/lib/data/category/Category.class.php

index 2f84c8f05681fedc9dd7b7b71eabf28577a2cf23..16efde165f6d2c1fdf15215cbbd5a9d4002d2eef 100644 (file)
@@ -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()
         */