Closed Bug 457602 Opened 11 years ago Closed 11 years ago

function out_select() in search element breaks test framework

Categories

(addons.mozilla.org Graveyard :: Administration, defect, major)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wenzel, Assigned: wenzel)

References

Details

Attachments

(1 file)

The search element contains a global function out_select().

That's not only exceptionally ugly, it also breaks the test framework by preventing it from loading the same page more than once on the same test run:

Fatal error: Cannot redeclare out_select() (previously declared in /Users/fred/dev/addons/site/app/views/elements/search.thtml:178) in /Users/fred/dev/addons/site/app/views/elements/search.thtml on line 185

In addition, the CakePHP helper function $html->selectTag() is likely to already work as desired, so there's no need to reinvent the wheel.
Target Milestone: --- → 4.0.4
Assignee: nobody → fwenzel
Severity: normal → major
Wil, would you be so nice to review this?

Note: I had to wrap selectTag in a simpleSelectTag helper function because Cake's SelectTag insists on Yada/Yada notation for field names, which is undesired here.
Attachment #349652 - Flags: review?(clouserw)
Status: NEW → ASSIGNED
Attachment #349652 - Flags: review?(clouserw) → review+
Thank you: r20195.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: push-needed
Resolution: --- → FIXED
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.