diff options
author | MaZderMind | 2014-10-19 12:12:20 +0200 |
---|---|---|
committer | MaZderMind | 2014-10-19 12:12:20 +0200 |
commit | f652ae2be38e74796ed63ba72e23fcb632818118 (patch) | |
tree | fac87e88a3928b789c0d9b7f4a9a2ac5b6cbb77e /lib/helper.php | |
parent | c2f7758004a9016910168ad47c1a4300e107f2c2 (diff) |
restructure room site to produce a unique room/player/formats page
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 4 |
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() |