Code Duplication    Length = 8-8 lines in 5 locations

class/Profile.php 5 locations

@@ 123-130 (lines=8) @@
120
                    $status = _SMALLWORLD_ISSINGLE;
121
                    $spouse = '';
122
                }
123
                if (3 == $relationship) {
124
                    $status = _SMALLWORLD_INRELATIONSHIP;
125
                    if ($spouseExists > 0) {
126
                        $spouse = "<a href='" . XOOPS_URL . '/modules/smallworld/userprofile.php?username=' . $r['partner'] . "' target='_self'>" . $r['partner'] . '</a>';
127
                    } else {
128
                        $spouse = $r['partner'];
129
                    }
130
                }
131
                if (0 == $relationship) {
132
                    $status = _SMALLWORLD_ISMARRIED;
133
                    if ($spouseExists > 0) {
@@ 131-138 (lines=8) @@
128
                        $spouse = $r['partner'];
129
                    }
130
                }
131
                if (0 == $relationship) {
132
                    $status = _SMALLWORLD_ISMARRIED;
133
                    if ($spouseExists > 0) {
134
                        $spouse = "<a href='" . XOOPS_URL . '/modules/smallworld/userprofile.php?username=' . $r['partner'] . "' target='_self'>" . $r['partner'] . '</a>';
135
                    } else {
136
                        $spouse = $r['partner'];
137
                    }
138
                }
139
                if (1 == $relationship) {
140
                    $status = _SMALLWORLD_ISENGAGED;
141
                    if ($spouseExists > 0) {
@@ 139-146 (lines=8) @@
136
                        $spouse = $r['partner'];
137
                    }
138
                }
139
                if (1 == $relationship) {
140
                    $status = _SMALLWORLD_ISENGAGED;
141
                    if ($spouseExists > 0) {
142
                        $spouse = "<a href='" . XOOPS_URL . '/modules/smallworld/userprofile.php?username=' . $r['partner'] . "' target='_self'>" . $r['partner'] . '</a>';
143
                    } else {
144
                        $spouse = $r['partner'];
145
                    }
146
                }
147
                if (5 == $relationship) {
148
                    $status = _SMALLWORLD_ISCOMPLICATED;
149
                    if ($spouseExists > 0) {
@@ 147-154 (lines=8) @@
144
                        $spouse = $r['partner'];
145
                    }
146
                }
147
                if (5 == $relationship) {
148
                    $status = _SMALLWORLD_ISCOMPLICATED;
149
                    if ($spouseExists > 0) {
150
                        $spouse = "<a href='" . XOOPS_URL . '/modules/smallworld/userprofile.php?username=' . $r['partner'] . "' target='_self'>" . $r['partner'] . '</a>';
151
                    } else {
152
                        $spouse = $r['partner'];
153
                    }
154
                }
155
                if (4 == $relationship) {
156
                    $status = _SMALLWORLD_OPENRELATIONSHIP;
157
                    if ($spouseExists > 0) {
@@ 155-162 (lines=8) @@
152
                        $spouse = $r['partner'];
153
                    }
154
                }
155
                if (4 == $relationship) {
156
                    $status = _SMALLWORLD_OPENRELATIONSHIP;
157
                    if ($spouseExists > 0) {
158
                        $spouse = "<a href='" . XOOPS_URL . '/modules/smallworld/userprofile.php?username=' . $r['partner'] . "' target='_self'>" . $r['partner'] . '</a>';
159
                    } else {
160
                        $spouse = $r['partner'];
161
                    }
162
                }
163
164
                //Personal info
165
                $aboutme  = $r['aboutme'];