{"action":"created","comment":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/42328189","id":42328189,"diff_hunk":"@@ -0,0 +1,118 @@\n+<?php\n+/**\n+ *\n+ * This file is part of the phpBB Forum Software package.\n+ *\n+ * @copyright (c) phpBB Limited <https://www.phpbb.com>\n+ * @license GNU General Public License, version 2 (GPL-2.0)\n+ *\n+ * For full copyright and license information, please see\n+ * the docs/CREDITS.txt file.\n+ *\n+ */\n+\n+namespace phpbb\\install\\helper;\n+\n+/**\n+ * General helper functionality for the updater\n+ */\n+class update_helper\n+{\n+\t/**\n+\t * @var string\n+\t */\n+\tprotected $path_to_new_files;\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprotected $path_to_old_files;\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprotected $phpbb_root_path;\n+\n+\t/**\n+\t * Constructor\n+\t *\n+\t * @param string\t$phpbb_root_path\n+\t */\n+\tpublic function __construct($phpbb_root_path)\n+\t{\n+\t\t$this->phpbb_root_path\t\t= $phpbb_root_path;\n+\t\t$this->path_to_new_files\t= $phpbb_root_path . 'install/update/new/';\n+\t\t$this->path_to_old_files\t= $phpbb_root_path . 'install/update/old/';\n+\t}\n+\n+\t/**\n+\t * Returns path to new update files\n+\t *\n+\t * @return string\n+\t */\n+\tpublic function get_path_to_new_update_files()\n+\t{\n+\t\treturn $this->path_to_new_files;\n+\t}\n+\n+\t/**\n+\t * Returns path to new update files\n+\t *\n+\t * @return string\n+\t */\n+\tpublic function get_path_to_old_update_files()\n+\t{\n+\t\treturn $this->path_to_old_files;\n+\t}\n+\n+\t/**\n+\t * Includes the updated file if available\n+\t *\n+\t * @param string\t$filename\tPath to the file relative to phpBB root path\n+\t */\n+\tpublic function include_file($filename)\n+\t{\n+\t\tif (!is_file($this->phpbb_root_path . $filename))","path":"phpBB/phpbb/install/helper/update_helper.php","position":75,"original_position":75,"commit_id":"2f8ef80d92457e29f688155cd5433a92fa981139","original_commit_id":"8f5a0ad6f73e7b7757b02c827436384c96069b5a","user":{"login":"Nicofuma","id":591456,"avatar_url":"https://avatars.githubusercontent.com/u/591456?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicofuma","html_url":"https://github.com/Nicofuma","followers_url":"https://api.github.com/users/Nicofuma/followers","following_url":"https://api.github.com/users/Nicofuma/following{/other_user}","gists_url":"https://api.github.com/users/Nicofuma/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicofuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicofuma/subscriptions","organizations_url":"https://api.github.com/users/Nicofuma/orgs","repos_url":"https://api.github.com/users/Nicofuma/repos","events_url":"https://api.github.com/users/Nicofuma/events{/privacy}","received_events_url":"https://api.github.com/users/Nicofuma/received_events","type":"User","site_admin":false},"body":"why do you skip the file if it is only new?","created_at":"2015-10-18T23:13:57Z","updated_at":"2015-10-18T23:13:57Z","html_url":"https://github.com/phpbb/phpbb/pull/3794#discussion_r42328189","pull_request_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3794","_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/42328189"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3794#discussion_r42328189"},"pull_request":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3794"}}},"pull_request":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/3794","id":40897823,"html_url":"https://github.com/phpbb/phpbb/pull/3794","diff_url":"https://github.com/phpbb/phpbb/pull/3794.diff","patch_url":"https://github.com/phpbb/phpbb/pull/3794.patch","issue_url":"https://api.github.com/repos/phpbb/phpbb/issues/3794","number":3794,"state":"open","locked":false,"title":"[ticket/14039] Refactoring the updater","user":{"login":"CHItA","id":10946388,"avatar_url":"https://avatars.githubusercontent.com/u/10946388?v=3","gravatar_id":"","url":"https://api.github.com/users/CHItA","html_url":"https://github.com/CHItA","followers_url":"https://api.github.com/users/CHItA/followers","following_url":"https://api.github.com/users/CHItA/following{/other_user}","gists_url":"https://api.github.com/users/CHItA/gists{/gist_id}","starred_url":"https://api.github.com/users/CHItA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CHItA/subscriptions","organizations_url":"https://api.github.com/users/CHItA/orgs","repos_url":"https://api.github.com/users/CHItA/repos","events_url":"https://api.github.com/users/CHItA/events{/privacy}","received_events_url":"https://api.github.com/users/CHItA/received_events","type":"User","site_admin":false},"body":"[PHPBB3-14039](https://tracker.phpbb.com/browse/PHPBB3-14039)\r\n\r\n**Removed features:**\r\n- Diff viewer\r\n- Selecting file update options (update with/without diffing, etc)\r\n- Generating `.bak` files instead of deleting them\r\n\r\nIf you disagree with any of these features being removed, please leave a comment.\r\n\r\n**TODO:**\r\n- [x] Load from update directory in `install_new/app.php`\r\n- [x] Add config files\r\n- [x] Implement UI\r\n- [x] Add controllers for archive downloading\r\n- [x] Make the UI look good\r\n- [x] Route loader fix [Related ticket](https://tracker.phpbb.com/browse/PHPBB3-14220) #3948\r\n- [x] Fix package builder code\r\n\r\n**Notes for testing:**\r\n- As of this PR you need to copy in your root the `install_new` directory form `install/update/new/` (that is needed because of the duplicated installers ATM","created_at":"2015-07-27T12:27:32Z","updated_at":"2015-10-18T23:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa0885b6203bdc819271b5807b09725edab319be","assignee":null,"milestone":{"url":"https://api.github.com/repos/phpbb/phpbb/milestones/2","html_url":"https://github.com/phpbb/phpbb/milestones/3.2.0-a1","labels_url":"https://api.github.com/repos/phpbb/phpbb/milestones/2/labels","id":835770,"number":2,"title":"3.2.0-a1","description":"/!\\ Feature freeze for the 3.2 release","creator":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars.githubusercontent.com/u/213943?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":224,"state":"open","created_at":"2014-10-22T10:41:02Z","updated_at":"2015-10-18T21:57:01Z","due_on":"2015-09-19T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3794/commits","review_comments_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3794/comments","review_comment_url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpbb/phpbb/issues/3794/comments","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/2f8ef80d92457e29f688155cd5433a92fa981139","head":{"label":"CHItA:ticket/14039","ref":"ticket/14039","sha":"2f8ef80d92457e29f688155cd5433a92fa981139","user":{"login":"CHItA","id":10946388,"avatar_url":"https://avatars.githubusercontent.com/u/10946388?v=3","gravatar_id":"","url":"https://api.github.com/users/CHItA","html_url":"https://github.com/CHItA","followers_url":"https://api.github.com/users/CHItA/followers","following_url":"https://api.github.com/users/CHItA/following{/other_user}","gists_url":"https://api.github.com/users/CHItA/gists{/gist_id}","starred_url":"https://api.github.com/users/CHItA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CHItA/subscriptions","organizations_url":"https://api.github.com/users/CHItA/orgs","repos_url":"https://api.github.com/users/CHItA/repos","events_url":"https://api.github.com/users/CHItA/events{/privacy}","received_events_url":"https://api.github.com/users/CHItA/received_events","type":"User","site_admin":false},"repo":{"id":31021414,"name":"phpbb","full_name":"CHItA/phpbb","owner":{"login":"CHItA","id":10946388,"avatar_url":"https://avatars.githubusercontent.com/u/10946388?v=3","gravatar_id":"","url":"https://api.github.com/users/CHItA","html_url":"https://github.com/CHItA","followers_url":"https://api.github.com/users/CHItA/followers","following_url":"https://api.github.com/users/CHItA/following{/other_user}","gists_url":"https://api.github.com/users/CHItA/gists{/gist_id}","starred_url":"https://api.github.com/users/CHItA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CHItA/subscriptions","organizations_url":"https://api.github.com/users/CHItA/orgs","repos_url":"https://api.github.com/users/CHItA/repos","events_url":"https://api.github.com/users/CHItA/events{/privacy}","received_events_url":"https://api.github.com/users/CHItA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CHItA/phpbb","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":true,"url":"https://api.github.com/repos/CHItA/phpbb","forks_url":"https://api.github.com/repos/CHItA/phpbb/forks","keys_url":"https://api.github.com/repos/CHItA/phpbb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CHItA/phpbb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CHItA/phpbb/teams","hooks_url":"https://api.github.com/repos/CHItA/phpbb/hooks","issue_events_url":"https://api.github.com/repos/CHItA/phpbb/issues/events{/number}","events_url":"https://api.github.com/repos/CHItA/phpbb/events","assignees_url":"https://api.github.com/repos/CHItA/phpbb/assignees{/user}","branches_url":"https://api.github.com/repos/CHItA/phpbb/branches{/branch}","tags_url":"https://api.github.com/repos/CHItA/phpbb/tags","blobs_url":"https://api.github.com/repos/CHItA/phpbb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CHItA/phpbb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CHItA/phpbb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CHItA/phpbb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CHItA/phpbb/statuses/{sha}","languages_url":"https://api.github.com/repos/CHItA/phpbb/languages","stargazers_url":"https://api.github.com/repos/CHItA/phpbb/stargazers","contributors_url":"https://api.github.com/repos/CHItA/phpbb/contributors","subscribers_url":"https://api.github.com/repos/CHItA/phpbb/subscribers","subscription_url":"https://api.github.com/repos/CHItA/phpbb/subscription","commits_url":"https://api.github.com/repos/CHItA/phpbb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CHItA/phpbb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CHItA/phpbb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CHItA/phpbb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CHItA/phpbb/contents/{+path}","compare_url":"https://api.github.com/repos/CHItA/phpbb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CHItA/phpbb/merges","archive_url":"https://api.github.com/repos/CHItA/phpbb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CHItA/phpbb/downloads","issues_url":"https://api.github.com/repos/CHItA/phpbb/issues{/number}","pulls_url":"https://api.github.com/repos/CHItA/phpbb/pulls{/number}","milestones_url":"https://api.github.com/repos/CHItA/phpbb/milestones{/number}","notifications_url":"https://api.github.com/repos/CHItA/phpbb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CHItA/phpbb/labels{/name}","releases_url":"https://api.github.com/repos/CHItA/phpbb/releases{/id}","created_at":"2015-02-19T15:25:22Z","updated_at":"2015-05-05T17:16:42Z","pushed_at":"2015-10-18T23:12:26Z","git_url":"git://github.com/CHItA/phpbb.git","ssh_url":"git@github.com:CHItA/phpbb.git","clone_url":"https://github.com/CHItA/phpbb.git","svn_url":"https://github.com/CHItA/phpbb","homepage":"http://www.phpbb.com","size":59082,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"phpbb:master","ref":"master","sha":"f1047ac854baba4d1015cd9a555a523b3860f2c9","user":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":541983,"name":"phpbb","full_name":"phpbb/phpbb","owner":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpbb/phpbb","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":false,"url":"https://api.github.com/repos/phpbb/phpbb","forks_url":"https://api.github.com/repos/phpbb/phpbb/forks","keys_url":"https://api.github.com/repos/phpbb/phpbb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpbb/phpbb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpbb/phpbb/teams","hooks_url":"https://api.github.com/repos/phpbb/phpbb/hooks","issue_events_url":"https://api.github.com/repos/phpbb/phpbb/issues/events{/number}","events_url":"https://api.github.com/repos/phpbb/phpbb/events","assignees_url":"https://api.github.com/repos/phpbb/phpbb/assignees{/user}","branches_url":"https://api.github.com/repos/phpbb/phpbb/branches{/branch}","tags_url":"https://api.github.com/repos/phpbb/phpbb/tags","blobs_url":"https://api.github.com/repos/phpbb/phpbb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpbb/phpbb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpbb/phpbb/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpbb/phpbb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/{sha}","languages_url":"https://api.github.com/repos/phpbb/phpbb/languages","stargazers_url":"https://api.github.com/repos/phpbb/phpbb/stargazers","contributors_url":"https://api.github.com/repos/phpbb/phpbb/contributors","subscribers_url":"https://api.github.com/repos/phpbb/phpbb/subscribers","subscription_url":"https://api.github.com/repos/phpbb/phpbb/subscription","commits_url":"https://api.github.com/repos/phpbb/phpbb/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpbb/phpbb/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpbb/phpbb/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpbb/phpbb/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpbb/phpbb/contents/{+path}","compare_url":"https://api.github.com/repos/phpbb/phpbb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpbb/phpbb/merges","archive_url":"https://api.github.com/repos/phpbb/phpbb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpbb/phpbb/downloads","issues_url":"https://api.github.com/repos/phpbb/phpbb/issues{/number}","pulls_url":"https://api.github.com/repos/phpbb/phpbb/pulls{/number}","milestones_url":"https://api.github.com/repos/phpbb/phpbb/milestones{/number}","notifications_url":"https://api.github.com/repos/phpbb/phpbb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpbb/phpbb/labels{/name}","releases_url":"https://api.github.com/repos/phpbb/phpbb/releases{/id}","created_at":"2010-03-01T22:33:17Z","updated_at":"2015-10-18T07:26:22Z","pushed_at":"2015-10-18T23:12:27Z","git_url":"git://github.com/phpbb/phpbb.git","ssh_url":"git@github.com:phpbb/phpbb.git","clone_url":"https://github.com/phpbb/phpbb.git","svn_url":"https://github.com/phpbb/phpbb","homepage":"http://www.phpbb.com","size":200969,"stargazers_count":784,"watchers_count":784,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":499,"mirror_url":null,"open_issues_count":69,"forks":499,"open_issues":69,"watchers":784,"default_branch":"3.1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3794"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3794"},"issue":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3794"},"comments":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3794/comments"},"review_comments":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3794/comments"},"review_comment":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3794/commits"},"statuses":{"href":"https://api.github.com/repos/phpbb/phpbb/statuses/2f8ef80d92457e29f688155cd5433a92fa981139"}}}}