Skip to content

Commit

Permalink
Merge pull request CakeDC#140 from steinkel/patch-1
Browse files Browse the repository at this point in the history
update contain for performance, from @MNTBKR
  • Loading branch information
ajibarra committed Jun 25, 2015
2 parents fd69d2b + 9ffa12c commit e9a3261
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Model/Behavior/TinySluggableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private function __getNextSlug(Model $Model) {
}
$new = $this->_toShort($Model, $this->_toDecimal($Model, $new) + 1);
$existing = $Model->find('count', array(
'contain' => array(),
'conditions' => array(
$Model->alias . '.' . $Model->tinySlug => $new)));
$attempts++;
Expand Down

0 comments on commit e9a3261

Please sign in to comment.