From 05bc08d932a507ade2a0dd0d5c461fc934994266 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 11 Dec 2010 23:19:07 -0500 Subject: [PATCH] Making helper command be able to replace plugin helpers too. --- cake/console/shells/upgrade.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cake/console/shells/upgrade.php b/cake/console/shells/upgrade.php index 6824897f7..853357e7f 100644 --- a/cake/console/shells/upgrade.php +++ b/cake/console/shells/upgrade.php @@ -25,7 +25,17 @@ class UpgradeShell extends Shell { } $patterns = array(); - foreach (App::objects('helper') as $helper) { + $helpers = App::objects('helper'); + $plugins = App::objects('plugin'); + $pluginHelpers = array(); + foreach ($plugins as $plugin) { + $pluginHelpers = array_merge( + $pluginHelpers, + App::objects('helper', App::pluginPath($plugin) . DS . 'views' . DS . 'helpers' . DS, false) + ); + } + $helpers = array_merge($pluginHelpers, $helpers); + foreach ($helpers as $helper) { $oldHelper = strtolower(substr($helper, 0, 1)).substr($helper, 1); $patterns[] = array( "\${$oldHelper} to \$this->{$helper}",