1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00
XML API version is now assumed to be the latest available if not
specified as a parameter. Also fix the issue that an empty XML document
was issued when the version was not specified.

Closes issue #1247.
This commit is contained in:
Phyks (Lucas Verney) 2016-06-14 18:06:59 +02:00
parent 0842e288df
commit 17ae862596

View file

@ -135,7 +135,13 @@ class Api
}
$username = trim($input['user']);
$ip = $_SERVER['REMOTE_ADDR'];
if (isset($input['version'])) {
// If version is provided, use it
$version = $input['version'];
} else {
// Else, just use the latest version available
$version = self::$version;
}
// Log the attempt
debug_event('API', "Handshake Attempt, IP:$ip User:$username Version:$version", 5);