Commit 0a2ecb60 authored by Jonathan.Wage's avatar Jonathan.Wage

Class renaming.

parent a8ac66dd
...@@ -61,8 +61,10 @@ class Doctrine_Template_Listener_Sluggable extends Doctrine_Record_Listener ...@@ -61,8 +61,10 @@ class Doctrine_Template_Listener_Sluggable extends Doctrine_Record_Listener
$name = $this->_options['name']; $name = $this->_options['name'];
$record = $event->getInvoker(); $record = $event->getInvoker();
$record->$name = $this->buildSlug($record); if (!$record->$name) {
$record->$name = $this->buildSlug($record);
}
} }
protected function buildSlug($record) protected function buildSlug($record)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
/** /**
* Doctrine_Timestampable_Listener * Doctrine_Template_Listener_Timestampable
* *
* @package Doctrine * @package Doctrine
* @subpackage Template * @subpackage Template
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* @version $Revision$ * @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/ */
class Doctrine_Timestampable_Listener extends Doctrine_Record_Listener class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener
{ {
/** /**
* Array of timestampable options * Array of timestampable options
......
...@@ -69,6 +69,6 @@ class Doctrine_Template_Timestampable extends Doctrine_Template ...@@ -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['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->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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment