summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-31 12:06:09 +0100
committerSebastian Wagner2011-10-31 12:06:09 +0100
commit4fcef8ec68a76ac5a1290ad1fdd9fefeb03854b5 (patch)
tree3ac54c2e7587f97d111890d598b5fade29674eec
parenttest (diff)
downloadpoolctrl-4fcef8ec68a76ac5a1290ad1fdd9fefeb03854b5.tar.gz
poolctrl-4fcef8ec68a76ac5a1290ad1fdd9fefeb03854b5.tar.xz
poolctrl-4fcef8ec68a76ac5a1290ad1fdd9fefeb03854b5.zip
test
-rwxr-xr-xapplication/views/scripts/event/index.phtml9
-rwxr-xr-xlibrary/Poolctrl/Acl.php8
2 files changed, 6 insertions, 11 deletions
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index f5175bd..4061092 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -284,18 +284,13 @@ function eventSelected(event) {
}
});
});
- $.get("/event/checkright/rightShortcut/ec", function(rightData){
+ $.get("/event/checkright/rightShortcut/ec", function(right){
$.get("/event/checkoverlapselect/poolID/" + $("#poolselectbox option:selected").val() + "/startDate/" + startDate + "/endDate/" + endDate, function(data){
// get conflicts-HTML Element
var cell = document.getElementById("conflicts");
// get conflicts
- var returndata = jQuery.parseJSON(data);
- var right;
- if(rightData = 'true'){
- right = true;
- } else right = false;
-
+ var returndata = jQuery.parseJSON(data);
if($("#poolselectbox option:selected").val() == 'defaultPool' || $("#poolselectbox option:selected").val() == 'noPool') {
diff --git a/library/Poolctrl/Acl.php b/library/Poolctrl/Acl.php
index 5b4609c..6cd7a87 100755
--- a/library/Poolctrl/Acl.php
+++ b/library/Poolctrl/Acl.php
@@ -24,7 +24,7 @@ class Poolctrl_Acl
public function checkRight($rightShortcut) {
if(!isset($this->host) || !isset($this->path) || !isset($this->referer)) {
- return false;
+ return 0;
}
$dataToSend = "rightshortcut=" . $rightShortcut;
@@ -56,12 +56,12 @@ class Poolctrl_Acl
$success = $checkRightXML->checkright->success;
if($success == "true") {
- return true;
+ return 1;
} else {
- return false;
+ return 0;
}
} else {
- return false;
+ return 0;
}
}