Code Duplication    Length = 8-8 lines in 2 locations

ipnppd.php 2 locations

@@ 199-206 (lines=8) @@
196
            }
197
            $pp_varlist['payment_date'] = strftime('%Y-%m-%d %H:%M:%S', strtotime($pp_varlist['payment_date']));
198
            $field_values               = $field_names = '';
199
            for ($i = 0, $iMax = count($pp_varname); $i < $iMax; ++$i) {
200
                if (0 != $i) {
201
                    $field_names .= ',';
202
                    $field_values .= ',';
203
                }
204
                $field_names .= '`' . $pp_varname[$i] . '`';
205
                $field_values .= "'" . $pp_varlist[$pp_varname[$i]] . "'";
206
            }
207
            $insertSQL = 'INSERT INTO ' . $xoopsDB->prefix('donations_transactions') . " ($field_names) VALUES ($field_values)";
208
209
            // We're cleared to add this record
@@ 232-239 (lines=8) @@
229
230
            $pp_varlist['payment_date'] = strftime('%Y-%m-%d %H:%M:%S', strtotime($pp_varlist['payment_date']));
231
            $field_values               = $field_names = '';
232
            for ($i = 0, $iMax = count($pp_varname); $i < $iMax; ++$i) {
233
                if ($i != 0) {
234
                    $field_names .= ',';
235
                    $field_values .= ',';
236
                }
237
                $field_names .= '`' . $pp_varname[$i] . '`';
238
                $field_values .= "'" . $pp_varlist[$pp_varname[$i]] . "'";
239
            }
240
            $insertSQL = 'INSERT INTO ' . $xoopsDB->prefix('donations_transactions') . " ($field_names) VALUES ($field_values)";
241
242
            // We're cleared to add this record