Code Duplication    Length = 16-16 lines in 2 locations

code/control/LDAPDebugController.php 2 locations

@@ 59-74 (lines=16) @@
56
        return $list;
57
    }
58
59
    public function UsersSearchLocations()
60
    {
61
        $locations = Config::inst()->get('LDAPService', 'users_search_locations');
62
        $list = new ArrayList();
63
        if ($locations) {
64
            foreach ($locations as $location) {
65
                $list->push(new ArrayData(array(
66
                    'Value' => $location
67
                )));
68
            }
69
        } else {
70
            $list->push($this->Options()->find('Name', 'baseDn'));
71
        }
72
73
        return $list;
74
    }
75
76
    public function GroupsSearchLocations()
77
    {
@@ 76-91 (lines=16) @@
73
        return $list;
74
    }
75
76
    public function GroupsSearchLocations()
77
    {
78
        $locations = Config::inst()->get('LDAPService', 'groups_search_locations');
79
        $list = new ArrayList();
80
        if ($locations) {
81
            foreach ($locations as $location) {
82
                $list->push(new ArrayData(array(
83
                    'Value' => $location
84
                )));
85
            }
86
        } else {
87
            $list->push($this->Options()->find('Name', 'baseDn'));
88
        }
89
90
        return $list;
91
    }
92
93
    public function DefaultGroup()
94
    {