diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index eb01b3f..f2299cb 100755
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -23,7 +23,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -80,7 +80,7 @@
1601618466935
-
+
1601618764031
@@ -348,7 +348,14 @@
1601922746760
-
+
+ 1601925651165
+
+
+
+ 1601925651165
+
+
@@ -367,7 +374,6 @@
-
@@ -392,7 +398,8 @@
-
+
+
@@ -431,10 +438,10 @@
-
+
-
+
diff --git a/controller/DefaultController.class.inc.php b/controller/DefaultController.class.inc.php
index 9671f37..b7fca7b 100755
--- a/controller/DefaultController.class.inc.php
+++ b/controller/DefaultController.class.inc.php
@@ -58,6 +58,7 @@ class DefaultController
$view->set_placeholder( 'wasted_time', WASTED_TIME );
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'POST' ) );
$secret = $Request->getVar( 'secret', null, 'GET' );
+
if( empty( $room_code ) )
{
$room_code = mb_strtoupper( $Request->getVar( 'code', null, 'GET' ) );
@@ -76,7 +77,10 @@ class DefaultController
return $view->getHtml();
}
- $DefaultModel->setSecret( $room_id, $secret );
+ if( !empty( $secret ) )
+ {
+ $DefaultModel->setSecret( $room_id, $secret );
+ }
if( !$DefaultModel->joinRoom( $room_id ) )
{
@@ -85,8 +89,6 @@ class DefaultController
}
-
-
return $view->getHtml();
}
diff --git a/model/DefaultModel.class.inc.php b/model/DefaultModel.class.inc.php
index 3e6493b..96d43cd 100755
--- a/model/DefaultModel.class.inc.php
+++ b/model/DefaultModel.class.inc.php
@@ -56,7 +56,7 @@ class DefaultModel
return $randomString;
}
- public function setSecret( int $room_id, string $secret)
+ public function setSecret( $room_id, string $secret)
{
setcookie( 'owner_room_' . $room_id, $secret, time()+60*60*24*365 );
}
diff --git a/vendor/js/faq.js b/vendor/js/faq.js
index d3b6b9a..3af470c 100644
--- a/vendor/js/faq.js
+++ b/vendor/js/faq.js
@@ -273,7 +273,7 @@ function welcomeMessage()
request( 'getWelcomeInfo', {}, function( result ) {
if ( result.data.is_owner === true )
{
- welcomeModalText.html( 'You are the owner of this room. That means you are allowed to ask and answer questions! To share your room code use the share-url or the room-code.' );
+ welcomeModalText.html( 'You are an admin of this room. That means you are allowed to ask and answer questions! To share your room code use the share-url or the room-code.' );
is_owner = true;
}
else