Merge pull request #301 from jamiemill/2.0-upgradefix

Removed invalid 'Helper' suffix in UpgradeShell::helpers()
This commit is contained in:
Graham Weldon 2011-11-06 04:05:22 -08:00
commit cc0f0b4e55

View file

@ -225,6 +225,7 @@ class UpgradeShell extends Shell {
} }
$helpers = array_merge($pluginHelpers, $helpers); $helpers = array_merge($pluginHelpers, $helpers);
foreach ($helpers as $helper) { foreach ($helpers as $helper) {
$helper = preg_replace('/Helper$/', '', $helper);
$oldHelper = strtolower(substr($helper, 0, 1)).substr($helper, 1); $oldHelper = strtolower(substr($helper, 0, 1)).substr($helper, 1);
$patterns[] = array( $patterns[] = array(
"\${$oldHelper} to \$this->{$helper}", "\${$oldHelper} to \$this->{$helper}",