summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'class.db.category.php')
-rw-r--r--class.db.category.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/class.db.category.php b/class.db.category.php
index 8ad8456..acd8ceb 100644
--- a/class.db.category.php
+++ b/class.db.category.php
@@ -46,6 +46,21 @@
}
}
+ public function getDescription($lingua = "en") {
+
+ if($this->description)
+ return $this->description;
+
+ $db =& MDB2::singleton();
+
+ $sql = "SELECT description FROM category_description WHERE category = ".$db->quote($this->id)." AND lingua = ".$db->quote($lingua).";";
+
+ $this->description = $db->getOne($sql);
+
+ return $this->description;
+
+ }
+
}
?> \ No newline at end of file