summaryrefslogtreecommitdiffstats
path: root/lib/class/democratic.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-26 20:48:39 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-26 20:48:39 +0000
commita55a80fd30a6b45845fde643cd3f102c71efd071 (patch)
tree6702031acc6f4db076117c3e7de0844a8b1b104c /lib/class/democratic.class.php
parent80e9ee6e85c68c7d6e258c9f1409c1e1ef4f8eae (diff)
downloadampache-a55a80fd30a6b45845fde643cd3f102c71efd071.tar.gz
ampache-a55a80fd30a6b45845fde643cd3f102c71efd071.tar.bz2
ampache-a55a80fd30a6b45845fde643cd3f102c71efd071.zip
sync changes to trunk
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r--lib/class/democratic.class.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php
index b8835766..ca068aa5 100644
--- a/lib/class/democratic.class.php
+++ b/lib/class/democratic.class.php
@@ -236,7 +236,12 @@ class Democratic extends tmpPlaylist {
*/
public function get_url() {
- $link = Config::get('web_path') . '/play/index.php?demo_id=' . scrub_out($this->id) .
+ if (Config::get('force_http_play') OR !empty($force_http)) {
+ $port = Config::get('http_port') ? ':' . Config::get('http_port') : '';
+ $web_path = str_replace("https://" . $_SERVER['HTTP_HOST'], "http://" . $_SERVER['SERVER_NAME'] . $port,$web_path);
+ }
+
+ $link = $web_path . '/play/index.php?demo_id=' . scrub_out($this->id) .
'&sid=' . Stream::get_session() . '&uid=' . scrub_out($GLOBALS['user']->id);
return $link;