diff --git a/lib/Doctrine/Template/Listener/Sluggable.php b/lib/Doctrine/Template/Listener/Sluggable.php index b7913f15b..c6e5f602c 100644 --- a/lib/Doctrine/Template/Listener/Sluggable.php +++ b/lib/Doctrine/Template/Listener/Sluggable.php @@ -61,8 +61,10 @@ class Doctrine_Template_Listener_Sluggable extends Doctrine_Record_Listener $name = $this->_options['name']; $record = $event->getInvoker(); - - $record->$name = $this->buildSlug($record); + + if (!$record->$name) { + $record->$name = $this->buildSlug($record); + } } protected function buildSlug($record) diff --git a/lib/Doctrine/Template/Listener/Timestampable.php b/lib/Doctrine/Template/Listener/Timestampable.php index cea57e94c..41488d1d7 100644 --- a/lib/Doctrine/Template/Listener/Timestampable.php +++ b/lib/Doctrine/Template/Listener/Timestampable.php @@ -20,7 +20,7 @@ */ /** - * Doctrine_Timestampable_Listener + * Doctrine_Template_Listener_Timestampable * * @package Doctrine * @subpackage Template @@ -30,7 +30,7 @@ * @version $Revision$ * @author Konsta Vesterinen */ -class Doctrine_Timestampable_Listener extends Doctrine_Record_Listener +class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener { /** * Array of timestampable options diff --git a/lib/Doctrine/Template/Timestampable.php b/lib/Doctrine/Template/Timestampable.php index 794801ede..8d96329f4 100644 --- a/lib/Doctrine/Template/Timestampable.php +++ b/lib/Doctrine/Template/Timestampable.php @@ -69,6 +69,6 @@ class Doctrine_Template_Timestampable extends Doctrine_Template $this->hasColumn($this->_options['created']['name'], $this->_options['created']['type'], null, $this->_options['created']['name']); $this->hasColumn($this->_options['updated']['name'], $this->_options['updated']['type'], null, $this->_options['updated']['name']); - $this->addListener(new Doctrine_Timestampable_Listener($this->_options)); + $this->addListener(new Doctrine_Template_Listener_Timestampable($this->_options)); } } \ No newline at end of file