{"action":"created","comment":{"url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/comments/88840309","pull_request_review_id":9400025,"id":88840309,"diff_hunk":"@@ -356,21 +356,20 @@ public static function convert($file, $from, $to = 'UTF-8', $target = null)\n             if (!@stream_filter_prepend($src, $filter)) {\n                 throw new waException(\"error while register file filter\");\n             }\n-            if ($target === null) {\n-                $extension = pathinfo($file, PATHINFO_EXTENSION);\n-                if ($extension) {\n-                    $extension = '.'.$extension;\n-                }\n-                $target = preg_replace('@\\.[^\\.]+$@', '', $file).'_'.$to.$extension;\n+            if (!$target) {\n+                $target = $file;\n             }\n-            if ($dst = @fopen($target, 'wb')) {\n+            $_target = $target == $file ? '_' . $target : $target;","path":"wa-system/file/waFiles.class.php","position":14,"original_position":14,"commit_id":"eb4c0f4b1343b851ac76d4cf6945fed9c61f3431","original_commit_id":"eb4c0f4b1343b851ac76d4cf6945fed9c61f3431","user":{"login":"Leonix","id":334833,"avatar_url":"https://avatars.githubusercontent.com/u/334833?v=3","gravatar_id":"","url":"https://api.github.com/users/Leonix","html_url":"https://github.com/Leonix","followers_url":"https://api.github.com/users/Leonix/followers","following_url":"https://api.github.com/users/Leonix/following{/other_user}","gists_url":"https://api.github.com/users/Leonix/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonix/subscriptions","organizations_url":"https://api.github.com/users/Leonix/orgs","repos_url":"https://api.github.com/users/Leonix/repos","events_url":"https://api.github.com/users/Leonix/events{/privacy}","received_events_url":"https://api.github.com/users/Leonix/received_events","type":"User","site_admin":false},"body":"Это сломается, если $target - абсолютный путь.","created_at":"2016-11-21T07:23:15Z","updated_at":"2016-11-21T07:26:43Z","html_url":"https://github.com/webasyst/webasyst-framework/pull/191#discussion_r88840309","pull_request_url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/comments/88840309"},"html":{"href":"https://github.com/webasyst/webasyst-framework/pull/191#discussion_r88840309"},"pull_request":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191","id":94492722,"html_url":"https://github.com/webasyst/webasyst-framework/pull/191","diff_url":"https://github.com/webasyst/webasyst-framework/pull/191.diff","patch_url":"https://github.com/webasyst/webasyst-framework/pull/191.patch","issue_url":"https://api.github.com/repos/webasyst/webasyst-framework/issues/191","number":191,"state":"open","locked":false,"title":"Fix waFiles::convert","user":{"login":"WinterSilence","id":3521094,"avatar_url":"https://avatars.githubusercontent.com/u/3521094?v=3","gravatar_id":"","url":"https://api.github.com/users/WinterSilence","html_url":"https://github.com/WinterSilence","followers_url":"https://api.github.com/users/WinterSilence/followers","following_url":"https://api.github.com/users/WinterSilence/following{/other_user}","gists_url":"https://api.github.com/users/WinterSilence/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterSilence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterSilence/subscriptions","organizations_url":"https://api.github.com/users/WinterSilence/orgs","repos_url":"https://api.github.com/users/WinterSilence/repos","events_url":"https://api.github.com/users/WinterSilence/events{/privacy}","received_events_url":"https://api.github.com/users/WinterSilence/received_events","type":"User","site_admin":false},"body":"Если не задан конечный файл($target), то перезаписываем исходный файл($file). Исправлен баг с ошибкой в случае если исходный файл совпадает с конечным файлом.","created_at":"2016-11-19T19:37:41Z","updated_at":"2016-11-21T07:26:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"474aa05f153adedbe7231f2db977f0b55cf18344","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191/commits","review_comments_url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191/comments","review_comment_url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webasyst/webasyst-framework/issues/191/comments","statuses_url":"https://api.github.com/repos/webasyst/webasyst-framework/statuses/eb4c0f4b1343b851ac76d4cf6945fed9c61f3431","head":{"label":"WinterSilence:patch-16","ref":"patch-16","sha":"eb4c0f4b1343b851ac76d4cf6945fed9c61f3431","user":{"login":"WinterSilence","id":3521094,"avatar_url":"https://avatars.githubusercontent.com/u/3521094?v=3","gravatar_id":"","url":"https://api.github.com/users/WinterSilence","html_url":"https://github.com/WinterSilence","followers_url":"https://api.github.com/users/WinterSilence/followers","following_url":"https://api.github.com/users/WinterSilence/following{/other_user}","gists_url":"https://api.github.com/users/WinterSilence/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterSilence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterSilence/subscriptions","organizations_url":"https://api.github.com/users/WinterSilence/orgs","repos_url":"https://api.github.com/users/WinterSilence/repos","events_url":"https://api.github.com/users/WinterSilence/events{/privacy}","received_events_url":"https://api.github.com/users/WinterSilence/received_events","type":"User","site_admin":false},"repo":{"id":18964887,"name":"webasyst-framework","full_name":"WinterSilence/webasyst-framework","owner":{"login":"WinterSilence","id":3521094,"avatar_url":"https://avatars.githubusercontent.com/u/3521094?v=3","gravatar_id":"","url":"https://api.github.com/users/WinterSilence","html_url":"https://github.com/WinterSilence","followers_url":"https://api.github.com/users/WinterSilence/followers","following_url":"https://api.github.com/users/WinterSilence/following{/other_user}","gists_url":"https://api.github.com/users/WinterSilence/gists{/gist_id}","starred_url":"https://api.github.com/users/WinterSilence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinterSilence/subscriptions","organizations_url":"https://api.github.com/users/WinterSilence/orgs","repos_url":"https://api.github.com/users/WinterSilence/repos","events_url":"https://api.github.com/users/WinterSilence/events{/privacy}","received_events_url":"https://api.github.com/users/WinterSilence/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WinterSilence/webasyst-framework","description":"Webasyst PHP Framework","fork":true,"url":"https://api.github.com/repos/WinterSilence/webasyst-framework","forks_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/forks","keys_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/teams","hooks_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/hooks","issue_events_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/issues/events{/number}","events_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/events","assignees_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/assignees{/user}","branches_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/branches{/branch}","tags_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/tags","blobs_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/languages","stargazers_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/stargazers","contributors_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/contributors","subscribers_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/subscribers","subscription_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/subscription","commits_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/contents/{+path}","compare_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/merges","archive_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/downloads","issues_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/issues{/number}","pulls_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/labels{/name}","releases_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/releases{/id}","deployments_url":"https://api.github.com/repos/WinterSilence/webasyst-framework/deployments","created_at":"2014-04-20T13:28:52Z","updated_at":"2014-06-03T12:02:27Z","pushed_at":"2016-11-19T19:37:34Z","git_url":"git://github.com/WinterSilence/webasyst-framework.git","ssh_url":"git@github.com:WinterSilence/webasyst-framework.git","clone_url":"https://github.com/WinterSilence/webasyst-framework.git","svn_url":"https://github.com/WinterSilence/webasyst-framework","homepage":"http://www.webasyst.com/","size":26982,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"webasyst:master","ref":"master","sha":"1839a6235584d69c89e4caab9608323cff0cb0c5","user":{"login":"webasyst","id":856139,"avatar_url":"https://avatars.githubusercontent.com/u/856139?v=3","gravatar_id":"","url":"https://api.github.com/users/webasyst","html_url":"https://github.com/webasyst","followers_url":"https://api.github.com/users/webasyst/followers","following_url":"https://api.github.com/users/webasyst/following{/other_user}","gists_url":"https://api.github.com/users/webasyst/gists{/gist_id}","starred_url":"https://api.github.com/users/webasyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webasyst/subscriptions","organizations_url":"https://api.github.com/users/webasyst/orgs","repos_url":"https://api.github.com/users/webasyst/repos","events_url":"https://api.github.com/users/webasyst/events{/privacy}","received_events_url":"https://api.github.com/users/webasyst/received_events","type":"Organization","site_admin":false},"repo":{"id":1910405,"name":"webasyst-framework","full_name":"webasyst/webasyst-framework","owner":{"login":"webasyst","id":856139,"avatar_url":"https://avatars.githubusercontent.com/u/856139?v=3","gravatar_id":"","url":"https://api.github.com/users/webasyst","html_url":"https://github.com/webasyst","followers_url":"https://api.github.com/users/webasyst/followers","following_url":"https://api.github.com/users/webasyst/following{/other_user}","gists_url":"https://api.github.com/users/webasyst/gists{/gist_id}","starred_url":"https://api.github.com/users/webasyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webasyst/subscriptions","organizations_url":"https://api.github.com/users/webasyst/orgs","repos_url":"https://api.github.com/users/webasyst/repos","events_url":"https://api.github.com/users/webasyst/events{/privacy}","received_events_url":"https://api.github.com/users/webasyst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webasyst/webasyst-framework","description":"Webasyst PHP Framework","fork":false,"url":"https://api.github.com/repos/webasyst/webasyst-framework","forks_url":"https://api.github.com/repos/webasyst/webasyst-framework/forks","keys_url":"https://api.github.com/repos/webasyst/webasyst-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webasyst/webasyst-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webasyst/webasyst-framework/teams","hooks_url":"https://api.github.com/repos/webasyst/webasyst-framework/hooks","issue_events_url":"https://api.github.com/repos/webasyst/webasyst-framework/issues/events{/number}","events_url":"https://api.github.com/repos/webasyst/webasyst-framework/events","assignees_url":"https://api.github.com/repos/webasyst/webasyst-framework/assignees{/user}","branches_url":"https://api.github.com/repos/webasyst/webasyst-framework/branches{/branch}","tags_url":"https://api.github.com/repos/webasyst/webasyst-framework/tags","blobs_url":"https://api.github.com/repos/webasyst/webasyst-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webasyst/webasyst-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webasyst/webasyst-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/webasyst/webasyst-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webasyst/webasyst-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/webasyst/webasyst-framework/languages","stargazers_url":"https://api.github.com/repos/webasyst/webasyst-framework/stargazers","contributors_url":"https://api.github.com/repos/webasyst/webasyst-framework/contributors","subscribers_url":"https://api.github.com/repos/webasyst/webasyst-framework/subscribers","subscription_url":"https://api.github.com/repos/webasyst/webasyst-framework/subscription","commits_url":"https://api.github.com/repos/webasyst/webasyst-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/webasyst/webasyst-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/webasyst/webasyst-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/webasyst/webasyst-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/webasyst/webasyst-framework/contents/{+path}","compare_url":"https://api.github.com/repos/webasyst/webasyst-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webasyst/webasyst-framework/merges","archive_url":"https://api.github.com/repos/webasyst/webasyst-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webasyst/webasyst-framework/downloads","issues_url":"https://api.github.com/repos/webasyst/webasyst-framework/issues{/number}","pulls_url":"https://api.github.com/repos/webasyst/webasyst-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/webasyst/webasyst-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/webasyst/webasyst-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webasyst/webasyst-framework/labels{/name}","releases_url":"https://api.github.com/repos/webasyst/webasyst-framework/releases{/id}","deployments_url":"https://api.github.com/repos/webasyst/webasyst-framework/deployments","created_at":"2011-06-17T09:59:55Z","updated_at":"2016-11-20T20:49:22Z","pushed_at":"2016-11-19T19:37:41Z","git_url":"git://github.com/webasyst/webasyst-framework.git","ssh_url":"git@github.com:webasyst/webasyst-framework.git","clone_url":"https://github.com/webasyst/webasyst-framework.git","svn_url":"https://github.com/webasyst/webasyst-framework","homepage":"http://www.webasyst.com/","size":36747,"stargazers_count":189,"watchers_count":189,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":141,"mirror_url":null,"open_issues_count":37,"forks":141,"open_issues":37,"watchers":189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191"},"html":{"href":"https://github.com/webasyst/webasyst-framework/pull/191"},"issue":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/issues/191"},"comments":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/webasyst/webasyst-framework/statuses/eb4c0f4b1343b851ac76d4cf6945fed9c61f3431"}}}}
{"actor":{"display_login":"Leonix"}}