Code Duplication    Length = 5-5 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

@@ 4728-4732 (lines=5) @@
4725
            if ($tvsort != '') {
4726
                $tvsort = 'tv.' . implode(',tv.', array_filter(array_map('trim', explode(',', $tvsort))));
4727
            }
4728
            if ($tvidnames == "*") {
4729
                $query = "tv.id<>0";
4730
            } else {
4731
                $query = (is_numeric($tvidnames[0]) ? "tv.id" : "tv.name") . " IN ('" . implode("','",
4732
                        $tvidnames) . "')";
4733
            }
4734
4735
            $this->getUserDocGroups();
@@ 4918-4922 (lines=5) @@
4915
                    array_filter(array_map('trim', explode(',', $fields))));
4916
            $sort = ($sort == '') ? '' : 'tv.' . implode(',tv.', array_filter(array_map('trim', explode(',', $sort))));
4917
4918
            if ($idnames == '*') {
4919
                $query = 'tv.id<>0';
4920
            } else {
4921
                $query = (is_numeric($idnames[0]) ? 'tv.id' : 'tv.name') . " IN ('" . implode("','", $idnames) . "')";
4922
            }
4923
4924
            $rs = $this->db->select("{$fields}, IF(tvc.value != '', tvc.value, tv.default_text) as value",
4925
                $this->getFullTableName('site_tmplvars') . " tv