summaryrefslogtreecommitdiffstats
path: root/apps/media
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-09-09 20:51:53 +0200
committerBart Visscher <bartv@thisnet.nl>2011-09-09 22:19:15 +0200
commit760b47a62fe3a8bcf1f58da74ffdaefe33793f7e (patch)
tree587bacf51807c5a58d7c335cfb7c2644e2bd3615 /apps/media
parent80f5942868d42bd6939c9242eca7213a3dc8c79d (diff)
downloadnextcloud-server-760b47a62fe3a8bcf1f58da74ffdaefe33793f7e.tar.gz
nextcloud-server-760b47a62fe3a8bcf1f58da74ffdaefe33793f7e.zip
Use OC_Helper::linkTo also for absolute urls.
One central place to check for https.
Diffstat (limited to 'apps/media')
-rw-r--r--apps/media/lib_ampache.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php
index a0123f87c51..b3bd7b16189 100644
--- a/apps/media/lib_ampache.php
+++ b/apps/media/lib_ampache.php
@@ -166,11 +166,6 @@ class OC_MEDIA_AMPACHE{
}
$artistName=utf8_decode(htmlentities($artistName));
$albumName=utf8_decode(htmlentities($albumName));
- if (isset($_SERVER['HTTPS'])) {
- $PROTO="https://";
- } else {
- $PROTO="http://";
- }
$id=$song['song_id'];
$name=utf8_decode(htmlentities($song['song_name']));
$artist=$song['song_artist'];
@@ -179,7 +174,7 @@ class OC_MEDIA_AMPACHE{
echo("\t\t<title>$name</title>\n");
echo("\t\t<artist id='$artist'>$artistName</artist>\n");
echo("\t\t<album id='$album'>$albumName</album>\n");
- $url="$PROTO{$_SERVER["HTTP_HOST"]}$WEBROOT/apps/media/server/xml.server.php?action=play&song=$id&auth={$_GET['auth']}";
+ $url=OC_Helper::linkTo('media', 'server/xml.server.php', null, true)."?action=play&song=$id&auth={$_GET['auth']}";
$url=htmlentities($url);
echo("\t\t<url>$url</url>\n");
echo("\t\t<time>{$song['song_length']}</time>\n");