diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index 937647c30..b5043b55f 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -380,11 +380,15 @@ class UpgradeShell extends Shell { $class = $match[1]; - preg_match('@([A-Z][^A-Z]*)$@', $class, $match); - if ($match) { - $type = $match[1]; + if (substr($class, 0, 3) === 'Dbo') { + $type = 'Dbo'; } else { - $type = 'unknown'; + preg_match('@([A-Z][^A-Z]*)$@', $class, $match); + if ($match) { + $type = $match[1]; + } else { + $type = 'unknown'; + } } preg_match('@^.*[\\\/]plugins[\\\/](.*?)[\\\/]@', $file, $match);