Code Duplication    Length = 14-14 lines in 2 locations

htdocs/util/notification/run_notify.php 1 location

@@ 254-267 (lines=14) @@
251
    return false;
252
}
253
254
function getToMailDomain($mail)
255
{
256
    if ($mail == '') {
257
        return '';
258
    }
259
260
    if (strrpos($mail, '@') === false) {
261
        $domain = 'localhost';
262
    } else {
263
        $domain = substr($mail, strrpos($mail, '@') + 1);
264
    }
265
266
    return $domain;
267
}
268

htdocs/util/watchlist/runwatch.php 1 location

@@ 571-584 (lines=14) @@
568
}
569
570
571
function getToMailDomain($mail)
572
{
573
    if ($mail == '') {
574
        return '';
575
    }
576
577
    if (strrpos($mail, '@') === false) {
578
        $domain = 'localhost';
579
    } else {
580
        $domain = substr($mail, strrpos($mail, '@') + 1);
581
    }
582
583
    return $domain;
584
}
585
586
587
//