aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaZderMind2014-10-19 12:12:20 +0200
committerMaZderMind2014-10-19 12:12:20 +0200
commitf652ae2be38e74796ed63ba72e23fcb632818118 (patch)
treefac87e88a3928b789c0d9b7f4a9a2ac5b6cbb77e /lib
parentc2f7758004a9016910168ad47c1a4300e107f2c2 (diff)
restructure room site to produce a unique room/player/formats page
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 5ae027b..6139a18 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -12,7 +12,9 @@ function link_room($room)
function link_player($room, $format, $translated = false)
{
- return rawurlencode($room).'/'.rawurlencode($format).'/'.($translated ? 'translated/' : '');
+ $isDefaultFormat = in_array($format, array('hq', 'video'));
+
+ return rawurlencode($room).'/'.($isDefaultFormat ? '' : rawurlencode($format).'/').($translated ? 'translated/' : '');
}
function baseurl()