Code Duplication    Length = 5-5 lines in 2 locations

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

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