Code Duplication    Length = 4-4 lines in 2 locations

htdocs/restorecaches.php 2 locations

@@ 340-343 (lines=4) @@
337
        $coord = new coordinate($r['latitude'], $r['longitude']);
338
        $coord = $coord->getDecimalMinutes();
339
        $coord = $coord['lat'] . " " . $coord['lon'];
340
        if (isset($lastcoord[$r['cache_id']]) && $coord != $lastcoord[$r['cache_id']]) {
341
            // the database contains lots of old coord records with unchanged coords, wtf?
342
            append_data($data, $admins, $wp_oc, $r, "coord", $lastcoord[$r['cache_id']], $coord);
343
        }
344
        $lastcoord[$r['cache_id']] = $coord;
345
    }
346
    sql_free_result($rs);
@@ 361-364 (lines=4) @@
358
    // order is relevant, because multiple changes per day possible
359
    $lastcountry = array();
360
    while ($r = sql_fetch_assoc($rs)) {
361
        if (isset($lastcountry[$r['cache_id']]) && $r['country'] != $lastcountry[$r['cache_id']]) {
362
            // the database contains some old country records with unchanged coords, wtf?
363
            append_data($data, $admins, $wp_oc, $r, "country", $lastcountry[$r['cache_id']], $r['country']);
364
        }
365
        $lastcountry[$r['cache_id']] = $r['country'];
366
    }
367
    sql_free_result($rs);