Fix calendar permission checking
authorAndreas Boehler <andreas@aboehler.at>
Tue, 21 Feb 2017 20:03:36 +0100
changeset 95 fd138544eedf
parent 94 1a9054570d5a
child 96 4a71e837f15f
Fix calendar permission checking
helper.php
--- a/helper.php	Tue Feb 21 19:01:39 2017 +0100
+++ b/helper.php	Tue Feb 21 20:03:36 2017 +0100
@@ -94,12 +94,12 @@
    */
   public function checkCalendarPermission($id)
   {
-      if(strpos($page, 'webdav://') === 0)
+      if(strpos($id, 'webdav://') === 0)
       {
           $wdc =& plugin_load('helper', 'webdavclient');
           if(is_null($wdc))
             return AUTH_NONE;
-          $connectionId = str_replace('webdav://', '', $page);
+          $connectionId = str_replace('webdav://', '', $id);
           $settings = $wdc->getConnection($connectionId);
           if($settings === false)
             return AUTH_NONE;