{"action":"created","comment":{"url":"https://api.github.com/repos/Elgg/Elgg/pulls/comments/57532469","id":57532469,"diff_hunk":"@@ -318,6 +318,34 @@ public function tell() {\n \t}\n \n \t/**\n+\t * Sets access and modification time of file and clears stats cache for the file\n+\t * \n+\t * @param int $time  Modification time (defaults to time())\n+\t * @param int $atime Access time (defaults to $time)\n+\t * @return bool\n+\t */\n+\tpublic function setModifiedTime($time = null, $atime = null) {\n+\t\tif (!isset($time)) {\n+\t\t\t$time = time();\n+\t\t}\n+\t\tif (!isset($atime)) {\n+\t\t\t$atime = $time;\n+\t\t}\n+\t\tif ($result = touch($this->getFilenameOnFilestore(), $time, $atime)) {","path":"engine/classes/ElggFile.php","position":17,"original_position":17,"commit_id":"3fbc0e0f0bad4ae93446d0ea7d6b0cdabbaee28e","original_commit_id":"3fbc0e0f0bad4ae93446d0ea7d6b0cdabbaee28e","user":{"login":"mrclay","id":170687,"avatar_url":"https://avatars.githubusercontent.com/u/170687?v=3","gravatar_id":"","url":"https://api.github.com/users/mrclay","html_url":"https://github.com/mrclay","followers_url":"https://api.github.com/users/mrclay/followers","following_url":"https://api.github.com/users/mrclay/following{/other_user}","gists_url":"https://api.github.com/users/mrclay/gists{/gist_id}","starred_url":"https://api.github.com/users/mrclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrclay/subscriptions","organizations_url":"https://api.github.com/users/mrclay/orgs","repos_url":"https://api.github.com/users/mrclay/repos","events_url":"https://api.github.com/users/mrclay/events{/privacy}","received_events_url":"https://api.github.com/users/mrclay/received_events","type":"User","site_admin":false},"body":"Is setting particular time a really need? Seems like something that might be unreliable on some file systems.","created_at":"2016-03-27T18:03:32Z","updated_at":"2016-03-27T18:03:32Z","html_url":"https://github.com/Elgg/Elgg/pull/9575#discussion_r57532469","pull_request_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9575","_links":{"self":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/comments/57532469"},"html":{"href":"https://github.com/Elgg/Elgg/pull/9575#discussion_r57532469"},"pull_request":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9575"}}},"pull_request":{"url":"https://api.github.com/repos/Elgg/Elgg/pulls/9575","id":64261293,"html_url":"https://github.com/Elgg/Elgg/pull/9575","diff_url":"https://github.com/Elgg/Elgg/pull/9575.diff","patch_url":"https://github.com/Elgg/Elgg/pull/9575.patch","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/9575","number":9575,"state":"open","locked":false,"title":"fix(files): file service now sends 304 and 403 headers more reliably","user":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"body":"File service was sending 304 headers before testing if file modified time has changed.\r\n\r\nUpdates PHPUnit bootstrap to allow working with file entity objects. Modifies and adds new file related tests.\r\n\r\nAdds two new methods to ElggFile: setModifiedTime and getModifiedTime, which invalidate stat cache\r\nto ensure we always have latest modified time information\r\n\r\nFixes #9571","created_at":"2016-03-27T09:17:22Z","updated_at":"2016-03-27T18:03:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f52369ef338f765ab9bc4f691099735b6fdbdea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9575/commits","review_comments_url":"https://api.github.com/repos/Elgg/Elgg/pulls/9575/comments","review_comment_url":"https://api.github.com/repos/Elgg/Elgg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/9575/comments","statuses_url":"https://api.github.com/repos/Elgg/Elgg/statuses/3fbc0e0f0bad4ae93446d0ea7d6b0cdabbaee28e","head":{"label":"hypeJunction:file-service-time-updated","ref":"file-service-time-updated","sha":"3fbc0e0f0bad4ae93446d0ea7d6b0cdabbaee28e","user":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"repo":{"id":2797801,"name":"Elgg","full_name":"hypeJunction/Elgg","owner":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hypeJunction/Elgg","description":"A social networking engine","fork":true,"url":"https://api.github.com/repos/hypeJunction/Elgg","forks_url":"https://api.github.com/repos/hypeJunction/Elgg/forks","keys_url":"https://api.github.com/repos/hypeJunction/Elgg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hypeJunction/Elgg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hypeJunction/Elgg/teams","hooks_url":"https://api.github.com/repos/hypeJunction/Elgg/hooks","issue_events_url":"https://api.github.com/repos/hypeJunction/Elgg/issues/events{/number}","events_url":"https://api.github.com/repos/hypeJunction/Elgg/events","assignees_url":"https://api.github.com/repos/hypeJunction/Elgg/assignees{/user}","branches_url":"https://api.github.com/repos/hypeJunction/Elgg/branches{/branch}","tags_url":"https://api.github.com/repos/hypeJunction/Elgg/tags","blobs_url":"https://api.github.com/repos/hypeJunction/Elgg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hypeJunction/Elgg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hypeJunction/Elgg/git/refs{/sha}","trees_url":"https://api.github.com/repos/hypeJunction/Elgg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hypeJunction/Elgg/statuses/{sha}","languages_url":"https://api.github.com/repos/hypeJunction/Elgg/languages","stargazers_url":"https://api.github.com/repos/hypeJunction/Elgg/stargazers","contributors_url":"https://api.github.com/repos/hypeJunction/Elgg/contributors","subscribers_url":"https://api.github.com/repos/hypeJunction/Elgg/subscribers","subscription_url":"https://api.github.com/repos/hypeJunction/Elgg/subscription","commits_url":"https://api.github.com/repos/hypeJunction/Elgg/commits{/sha}","git_commits_url":"https://api.github.com/repos/hypeJunction/Elgg/git/commits{/sha}","comments_url":"https://api.github.com/repos/hypeJunction/Elgg/comments{/number}","issue_comment_url":"https://api.github.com/repos/hypeJunction/Elgg/issues/comments{/number}","contents_url":"https://api.github.com/repos/hypeJunction/Elgg/contents/{+path}","compare_url":"https://api.github.com/repos/hypeJunction/Elgg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hypeJunction/Elgg/merges","archive_url":"https://api.github.com/repos/hypeJunction/Elgg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hypeJunction/Elgg/downloads","issues_url":"https://api.github.com/repos/hypeJunction/Elgg/issues{/number}","pulls_url":"https://api.github.com/repos/hypeJunction/Elgg/pulls{/number}","milestones_url":"https://api.github.com/repos/hypeJunction/Elgg/milestones{/number}","notifications_url":"https://api.github.com/repos/hypeJunction/Elgg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hypeJunction/Elgg/labels{/name}","releases_url":"https://api.github.com/repos/hypeJunction/Elgg/releases{/id}","deployments_url":"https://api.github.com/repos/hypeJunction/Elgg/deployments","created_at":"2011-11-17T18:59:58Z","updated_at":"2015-05-09T06:40:26Z","pushed_at":"2016-03-27T09:25:29Z","git_url":"git://github.com/hypeJunction/Elgg.git","ssh_url":"git@github.com:hypeJunction/Elgg.git","clone_url":"https://github.com/hypeJunction/Elgg.git","svn_url":"https://github.com/hypeJunction/Elgg","homepage":"http://elgg.org","size":43720,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Elgg:2.1","ref":"2.1","sha":"268d0553b4196502e871ab708260b4a11733e470","user":{"login":"Elgg","id":79167,"avatar_url":"https://avatars.githubusercontent.com/u/79167?v=3","gravatar_id":"","url":"https://api.github.com/users/Elgg","html_url":"https://github.com/Elgg","followers_url":"https://api.github.com/users/Elgg/followers","following_url":"https://api.github.com/users/Elgg/following{/other_user}","gists_url":"https://api.github.com/users/Elgg/gists{/gist_id}","starred_url":"https://api.github.com/users/Elgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elgg/subscriptions","organizations_url":"https://api.github.com/users/Elgg/orgs","repos_url":"https://api.github.com/users/Elgg/repos","events_url":"https://api.github.com/users/Elgg/events{/privacy}","received_events_url":"https://api.github.com/users/Elgg/received_events","type":"Organization","site_admin":false},"repo":{"id":299271,"name":"Elgg","full_name":"Elgg/Elgg","owner":{"login":"Elgg","id":79167,"avatar_url":"https://avatars.githubusercontent.com/u/79167?v=3","gravatar_id":"","url":"https://api.github.com/users/Elgg","html_url":"https://github.com/Elgg","followers_url":"https://api.github.com/users/Elgg/followers","following_url":"https://api.github.com/users/Elgg/following{/other_user}","gists_url":"https://api.github.com/users/Elgg/gists{/gist_id}","starred_url":"https://api.github.com/users/Elgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elgg/subscriptions","organizations_url":"https://api.github.com/users/Elgg/orgs","repos_url":"https://api.github.com/users/Elgg/repos","events_url":"https://api.github.com/users/Elgg/events{/privacy}","received_events_url":"https://api.github.com/users/Elgg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elgg/Elgg","description":"A social networking engine in PHP/MySQL","fork":false,"url":"https://api.github.com/repos/Elgg/Elgg","forks_url":"https://api.github.com/repos/Elgg/Elgg/forks","keys_url":"https://api.github.com/repos/Elgg/Elgg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elgg/Elgg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elgg/Elgg/teams","hooks_url":"https://api.github.com/repos/Elgg/Elgg/hooks","issue_events_url":"https://api.github.com/repos/Elgg/Elgg/issues/events{/number}","events_url":"https://api.github.com/repos/Elgg/Elgg/events","assignees_url":"https://api.github.com/repos/Elgg/Elgg/assignees{/user}","branches_url":"https://api.github.com/repos/Elgg/Elgg/branches{/branch}","tags_url":"https://api.github.com/repos/Elgg/Elgg/tags","blobs_url":"https://api.github.com/repos/Elgg/Elgg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elgg/Elgg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elgg/Elgg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elgg/Elgg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elgg/Elgg/statuses/{sha}","languages_url":"https://api.github.com/repos/Elgg/Elgg/languages","stargazers_url":"https://api.github.com/repos/Elgg/Elgg/stargazers","contributors_url":"https://api.github.com/repos/Elgg/Elgg/contributors","subscribers_url":"https://api.github.com/repos/Elgg/Elgg/subscribers","subscription_url":"https://api.github.com/repos/Elgg/Elgg/subscription","commits_url":"https://api.github.com/repos/Elgg/Elgg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elgg/Elgg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elgg/Elgg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elgg/Elgg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elgg/Elgg/contents/{+path}","compare_url":"https://api.github.com/repos/Elgg/Elgg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elgg/Elgg/merges","archive_url":"https://api.github.com/repos/Elgg/Elgg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elgg/Elgg/downloads","issues_url":"https://api.github.com/repos/Elgg/Elgg/issues{/number}","pulls_url":"https://api.github.com/repos/Elgg/Elgg/pulls{/number}","milestones_url":"https://api.github.com/repos/Elgg/Elgg/milestones{/number}","notifications_url":"https://api.github.com/repos/Elgg/Elgg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elgg/Elgg/labels{/name}","releases_url":"https://api.github.com/repos/Elgg/Elgg/releases{/id}","deployments_url":"https://api.github.com/repos/Elgg/Elgg/deployments","created_at":"2009-09-06T17:10:11Z","updated_at":"2016-03-26T20:49:51Z","pushed_at":"2016-03-27T09:25:29Z","git_url":"git://github.com/Elgg/Elgg.git","ssh_url":"git@github.com:Elgg/Elgg.git","clone_url":"https://github.com/Elgg/Elgg.git","svn_url":"https://github.com/Elgg/Elgg","homepage":"http://elgg.org","size":83360,"stargazers_count":856,"watchers_count":856,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":503,"mirror_url":null,"open_issues_count":876,"forks":503,"open_issues":876,"watchers":856,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9575"},"html":{"href":"https://github.com/Elgg/Elgg/pull/9575"},"issue":{"href":"https://api.github.com/repos/Elgg/Elgg/issues/9575"},"comments":{"href":"https://api.github.com/repos/Elgg/Elgg/issues/9575/comments"},"review_comments":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9575/comments"},"review_comment":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Elgg/Elgg/pulls/9575/commits"},"statuses":{"href":"https://api.github.com/repos/Elgg/Elgg/statuses/3fbc0e0f0bad4ae93446d0ea7d6b0cdabbaee28e"}}}}