Fixing form attribute access and broken test.

This commit is contained in:
mark_story 2010-05-17 23:31:47 -04:00
parent ef85fb1247
commit 76f94d5c75
2 changed files with 3 additions and 3 deletions

View file

@ -615,8 +615,8 @@ class FormHelper extends AppHelper {
if ($legend === true) {
$actionName = __('New %s');
$isEdit = (
strpos($this->action, 'update') !== false ||
strpos($this->action, 'edit') !== false
strpos($this->request->params['action'], 'update') !== false ||
strpos($this->request->params['action'], 'edit') !== false
);
if ($isEdit) {
$actionName = __('Edit %s');

View file

@ -2206,7 +2206,7 @@ class FormHelperTest extends CakeTestCase {
$View = ClassRegistry::getObject('view');
$this->Form->create('Contact');
$this->Form->request['prefix'] = 'admin';
$this->Form->action = 'admin_edit';
$this->Form->request['action'] = 'admin_edit';
$result = $this->Form->inputs();
$expected = array(
'<fieldset',