Always return empty array
This commit is contained in:
parent
aabe323cb2
commit
396566e0fe
@ -26,9 +26,8 @@ $auth = new uAuth();
|
|||||||
$userId = (isset($_REQUEST["userid"]) && is_numeric($_REQUEST["userid"])) ? (int) $_REQUEST["userid"] : NULL;
|
$userId = (isset($_REQUEST["userid"]) && is_numeric($_REQUEST["userid"])) ? (int) $_REQUEST["userid"] : NULL;
|
||||||
$trackId = (isset($_REQUEST["trackid"]) && is_numeric($_REQUEST["trackid"])) ? (int) $_REQUEST["trackid"] : NULL;
|
$trackId = (isset($_REQUEST["trackid"]) && is_numeric($_REQUEST["trackid"])) ? (int) $_REQUEST["trackid"] : NULL;
|
||||||
|
|
||||||
if ($userId) {
|
|
||||||
$positionsArr = [];
|
$positionsArr = [];
|
||||||
|
if ($userId) {
|
||||||
if (uConfig::$public_tracks ||
|
if (uConfig::$public_tracks ||
|
||||||
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
||||||
if ($trackId) {
|
if ($trackId) {
|
||||||
@ -42,6 +41,7 @@ if ($userId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
$xml = new XMLWriter();
|
$xml = new XMLWriter();
|
||||||
@ -76,6 +76,5 @@ if ($userId) {
|
|||||||
$xml->endElement();
|
$xml->endElement();
|
||||||
$xml->endDocument();
|
$xml->endDocument();
|
||||||
$xml->flush();
|
$xml->flush();
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -24,13 +24,13 @@ $auth = new uAuth();
|
|||||||
|
|
||||||
$userId = (isset($_REQUEST["userid"]) && is_numeric($_REQUEST["userid"])) ? (int) $_REQUEST["userid"] : NULL;
|
$userId = (isset($_REQUEST["userid"]) && is_numeric($_REQUEST["userid"])) ? (int) $_REQUEST["userid"] : NULL;
|
||||||
|
|
||||||
if ($userId) {
|
|
||||||
$tracksArr = [];
|
$tracksArr = [];
|
||||||
|
if ($userId) {
|
||||||
if (uConfig::$public_tracks ||
|
if (uConfig::$public_tracks ||
|
||||||
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
||||||
$tracksArr = uTrack::getAll($userId);
|
$tracksArr = uTrack::getAll($userId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
$xml = new XMLWriter();
|
$xml = new XMLWriter();
|
||||||
@ -51,6 +51,5 @@ if ($userId) {
|
|||||||
$xml->endElement();
|
$xml->endElement();
|
||||||
$xml->endDocument();
|
$xml->endDocument();
|
||||||
$xml->flush();
|
$xml->flush();
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user