Code Duplication    Length = 3-13 lines in 2 locations

htdocs/util/watchlist/runwatch.php 2 locations

@@ 245-247 (lines=3) @@
242
    // Zeitpunkt der nästen Mail berechnen
243
    if ($rUser['watchmail_mode'] == 0) {
244
        $nextmail = date($sDateformat);
245
    } elseif ($rUser['watchmail_mode'] == 1) {
246
        $nextmail = date($sDateformat, mktime($rUser['watchmail_hour'], 0, 0, date('n'), date('j') + 1, date('Y')));
247
    } elseif ($rUser['watchmail_mode'] == 2) {
248
        $weekday = date('w');
249
        if ($weekday == 0) {
250
            $weekday = 7;
@@ 267-279 (lines=13) @@
264
                    date('Y')
265
                )
266
            );
267
        } else {
268
            $nextmail = date(
269
                $sDateformat,
270
                mktime(
271
                    $rUser['watchmail_hour'],
272
                    0,
273
                    0,
274
                    date('n'),
275
                    date('j') + 6 - $rUser['watchmail_day'],
276
                    date('Y')
277
                )
278
            );
279
        }
280
    }
281
282
    sql("UPDATE user SET watchmail_nextmail='&1' WHERE user_id='&2'", $nextmail, $rUser['user_id']);