Code Duplication    Length = 8-8 lines in 2 locations

ipnppd.php 2 locations

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