Permalink
Browse files

Bugfix: Only create a new slug, if is new record or slug relevant dat…

…a changed
  • Loading branch information...
1 parent 05e3602 commit de3e9d1dfa544bbc22695156a259b2a7433981cd @mintao committed Jun 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 SluggableBehavior.php
View
2 SluggableBehavior.php
@@ -88,7 +88,7 @@ public function beforeSave($event)
// Check if slug has to be unique
if (false === $this->unique
- || (! $this->isNewRecord && $this->owner->slug === $slug)
+ || (! $this->owner->isNewRecord && $this->owner->slug === $slug)
)
{
$this->owner->slug = $slug;

0 comments on commit de3e9d1

Please sign in to comment.