Code Duplication    Length = 5-5 lines in 2 locations

archive.php 2 locations

@@ 142-146 (lines=5) @@
139
            if (empty($lastyear)) {
140
                $lastyear = $this_year;
141
            }
142
            if ($lastmonth == 0) {
143
                $lastmonth                    = $this_month;
144
                $months[$lastmonth]['string'] = $months_arr[$lastmonth];
145
                $months[$lastmonth]['number'] = $lastmonth;
146
            }
147
            if ($lastyear != $this_year) {
148
                $years[$i]['number'] = $lastyear;
149
                $years[$i]['months'] = $months;
@@ 155-159 (lines=5) @@
152
                $lastyear            = $this_year;
153
                ++$i;
154
            }
155
            if ($lastmonth != $this_month) {
156
                $lastmonth                    = $this_month;
157
                $months[$lastmonth]['string'] = $months_arr[$lastmonth];
158
                $months[$lastmonth]['number'] = $lastmonth;
159
            }
160
        }
161
    }
162
    $years[$i]['number'] = $this_year;