Skip to content

Commit

Permalink
update contain for performance, from @MNTBKR
Browse files Browse the repository at this point in the history
Thank you @MNTBKR

I'm adding this improvement to a PR to develop branch and closing the PR done to master branch 20 Apr.
  • Loading branch information
steinkel committed Jun 25, 2015
1 parent fd69d2b commit 9ffa12c
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 9ffa12c

Please sign in to comment.