Download & Extend

Why is there an eval in skinr_form_alter?

Project:Skinr
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

<?php
     
// Only add submit handler once.
     
eval('$element =& $form'. $form_settings['submit_handler_attach_to'] .';');
?>

Huh?

Comments

#1

Status:active» patch (to be ported)

Hrm... we'd actually fixed this in D6-2.x, but I guess we need to back-port it.

Here's the commit that includes the replacement for this: http://drupalcode.org/project/skinr.git/commitdiff/518b7d19561107d59e274...

#2

Status:patch (to be ported)» needs review
AttachmentSizeStatusTest resultOperations
skinr_no_eval_1236200.patch1.74 KBTest request sentNoneView details

#3

Status:needs review» needs work

This patch isn't quite complete. It should include the parts from the commit in #1 that are:

modules/views.skinr.inc

-    'submit_handler_attach_to' => "['buttons']['submit']['#submit']",
+    'submit_handler_attach_to' => array('buttons', 'submit', '#submit'),

and skinr.module

-        'submit_handler_attach_to' => "['#submit']",
+        'submit_handler_attach_to' => array('#submit'),
nobody click here