{"action":"created","comment":{"url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/comments/28329487","id":28329487,"diff_hunk":"@@ -51,88 +38,104 @@ class ParseIt\n         CURLOPT_MAXREDIRS => 10, // максимальное число редиректов\n     );\n \n-    private $excess = array(\n-        '/users',\n-        '/account'\n-    );\n-\n     public function __construct()\n     {\n-\n         // Время начала работы скрипта\n         $this->start = microtime(1);\n \n-        // Подгрузка конфига\n-        $config = \"sitemap.php\";\n+        $this->loadConfig();\n+\n+        $tmp = $this->config['website'];\n+        $tmp = parse_url($tmp);\n+        $this->host = $tmp['host'];\n \n-        if (!file_exists($config)) {\n-            $this->info('Конфигурационный файл не найден!', 1);\n-        } else {\n-            if ($config != '') {\n-                $this->config = require('sitemap.php');\n-                rtrim($this->config['website'], '/');\n-            }\n-        }\n         // Проверка существования файла sitemap.xml и его даты\n         if ($this->isSiteMapExist()) {\n-            echo 'Карта сайта уже создана';\n-            exit;\n+            $this->stop('Карта сайта уже создана');\n         }\n-\n         //list($this->links, $this->checked) = $this->loadParsedUrls();\n         $this->loadParsedUrls();\n \n         if ((count($this->links) == 0) && (count($this->checked) == 0)) {\n             // Если это самое начало сканирования, добавляем в массив для сканирования первую ссылку\n-            $this->links[$config['']] = 0;\n+            $this->links[$this->config['website']] = 0;\n         }\n \n         $this->run();\n     }\n \n-    protected function info($mes, $status)\n+    /**\n+     * Вывод ошибки и завершение работы скрипта\n+     * @param string $mes - сообщение для вывода\n+     */\n+    protected function stop($mes)\n     {\n-        // $status: 0 - продолжить работу, 1 - остановить скрипт\n-        echo $mes . \"</br>\";\n-        if ($status == 1) {\n-            exit();\n+        exit($mes);","path":"Library/sitemap/checkUrl.php","position":107,"original_position":107,"commit_id":"5b9fb466b0d995c10151a9a5f4cc0c3374d2f2fa","original_commit_id":"5b9fb466b0d995c10151a9a5f4cc0c3374d2f2fa","user":{"login":"ideals","id":3163039,"avatar_url":"https://avatars.githubusercontent.com/u/3163039?v=3","gravatar_id":"","url":"https://api.github.com/users/ideals","html_url":"https://github.com/ideals","followers_url":"https://api.github.com/users/ideals/followers","following_url":"https://api.github.com/users/ideals/following{/other_user}","gists_url":"https://api.github.com/users/ideals/gists{/gist_id}","starred_url":"https://api.github.com/users/ideals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideals/subscriptions","organizations_url":"https://api.github.com/users/ideals/orgs","repos_url":"https://api.github.com/users/ideals/repos","events_url":"https://api.github.com/users/ideals/events{/privacy}","received_events_url":"https://api.github.com/users/ideals/received_events","type":"User","site_admin":false},"body":"Так не надо делать. Сначала печатаешь сообщение, потом выходишь.","created_at":"2015-04-14T14:10:07Z","updated_at":"2015-04-14T14:10:07Z","html_url":"https://github.com/ideals/Ideal-CMS/pull/273#discussion_r28329487","pull_request_url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273","_links":{"self":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/comments/28329487"},"html":{"href":"https://github.com/ideals/Ideal-CMS/pull/273#discussion_r28329487"},"pull_request":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273","id":32957018,"html_url":"https://github.com/ideals/Ideal-CMS/pull/273","diff_url":"https://github.com/ideals/Ideal-CMS/pull/273.diff","patch_url":"https://github.com/ideals/Ideal-CMS/pull/273.patch","issue_url":"https://api.github.com/repos/ideals/Ideal-CMS/issues/273","number":273,"state":"open","locked":false,"title":"FIX: многочисленные правки","user":{"login":"DarkDirex","id":10139615,"avatar_url":"https://avatars.githubusercontent.com/u/10139615?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkDirex","html_url":"https://github.com/DarkDirex","followers_url":"https://api.github.com/users/DarkDirex/followers","following_url":"https://api.github.com/users/DarkDirex/following{/other_user}","gists_url":"https://api.github.com/users/DarkDirex/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkDirex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkDirex/subscriptions","organizations_url":"https://api.github.com/users/DarkDirex/orgs","repos_url":"https://api.github.com/users/DarkDirex/repos","events_url":"https://api.github.com/users/DarkDirex/events{/privacy}","received_events_url":"https://api.github.com/users/DarkDirex/received_events","type":"User","site_admin":false},"body":"FIX: методы сохранения и загрузки временного файла, метод проверки существования карты сайта, метод проверки внешних ссылок, вывод сообщений при досрочном завершении работы\r\n\r\nADD: метод для загрузки конфига; остановка работы скрипта в случае, если запрашиваемая страница имеет статусы 400-599.\r\n","created_at":"2015-04-09T13:48:56Z","updated_at":"2015-04-14T14:10:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bca882e93642d0f2e6b360daeaa9f366e4c0b78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273/commits","review_comments_url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273/comments","review_comment_url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ideals/Ideal-CMS/issues/273/comments","statuses_url":"https://api.github.com/repos/ideals/Ideal-CMS/statuses/5b9fb466b0d995c10151a9a5f4cc0c3374d2f2fa","head":{"label":"DarkDirex:feature/siteMap","ref":"feature/siteMap","sha":"5b9fb466b0d995c10151a9a5f4cc0c3374d2f2fa","user":{"login":"DarkDirex","id":10139615,"avatar_url":"https://avatars.githubusercontent.com/u/10139615?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkDirex","html_url":"https://github.com/DarkDirex","followers_url":"https://api.github.com/users/DarkDirex/followers","following_url":"https://api.github.com/users/DarkDirex/following{/other_user}","gists_url":"https://api.github.com/users/DarkDirex/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkDirex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkDirex/subscriptions","organizations_url":"https://api.github.com/users/DarkDirex/orgs","repos_url":"https://api.github.com/users/DarkDirex/repos","events_url":"https://api.github.com/users/DarkDirex/events{/privacy}","received_events_url":"https://api.github.com/users/DarkDirex/received_events","type":"User","site_admin":false},"repo":{"id":29180506,"name":"Ideal-CMS","full_name":"DarkDirex/Ideal-CMS","owner":{"login":"DarkDirex","id":10139615,"avatar_url":"https://avatars.githubusercontent.com/u/10139615?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkDirex","html_url":"https://github.com/DarkDirex","followers_url":"https://api.github.com/users/DarkDirex/followers","following_url":"https://api.github.com/users/DarkDirex/following{/other_user}","gists_url":"https://api.github.com/users/DarkDirex/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkDirex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkDirex/subscriptions","organizations_url":"https://api.github.com/users/DarkDirex/orgs","repos_url":"https://api.github.com/users/DarkDirex/repos","events_url":"https://api.github.com/users/DarkDirex/events{/privacy}","received_events_url":"https://api.github.com/users/DarkDirex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DarkDirex/Ideal-CMS","description":"Система управления контентом с открытым исходным кодом, написанная на PHP.","fork":true,"url":"https://api.github.com/repos/DarkDirex/Ideal-CMS","forks_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/forks","keys_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/teams","hooks_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/hooks","issue_events_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/events","assignees_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/tags","blobs_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/languages","stargazers_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/stargazers","contributors_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/contributors","subscribers_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/subscribers","subscription_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/subscription","commits_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/merges","archive_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/downloads","issues_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/labels{/name}","releases_url":"https://api.github.com/repos/DarkDirex/Ideal-CMS/releases{/id}","created_at":"2015-01-13T08:40:14Z","updated_at":"2015-01-13T08:40:15Z","pushed_at":"2015-04-14T13:34:17Z","git_url":"git://github.com/DarkDirex/Ideal-CMS.git","ssh_url":"git@github.com:DarkDirex/Ideal-CMS.git","clone_url":"https://github.com/DarkDirex/Ideal-CMS.git","svn_url":"https://github.com/DarkDirex/Ideal-CMS","homepage":null,"size":6805,"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":"ideals:feature/siteMap","ref":"feature/siteMap","sha":"ab5673412fee7cc0b1f45b94fb5ad4bb877bb42e","user":{"login":"ideals","id":3163039,"avatar_url":"https://avatars.githubusercontent.com/u/3163039?v=3","gravatar_id":"","url":"https://api.github.com/users/ideals","html_url":"https://github.com/ideals","followers_url":"https://api.github.com/users/ideals/followers","following_url":"https://api.github.com/users/ideals/following{/other_user}","gists_url":"https://api.github.com/users/ideals/gists{/gist_id}","starred_url":"https://api.github.com/users/ideals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideals/subscriptions","organizations_url":"https://api.github.com/users/ideals/orgs","repos_url":"https://api.github.com/users/ideals/repos","events_url":"https://api.github.com/users/ideals/events{/privacy}","received_events_url":"https://api.github.com/users/ideals/received_events","type":"User","site_admin":false},"repo":{"id":12143380,"name":"Ideal-CMS","full_name":"ideals/Ideal-CMS","owner":{"login":"ideals","id":3163039,"avatar_url":"https://avatars.githubusercontent.com/u/3163039?v=3","gravatar_id":"","url":"https://api.github.com/users/ideals","html_url":"https://github.com/ideals","followers_url":"https://api.github.com/users/ideals/followers","following_url":"https://api.github.com/users/ideals/following{/other_user}","gists_url":"https://api.github.com/users/ideals/gists{/gist_id}","starred_url":"https://api.github.com/users/ideals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideals/subscriptions","organizations_url":"https://api.github.com/users/ideals/orgs","repos_url":"https://api.github.com/users/ideals/repos","events_url":"https://api.github.com/users/ideals/events{/privacy}","received_events_url":"https://api.github.com/users/ideals/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ideals/Ideal-CMS","description":"Система управления контентом с открытым исходным кодом, написанная на PHP.","fork":false,"url":"https://api.github.com/repos/ideals/Ideal-CMS","forks_url":"https://api.github.com/repos/ideals/Ideal-CMS/forks","keys_url":"https://api.github.com/repos/ideals/Ideal-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ideals/Ideal-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ideals/Ideal-CMS/teams","hooks_url":"https://api.github.com/repos/ideals/Ideal-CMS/hooks","issue_events_url":"https://api.github.com/repos/ideals/Ideal-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/ideals/Ideal-CMS/events","assignees_url":"https://api.github.com/repos/ideals/Ideal-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/ideals/Ideal-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/ideals/Ideal-CMS/tags","blobs_url":"https://api.github.com/repos/ideals/Ideal-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ideals/Ideal-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ideals/Ideal-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ideals/Ideal-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ideals/Ideal-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/ideals/Ideal-CMS/languages","stargazers_url":"https://api.github.com/repos/ideals/Ideal-CMS/stargazers","contributors_url":"https://api.github.com/repos/ideals/Ideal-CMS/contributors","subscribers_url":"https://api.github.com/repos/ideals/Ideal-CMS/subscribers","subscription_url":"https://api.github.com/repos/ideals/Ideal-CMS/subscription","commits_url":"https://api.github.com/repos/ideals/Ideal-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ideals/Ideal-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ideals/Ideal-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ideals/Ideal-CMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ideals/Ideal-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/ideals/Ideal-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ideals/Ideal-CMS/merges","archive_url":"https://api.github.com/repos/ideals/Ideal-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ideals/Ideal-CMS/downloads","issues_url":"https://api.github.com/repos/ideals/Ideal-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/ideals/Ideal-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/ideals/Ideal-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/ideals/Ideal-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ideals/Ideal-CMS/labels{/name}","releases_url":"https://api.github.com/repos/ideals/Ideal-CMS/releases{/id}","created_at":"2013-08-15T20:41:11Z","updated_at":"2015-04-12T23:58:48Z","pushed_at":"2015-04-14T13:34:17Z","git_url":"git://github.com/ideals/Ideal-CMS.git","ssh_url":"git@github.com:ideals/Ideal-CMS.git","clone_url":"https://github.com/ideals/Ideal-CMS.git","svn_url":"https://github.com/ideals/Ideal-CMS","homepage":null,"size":9674,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":26,"forks":8,"open_issues":26,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273"},"html":{"href":"https://github.com/ideals/Ideal-CMS/pull/273"},"issue":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/issues/273"},"comments":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/ideals/Ideal-CMS/statuses/5b9fb466b0d995c10151a9a5f4cc0c3374d2f2fa"}}}}