Code Duplication    Length = 7-7 lines in 2 locations

class/APCal_xoops.php 2 locations

@@ 219-225 (lines=7) @@
216
            // ʸ�������
217
            if (!empty($keywords)) {
218
                switch (strtolower($andor)) {
219
                    case 'and':
220
                        $whr_text = '';
221
                        foreach ($keywords as $keyword) {
222
                            $whr_text .= "CONCAT(summary,' ',description) LIKE '%$keyword%' AND ";
223
                        }
224
                        $whr_text = substr($whr_text, 0, -5);
225
                        break;
226
                    case 'or':
227
                        $whr_text = '';
228
                        foreach ($keywords as $keyword) {
@@ 226-232 (lines=7) @@
223
                        }
224
                        $whr_text = substr($whr_text, 0, -5);
225
                        break;
226
                    case 'or':
227
                        $whr_text = '';
228
                        foreach ($keywords as $keyword) {
229
                            $whr_text .= "CONCAT(summary,' ',description) LIKE '%$keyword%' OR ";
230
                        }
231
                        $whr_text = substr($whr_text, 0, -4);
232
                        break;
233
                    default:
234
                        $whr_text = "CONCAT(summary,'  ',description) LIKE '%{$keywords[0]}%'";
235
                        break;