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/RoomTab.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'model/RoomTab.php') diff --git a/model/RoomTab.php b/model/RoomTab.php index 16a8359..c7b564f 100644 --- a/model/RoomTab.php +++ b/model/RoomTab.php @@ -20,11 +20,13 @@ class RoomTab public function getLink() { + $path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()]; + $tabs = $this->getRoom()->getTabNames(); - if($tabs[0] == $this->getTab()) - return rawurlencode($this->getRoom()->getSlug()).'/'.url_params(); + if($tabs[0] != $this->getTab()) + $path[] = $this->getTab(); - return rawurlencode($this->getRoom()->getSlug()).'/'.rawurlencode($this->getTab()).'/'.url_params(); + return joinpath($path).url_params(); } public function getDisplay() -- cgit v1.2.3