summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/general.lib.php13
-rw-r--r--tv.php1
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index deb8e176..c975ed22 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -1019,5 +1019,18 @@ function get_plugins() {
} // get_plugins
+/**
+ * unhtmlentities
+ * This is required to make thing work.. but holycrap is it ugly
+ */
+function unhtmlentities ($string) {
+
+ $trans_tbl = get_html_translation_table (HTML_ENTITIES);
+ $trans_tbl = array_flip ($trans_tbl);
+ $ret = strtr ($string, $trans_tbl);
+ return preg_replace('/&#(\d+);/me', "chr('\\1')",$ret);
+
+} // unhtmlentities
+
?>
diff --git a/tv.php b/tv.php
index 90ab4ff7..e41fb0e3 100644
--- a/tv.php
+++ b/tv.php
@@ -75,6 +75,7 @@ switch ($action) {
$stream = new Stream($stream_type,array());
$stream->manual_url_add(unhtmlentities($tmp_playlist->get_vote_url()));
$stream->start();
+ if ($stream_type != 'localplay') { exit; }
break;
case 'update_playlist':
/* Only Admins Here */