Code Duplication    Length = 7-9 lines in 2 locations

htdocs/modules/comments/class/form/comment.php 1 location

@@ 144-152 (lines=9) @@
141
            if (is_array($extraParams = $plugin->extraParams())) {
142
                foreach ($extraParams as $extra_param) {
143
                    // This routine is included from forms accessed via both GET and POST
144
                    if (isset($_POST[$extra_param])) {
145
                        $hidden_value = $_POST[$extra_param];
146
                    } else {
147
                        if (isset($_GET[$extra_param])) {
148
                            $hidden_value = $_GET[$extra_param];
149
                        } else {
150
                            $hidden_value = '';
151
                        }
152
                    }
153
                    $this->addElement(new Xoops\Form\Hidden($extra_param, $hidden_value));
154
                }
155
            }

htdocs/modules/comments/class/helper.php 1 location

@@ 728-734 (lines=7) @@
725
                    $link_extra = '';
726
                    if (is_array($extraParams = $plugin->extraParams())) {
727
                        foreach ($extraParams as $extra_param) {
728
                            if (isset($_POST[$extra_param])) {
729
                                $extra_param_val = $_POST[$extra_param];
730
                            } else {
731
                                if (isset($_GET[$extra_param])) {
732
                                    $extra_param_val = $_GET[$extra_param];
733
                                }
734
                            }
735
                            if (isset($extra_param_val)) {
736
                                $link_extra .= '&' . $extra_param . '=' . $extra_param_val;
737
                                $hidden_value = htmlspecialchars($extra_param_val, ENT_QUOTES);