diff --git a/web/includes/Server.php b/web/includes/Server.php index 79dbb7ddb..d254227ca 100644 --- a/web/includes/Server.php +++ b/web/includes/Server.php @@ -1,6 +1,7 @@ {'Hostname'} = ''; } } + public static function find_all() { + $servers = array(); + $result = dbQuery( 'SELECT * FROM Servers ORDER BY Name'); + $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Server' ); + foreach ( $results as $row => $server_obj ) { + $servers[] = $server_obj; + } + return $servers; + } public function Url() { return ZM_BASE_PROTOCOL . '://'. $this->Hostname();