Skip to content
Snippets Groups Projects
Commit 8312a50c authored by Nate Lampton's avatar Nate Lampton
Browse files

Clarifying implementation of hook_forms() using new arguments.

parent 85042bbc
No related branches found
Tags 6.x-1.11-beta3
No related merge requests found
......@@ -793,11 +793,10 @@ function fivestar_widget_form($node) {
* forms appear on the same page, each requiring a separate form_id, but all
* using the same underlying callbacks.
*/
function fivestar_forms() {
$args = func_get_args();
if (strpos($args[0], 'fivestar_form') !== FALSE) {
if ($args[0] == 'fivestar_form_'. $args[1][0] .'_'. $args[1][1]) {
$forms[$args[0]] = array('callback' => 'fivestar_form');
function fivestar_forms($form_id, $args) {
if (strpos($form_id, 'fivestar_form') !== FALSE) {
if ($form_id == 'fivestar_form_'. $args[0] .'_'. $args[1]) {
$forms[$form_id] = array('callback' => 'fivestar_form');
return $forms;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment