Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[READY] Fix for #1581 #1583

Merged
merged 10 commits into from
Oct 20, 2012
Merged

[READY] Fix for #1581 #1583

merged 10 commits into from
Oct 20, 2012

Conversation

creocoder
Copy link
Contributor

Ready to merge. Fix for #1581.

$unselectOptions=array('id'=>self::ID_PREFIX.$htmlOptions['id']);
else
$unselectOptions=array('id'=>false);
$hidden=self::hiddenField($hiddenName,$unselect,$unselectOptions);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this IF content can go in the above IF, this way you don't even need the unselect variable.

@creocoder
Copy link
Contributor Author

@mdomba Thank you for your feedback. Made refactoring.

@samdark
Copy link
Member

samdark commented Oct 19, 2012

@mdomba can you handle checking/merging this one?

@ghost ghost assigned mdomba Oct 19, 2012
@mdomba
Copy link
Member

mdomba commented Oct 19, 2012

@creocoder same/similar refactoring for activeDropDownList ?

@samdark of course... already started with checking ;)

{
$hiddenName=$htmlOptions['name'];
$htmlOptions['name'].='[]';
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here... If unselectValue is not set the variable hiddenName is not used, would be good then to leave here just the check and adding of [], if needed, to the name, and then move the $hiddenName=substr($htmlOptions['name'],0,-2); inside the next IF where it belongs.

@creocoder
Copy link
Contributor Author

@mdomba Yes similar refactoring for activeDropDownList. $hiddenName var eliminated :-)

mdomba added a commit that referenced this pull request Oct 20, 2012
@mdomba mdomba merged commit c0c6c5c into yiisoft:master Oct 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants