{"action":"created","comment":{"url":"https://api.github.com/repos/orsee/orsee/pulls/comments/90351051","pull_request_review_id":10871453,"id":90351051,"diff_hunk":"@@ -22,73 +30,86 @@\n         if (check_allow('login') && $expadmindata['disabled']!='y'\n             && (check_allow('calendar_export_my') || check_allow('calendar_export_all'))\n         ) {\n-            if ($all==true && !check_allow('calendar_export_all')) $all=false;\n-        } else { $continue=false; $message=\"no rights to export\"; }\n-    } else { $continue=false; $message=\"invalid token\"; }\n+            if ($all==true && !check_allow('calendar_export_all')) {\n+                $all=false;\n+            }\n+        } else { \n+            $continue=false; \n+            $message=\"no rights to export\"; \n+        }\n+    } else { \n+        $continue=false; \n+        $message=\"invalid token\"; \n+    }\n }\n \n+\n if ($continue) {\n+    $labs=laboratories__get_laboratories();\n+    $laboratory_id=false;\n+    if(isset($_REQUEST['lab_id']) && $_REQUEST['lab_id']) {\n+        if(isset($labs[$_REQUEST['lab_id']])) {\n+            $laboratory_id=$_REQUEST['lab_id'];\n+        }\n+    }\n \n-$displayfrom_lower = time()-60*60*24*31*$settings['calendar_export_months_back'];\n-$displayfrom_upper = time()+60*60*24*31*$settings['calendar_export_months_ahead'];\n+    $displayfrom_lower = time()-60*60*24*31*$settings['calendar_export_months_back'];\n+    $displayfrom_upper = time()+60*60*24*31*$settings['calendar_export_months_ahead'];\n \n-if ($all) $expadminid=false; else $expadminid=$expadmindata['admin_id'];\n-$results = calendar__get_events(true, $displayfrom_lower, $displayfrom_upper,$expadminid);\n+    if ($all) $expadminid=false; else $expadminid=$expadmindata['admin_id'];","path":"admin/calendar_ics.php","position":64,"original_position":64,"commit_id":"cfaaf3067ed1b01079f1b8e082acd8a298eab3d4","original_commit_id":"cfaaf3067ed1b01079f1b8e082acd8a298eab3d4","user":{"login":"bgreiner","id":13988920,"avatar_url":"https://avatars.githubusercontent.com/u/13988920?v=3","gravatar_id":"","url":"https://api.github.com/users/bgreiner","html_url":"https://github.com/bgreiner","followers_url":"https://api.github.com/users/bgreiner/followers","following_url":"https://api.github.com/users/bgreiner/following{/other_user}","gists_url":"https://api.github.com/users/bgreiner/gists{/gist_id}","starred_url":"https://api.github.com/users/bgreiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgreiner/subscriptions","organizations_url":"https://api.github.com/users/bgreiner/orgs","repos_url":"https://api.github.com/users/bgreiner/repos","events_url":"https://api.github.com/users/bgreiner/events{/privacy}","received_events_url":"https://api.github.com/users/bgreiner/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-11-30T23:15:05Z","updated_at":"2016-11-30T23:15:05Z","html_url":"https://github.com/orsee/orsee/pull/16#discussion_r90351051","pull_request_url":"https://api.github.com/repos/orsee/orsee/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/orsee/orsee/pulls/comments/90351051"},"html":{"href":"https://github.com/orsee/orsee/pull/16#discussion_r90351051"},"pull_request":{"href":"https://api.github.com/repos/orsee/orsee/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/orsee/orsee/pulls/16","id":95404632,"html_url":"https://github.com/orsee/orsee/pull/16","diff_url":"https://github.com/orsee/orsee/pull/16.diff","patch_url":"https://github.com/orsee/orsee/pull/16.patch","issue_url":"https://api.github.com/repos/orsee/orsee/issues/16","number":16,"state":"open","locked":false,"title":"Feature: Calendar and import can be restricted to specific laboratory","user":{"login":"bgreiner","id":13988920,"avatar_url":"https://avatars.githubusercontent.com/u/13988920?v=3","gravatar_id":"","url":"https://api.github.com/users/bgreiner","html_url":"https://github.com/bgreiner","followers_url":"https://api.github.com/users/bgreiner/followers","following_url":"https://api.github.com/users/bgreiner/following{/other_user}","gists_url":"https://api.github.com/users/bgreiner/gists{/gist_id}","starred_url":"https://api.github.com/users/bgreiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgreiner/subscriptions","organizations_url":"https://api.github.com/users/bgreiner/orgs","repos_url":"https://api.github.com/users/bgreiner/repos","events_url":"https://api.github.com/users/bgreiner/events{/privacy}","received_events_url":"https://api.github.com/users/bgreiner/received_events","type":"User","site_admin":false},"body":"Allows experimenters/administrators to view the experiment calendar separately for each lab. If there is only one laboratory, nothing changes. If there are two or more laboratories configured in the ORSEE installation, then the calendar page which display links which allow to view the calendar for a specific lab only.","created_at":"2016-11-27T14:36:36Z","updated_at":"2016-11-30T23:15:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54f1e362e22a77edf9d4a50f8c2a9d20e5a21ee4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/orsee/orsee/pulls/16/commits","review_comments_url":"https://api.github.com/repos/orsee/orsee/pulls/16/comments","review_comment_url":"https://api.github.com/repos/orsee/orsee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orsee/orsee/issues/16/comments","statuses_url":"https://api.github.com/repos/orsee/orsee/statuses/cfaaf3067ed1b01079f1b8e082acd8a298eab3d4","head":{"label":"bgreiner:feature_calbylab","ref":"feature_calbylab","sha":"cfaaf3067ed1b01079f1b8e082acd8a298eab3d4","user":{"login":"bgreiner","id":13988920,"avatar_url":"https://avatars.githubusercontent.com/u/13988920?v=3","gravatar_id":"","url":"https://api.github.com/users/bgreiner","html_url":"https://github.com/bgreiner","followers_url":"https://api.github.com/users/bgreiner/followers","following_url":"https://api.github.com/users/bgreiner/following{/other_user}","gists_url":"https://api.github.com/users/bgreiner/gists{/gist_id}","starred_url":"https://api.github.com/users/bgreiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgreiner/subscriptions","organizations_url":"https://api.github.com/users/bgreiner/orgs","repos_url":"https://api.github.com/users/bgreiner/repos","events_url":"https://api.github.com/users/bgreiner/events{/privacy}","received_events_url":"https://api.github.com/users/bgreiner/received_events","type":"User","site_admin":false},"repo":{"id":41573834,"name":"orsee","full_name":"bgreiner/orsee","owner":{"login":"bgreiner","id":13988920,"avatar_url":"https://avatars.githubusercontent.com/u/13988920?v=3","gravatar_id":"","url":"https://api.github.com/users/bgreiner","html_url":"https://github.com/bgreiner","followers_url":"https://api.github.com/users/bgreiner/followers","following_url":"https://api.github.com/users/bgreiner/following{/other_user}","gists_url":"https://api.github.com/users/bgreiner/gists{/gist_id}","starred_url":"https://api.github.com/users/bgreiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgreiner/subscriptions","organizations_url":"https://api.github.com/users/bgreiner/orgs","repos_url":"https://api.github.com/users/bgreiner/repos","events_url":"https://api.github.com/users/bgreiner/events{/privacy}","received_events_url":"https://api.github.com/users/bgreiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bgreiner/orsee","description":"Online Recruitment System for Economic Experiments","fork":true,"url":"https://api.github.com/repos/bgreiner/orsee","forks_url":"https://api.github.com/repos/bgreiner/orsee/forks","keys_url":"https://api.github.com/repos/bgreiner/orsee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bgreiner/orsee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bgreiner/orsee/teams","hooks_url":"https://api.github.com/repos/bgreiner/orsee/hooks","issue_events_url":"https://api.github.com/repos/bgreiner/orsee/issues/events{/number}","events_url":"https://api.github.com/repos/bgreiner/orsee/events","assignees_url":"https://api.github.com/repos/bgreiner/orsee/assignees{/user}","branches_url":"https://api.github.com/repos/bgreiner/orsee/branches{/branch}","tags_url":"https://api.github.com/repos/bgreiner/orsee/tags","blobs_url":"https://api.github.com/repos/bgreiner/orsee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bgreiner/orsee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bgreiner/orsee/git/refs{/sha}","trees_url":"https://api.github.com/repos/bgreiner/orsee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bgreiner/orsee/statuses/{sha}","languages_url":"https://api.github.com/repos/bgreiner/orsee/languages","stargazers_url":"https://api.github.com/repos/bgreiner/orsee/stargazers","contributors_url":"https://api.github.com/repos/bgreiner/orsee/contributors","subscribers_url":"https://api.github.com/repos/bgreiner/orsee/subscribers","subscription_url":"https://api.github.com/repos/bgreiner/orsee/subscription","commits_url":"https://api.github.com/repos/bgreiner/orsee/commits{/sha}","git_commits_url":"https://api.github.com/repos/bgreiner/orsee/git/commits{/sha}","comments_url":"https://api.github.com/repos/bgreiner/orsee/comments{/number}","issue_comment_url":"https://api.github.com/repos/bgreiner/orsee/issues/comments{/number}","contents_url":"https://api.github.com/repos/bgreiner/orsee/contents/{+path}","compare_url":"https://api.github.com/repos/bgreiner/orsee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bgreiner/orsee/merges","archive_url":"https://api.github.com/repos/bgreiner/orsee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bgreiner/orsee/downloads","issues_url":"https://api.github.com/repos/bgreiner/orsee/issues{/number}","pulls_url":"https://api.github.com/repos/bgreiner/orsee/pulls{/number}","milestones_url":"https://api.github.com/repos/bgreiner/orsee/milestones{/number}","notifications_url":"https://api.github.com/repos/bgreiner/orsee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bgreiner/orsee/labels{/name}","releases_url":"https://api.github.com/repos/bgreiner/orsee/releases{/id}","deployments_url":"https://api.github.com/repos/bgreiner/orsee/deployments","created_at":"2015-08-28T23:42:57Z","updated_at":"2015-08-28T23:42:58Z","pushed_at":"2016-11-30T23:12:07Z","git_url":"git://github.com/bgreiner/orsee.git","ssh_url":"git@github.com:bgreiner/orsee.git","clone_url":"https://github.com/bgreiner/orsee.git","svn_url":"https://github.com/bgreiner/orsee","homepage":"http://www.orsee.org/","size":3940,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"ORSEE_30"}},"base":{"label":"orsee:develop","ref":"develop","sha":"e6d9002e45904db1653acd29eac97f0f847db5ee","user":{"login":"orsee","id":13377747,"avatar_url":"https://avatars.githubusercontent.com/u/13377747?v=3","gravatar_id":"","url":"https://api.github.com/users/orsee","html_url":"https://github.com/orsee","followers_url":"https://api.github.com/users/orsee/followers","following_url":"https://api.github.com/users/orsee/following{/other_user}","gists_url":"https://api.github.com/users/orsee/gists{/gist_id}","starred_url":"https://api.github.com/users/orsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orsee/subscriptions","organizations_url":"https://api.github.com/users/orsee/orgs","repos_url":"https://api.github.com/users/orsee/repos","events_url":"https://api.github.com/users/orsee/events{/privacy}","received_events_url":"https://api.github.com/users/orsee/received_events","type":"Organization","site_admin":false},"repo":{"id":39242618,"name":"orsee","full_name":"orsee/orsee","owner":{"login":"orsee","id":13377747,"avatar_url":"https://avatars.githubusercontent.com/u/13377747?v=3","gravatar_id":"","url":"https://api.github.com/users/orsee","html_url":"https://github.com/orsee","followers_url":"https://api.github.com/users/orsee/followers","following_url":"https://api.github.com/users/orsee/following{/other_user}","gists_url":"https://api.github.com/users/orsee/gists{/gist_id}","starred_url":"https://api.github.com/users/orsee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orsee/subscriptions","organizations_url":"https://api.github.com/users/orsee/orgs","repos_url":"https://api.github.com/users/orsee/repos","events_url":"https://api.github.com/users/orsee/events{/privacy}","received_events_url":"https://api.github.com/users/orsee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orsee/orsee","description":"Online Recruitment System for Economic Experiments","fork":false,"url":"https://api.github.com/repos/orsee/orsee","forks_url":"https://api.github.com/repos/orsee/orsee/forks","keys_url":"https://api.github.com/repos/orsee/orsee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orsee/orsee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orsee/orsee/teams","hooks_url":"https://api.github.com/repos/orsee/orsee/hooks","issue_events_url":"https://api.github.com/repos/orsee/orsee/issues/events{/number}","events_url":"https://api.github.com/repos/orsee/orsee/events","assignees_url":"https://api.github.com/repos/orsee/orsee/assignees{/user}","branches_url":"https://api.github.com/repos/orsee/orsee/branches{/branch}","tags_url":"https://api.github.com/repos/orsee/orsee/tags","blobs_url":"https://api.github.com/repos/orsee/orsee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orsee/orsee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orsee/orsee/git/refs{/sha}","trees_url":"https://api.github.com/repos/orsee/orsee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orsee/orsee/statuses/{sha}","languages_url":"https://api.github.com/repos/orsee/orsee/languages","stargazers_url":"https://api.github.com/repos/orsee/orsee/stargazers","contributors_url":"https://api.github.com/repos/orsee/orsee/contributors","subscribers_url":"https://api.github.com/repos/orsee/orsee/subscribers","subscription_url":"https://api.github.com/repos/orsee/orsee/subscription","commits_url":"https://api.github.com/repos/orsee/orsee/commits{/sha}","git_commits_url":"https://api.github.com/repos/orsee/orsee/git/commits{/sha}","comments_url":"https://api.github.com/repos/orsee/orsee/comments{/number}","issue_comment_url":"https://api.github.com/repos/orsee/orsee/issues/comments{/number}","contents_url":"https://api.github.com/repos/orsee/orsee/contents/{+path}","compare_url":"https://api.github.com/repos/orsee/orsee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orsee/orsee/merges","archive_url":"https://api.github.com/repos/orsee/orsee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orsee/orsee/downloads","issues_url":"https://api.github.com/repos/orsee/orsee/issues{/number}","pulls_url":"https://api.github.com/repos/orsee/orsee/pulls{/number}","milestones_url":"https://api.github.com/repos/orsee/orsee/milestones{/number}","notifications_url":"https://api.github.com/repos/orsee/orsee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orsee/orsee/labels{/name}","releases_url":"https://api.github.com/repos/orsee/orsee/releases{/id}","deployments_url":"https://api.github.com/repos/orsee/orsee/deployments","created_at":"2015-07-17T08:08:50Z","updated_at":"2016-11-30T21:32:30Z","pushed_at":"2016-11-30T23:12:07Z","git_url":"git://github.com/orsee/orsee.git","ssh_url":"git@github.com:orsee/orsee.git","clone_url":"https://github.com/orsee/orsee.git","svn_url":"https://github.com/orsee/orsee","homepage":"http://www.orsee.org/","size":4506,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":6,"forks":9,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orsee/orsee/pulls/16"},"html":{"href":"https://github.com/orsee/orsee/pull/16"},"issue":{"href":"https://api.github.com/repos/orsee/orsee/issues/16"},"comments":{"href":"https://api.github.com/repos/orsee/orsee/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/orsee/orsee/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/orsee/orsee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orsee/orsee/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/orsee/orsee/statuses/cfaaf3067ed1b01079f1b8e082acd8a298eab3d4"}}}}
{"actor":{"display_login":"bgreiner"}}