From 251dd15234dc54c9d66a2613bbe23a078b323e6c Mon Sep 17 00:00:00 2001 From: Fabian Schmid Date: Mon, 3 Nov 2014 14:17:45 +0100 Subject: [PATCH] Prepared Release --- README.md | 4 +--- classes/class.ilObjLiveVoting.php | 3 +++ pin.php | 3 ++- plugin.php | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b95c8b67..fd4d936b 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,7 @@ As ILIAS administrator go to "Administration->Plugins" and install/activate the - Config Rewrite Rule in .htaccess or Apache-Config: ```apacheconf - RewriteEngine on - RewriteRule ^vote$ Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/pin.php [L] - RewriteRule ^vote\?(.*)$ Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/pin.php?$1 [L] + RewriteRule ^vote([|/|/0-9]*)$ Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/pin.php?pin=$1 [L] ``` diff --git a/classes/class.ilObjLiveVoting.php b/classes/class.ilObjLiveVoting.php index 0bc4579d..b8e52961 100755 --- a/classes/class.ilObjLiveVoting.php +++ b/classes/class.ilObjLiveVoting.php @@ -480,6 +480,9 @@ public function addOption($title) { * @return ilObjLiveVoting|false */ public static function _getObjectByPin($pin) { + if (!ilLiveVotingPlugin::getInstance()->isActive()) { + return false; + } global $ilDB; $query = "SELECT id FROM rep_robj_xlvo_data WHERE pin = " . $ilDB->quote($pin, "text"); $set = $ilDB->query($query); diff --git a/pin.php b/pin.php index 39182ded..c88885f1 100644 --- a/pin.php +++ b/pin.php @@ -9,7 +9,8 @@ $_GET['pin'] = str_ireplace('/', '', $_GET['pin']); -if ($_POST['pin'] || $_GET['pin']) { + +if ($_POST['pin'] OR $_GET['pin']) { $pin = ((!$_POST['pin'] AND $_GET['pin']) ? $_GET['pin'] : $_POST['pin']); $link = ilObjLiveVotingGUI::getLinkByPin($pin); if ($link) { diff --git a/plugin.php b/plugin.php index 59f45ffe..c039077b 100644 --- a/plugin.php +++ b/plugin.php @@ -1,6 +1,6 @@