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;
|
||||
$trackId = (isset($_REQUEST["trackid"]) && is_numeric($_REQUEST["trackid"])) ? (int) $_REQUEST["trackid"] : NULL;
|
||||
|
||||
if ($userId) {
|
||||
$positionsArr = [];
|
||||
|
||||
if ($userId) {
|
||||
if (uConfig::$public_tracks ||
|
||||
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
||||
if ($trackId) {
|
||||
@ -42,6 +41,7 @@ if ($userId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header("Content-type: text/xml");
|
||||
$xml = new XMLWriter();
|
||||
@ -76,6 +76,5 @@ if ($userId) {
|
||||
$xml->endElement();
|
||||
$xml->endDocument();
|
||||
$xml->flush();
|
||||
}
|
||||
|
||||
?>
|
@ -24,13 +24,13 @@ $auth = new uAuth();
|
||||
|
||||
$userId = (isset($_REQUEST["userid"]) && is_numeric($_REQUEST["userid"])) ? (int) $_REQUEST["userid"] : NULL;
|
||||
|
||||
if ($userId) {
|
||||
$tracksArr = [];
|
||||
|
||||
if ($userId) {
|
||||
if (uConfig::$public_tracks ||
|
||||
($auth->isAuthenticated() && ($auth->isAdmin() || $auth->user->id === $userId))) {
|
||||
$tracksArr = uTrack::getAll($userId);
|
||||
}
|
||||
}
|
||||
|
||||
header("Content-type: text/xml");
|
||||
$xml = new XMLWriter();
|
||||
@ -51,6 +51,5 @@ if ($userId) {
|
||||
$xml->endElement();
|
||||
$xml->endDocument();
|
||||
$xml->flush();
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user