From f6c0270d40f6730fe1e1820f2866b08792df1db6 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sat, 10 Dec 2016 18:22:34 +0100 Subject: rewrite data-model so that every configuration option is accessed through the conference --- model/RoomSelection.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'model/RoomSelection.php') diff --git a/model/RoomSelection.php b/model/RoomSelection.php index 9f0b16d..9211c31 100644 --- a/model/RoomSelection.php +++ b/model/RoomSelection.php @@ -20,16 +20,18 @@ class RoomSelection public function getLink() { + $path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()]; + $selection = $this->getRoom()->getSelectionNames(); - if($selection[0] == $this->getSelection()) - return rawurlencode($this->getRoom()->getSlug()).'/'; + if($selection[0] != $this->getSelection()) + $path[] = $this->getSelection(); - return rawurlencode($this->getRoom()->getSlug()).'/'.rawurlencode($this->getSelection()).'/'; + return joinpath($path).url_params(); } public function getTranslatedLink() { - return $this->getLink().'translated/'; + return joinpath([$this->getLink(), 'translated']); } public function getDisplay() -- cgit v1.2.3