Code Duplication    Length = 10-10 lines in 2 locations

htdocs/editlog.php 1 location

@@ 123-132 (lines=10) @@
120
    $confirmListingOk = isset($_POST['confirm_listing_ok']) ? $_POST['confirm_listing_ok'] + 0 : 0;
121
122
    // validate NM and LO flags
123
    if (!in_array($log_type, $logtype_allows_nm) || $cache->getType() == 6) {
124
        $needsMaintenance = $listingOutdated = 0;
125
    } else {
126
        if ($needsMaintenance != 1 && $needsMaintenance != 2) {
127
            $needsMaintenance = 0;
128
        }
129
        if ($listingOutdated != 1 && $listingOutdated != 2) {
130
            $listingOutdated = 0;
131
        }
132
    }
133
} else {
134
    $oc_team_comment = ($log_record['oc_team_comment'] == 1);
135
    $needsMaintenance = $log_record['needs_maintenance'];

htdocs/log.php 1 location

@@ 157-166 (lines=10) @@
154
        }
155
    }
156
157
    if (!in_array($logType, $logtype_allows_nm) || $cache->getType() == 6) {
158
        $needsMaintenance = $listingOutdated = 0;
159
    } else {
160
        if ($needsMaintenance != 1 && $needsMaintenance != 2) {
161
            $needsMaintenance = 0;
162
        }
163
        if ($listingOutdated != 1 && $listingOutdated != 2) {
164
            $listingOutdated = 0;
165
        }
166
    }
167
168
    // if not a found log, ignore the rating
169
    $rateOption = ($logType == 1 || $logType == 7) + 0;