Author: jablko
Date: Tue Oct 26 16:03:01 2010
New Revision: 8518
Log:
Add slug to taxonomies
Modified:
trunk/lib/model/QubitTaxonomy.php
Modified: trunk/lib/model/QubitTaxonomy.php
==============================================================================
--- trunk/lib/model/QubitTaxonomy.php Tue Oct 26 15:52:39 2010 (r8517)
+++ trunk/lib/model/QubitTaxonomy.php Tue Oct 26 16:03:01 2010 (r8518)
@@ -79,6 +79,16 @@
return (string) $this->getName();
}
+ protected function insert($connection = null)
+ {
+ if (!isset($this->slug))
+ {
+ $this->slug = QubitSlug::slugify($this->name);
+ }
+
+ return parent::insert($connection);
+ }
+
public static function getRoot()
{
return parent::getById(self::ROOT_ID);
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.