From ade85c1cd0db52d0bbf9e823a146a2243ad5d050 Mon Sep 17 00:00:00 2001 From: AD7six <andydawson76@gmail.com> Date: Mon, 9 May 2011 00:00:19 +0200 Subject: [PATCH] add exception for Dbo classes --- lib/Cake/Console/Command/UpgradeShell.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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);