Code Duplication    Length = 5-5 lines in 2 locations

comment_ajax.php 1 location

@@ 115-119 (lines=5) @@
112
                $owner = smallworld_getOwnerFromComment($data['msg_id_fk']);
113
                // Get owner of posts settings in order to send mail or not!
114
                $owner_privset = json_decode($swDB->getSettings($v), true);
115
                if (0 !== $helper->getConfig('smallworldusemailnotis')) {
116
                    if (1 == $owner_privset['notify']) {
117
                        $mail->sendMails($data['uid_fk'], $v, 'commentToWM', null, $wc);
118
                    }
119
                }
120
            }
121
        }
122
    }

friendinvite.php 1 location

@@ 59-63 (lines=5) @@
56
        $friendshipExists = $check->friendcheck($myUid, $friend);
57
        if (0 == $friendshipExists[0]) {
58
            $resultMsg = _SMALLWORLD_JSON_ADDFRIEND . $friendName . _SMALLWORLD_JSON_REQUEST_PENDING;
59
            if (0 != $helper->getConfig('smallworldusemailnotis')) {
60
                if (1 == $USC['notify']) {
61
                    $mail->sendMails($friend, $friend, 'friendshipfollow', $link = null, []);
62
                }
63
            }
64
            $swDB->toogleFriendInvite($friendshipExists, $friend, $myUid);
65
            echo json_encode(['error' => 'no', 'msg' => $resultMsg, 'msgChange' => _SMALLWORLD_JSON_CANCELFR_TEXT]);
66
        }