Skip to content

Commit

Permalink
Fixing form attribute access and broken test.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 18, 2010
1 parent ef85fb1 commit 76f94d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cake/libs/view/helpers/form.php
Expand Up @@ -615,8 +615,8 @@ public function inputs($fields = null, $blacklist = null) {
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');
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/view/helpers/form.test.php
Expand Up @@ -2206,7 +2206,7 @@ function testFormInputs() {
$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',
Expand Down

0 comments on commit 76f94d5

Please sign in to comment.