public static function requireUpgraded($name, $controller) { if ($controller->params['plugin'] != 'upgrader') { $upgrader = new Upgrader($name); if ($upgrader->validable() && $upgrader->check()) { $controller->redirect(array('plugin' => 'upgrader', 'controller' => 'upgrader', 'action' => 'upgrade', $name, 'admin' => true)); } } }