{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/68822521","id":68822521,"diff_hunk":"@@ -73,6 +73,14 @@ public function click()\n \n \t\tif ($trackClicks > 0)\n \t\t{\n+\t\t\t$params = JComponentHelper::getParams('com_banners');\n+\t\t\t$track_frequency = $params->get('$track_frequency', 'hourly');\n+\n+\t\t\tif ($track_frequency == 'hourly')\n+\t\t\t{\n+\t\t\t\t$trackDate = JFactory::getDate()->format('Y-m-d H');\n+\t\t\t}\n+\n \t\t\t$trackDate = JFactory::getDate()->format('Y-m-d');","path":"components/com_banners/models/banner.php","position":null,"original_position":12,"commit_id":"9a6acc7258ab1adbe0fbbcaccd7737ca0da521bb","original_commit_id":"e152a5433793c647087f9b1c274853a469c78a22","user":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"body":"this can't work because we set it to `'Y-m-d H'` in line 81 and override it everytime with `'Y-m-d'` in line 84.\r\n\r\nI think moving the line 84 above the if can fix the issue:\r\n\r\n```\r\n$trackDate = JFactory::getDate()->format('Y-m-d');\r\n\r\n if ($track_frequency == 'hourly')\r\n {\r\n \t$trackDate = JFactory::getDate()->format('Y-m-d H');\r\n }\r\n```","created_at":"2016-06-28T19:09:48Z","updated_at":"2016-06-28T19:09:48Z","html_url":"https://github.com/joomla/joomla-cms/pull/8825#discussion_r68822521","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/68822521"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/8825#discussion_r68822521"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825","id":54910870,"html_url":"https://github.com/joomla/joomla-cms/pull/8825","diff_url":"https://github.com/joomla/joomla-cms/pull/8825.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/8825.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8825","number":8825,"state":"open","locked":false,"title":"Bug in Joomla 3.4x Banner Manager > Tracks. Shows hourly counts instead of daily counts.","user":{"login":"wojsmol","id":4176111,"avatar_url":"https://avatars.githubusercontent.com/u/4176111?v=3","gravatar_id":"","url":"https://api.github.com/users/wojsmol","html_url":"https://github.com/wojsmol","followers_url":"https://api.github.com/users/wojsmol/followers","following_url":"https://api.github.com/users/wojsmol/following{/other_user}","gists_url":"https://api.github.com/users/wojsmol/gists{/gist_id}","starred_url":"https://api.github.com/users/wojsmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojsmol/subscriptions","organizations_url":"https://api.github.com/users/wojsmol/orgs","repos_url":"https://api.github.com/users/wojsmol/repos","events_url":"https://api.github.com/users/wojsmol/events{/privacy}","received_events_url":"https://api.github.com/users/wojsmol/received_events","type":"User","site_admin":false},"body":"fix for https://github.com/joomla/joomla-cms/issues/6617#issuecomment-88164989\r\n\r\nOriginal issue description\r\n\r\n> Okay, but what about question 2 of my post?\r\n> I'm not a Joomla expert but this seems to not be working the way the Joomla Help screen explains it should.\r\n> \r\n> 2) The Banner Manager > Tracks screen keeps adding new rows of info every HOUR instead of DAILY for each Banner. Shouldn't it only list each Banner's impressions once per day instead of every hour of every day?\r\n> The hourly impression tracking creates tons of pages in the Tracks screens over time. I would think that would be a waste of database space and unnecessary Tracks screens.\r\n> \r\n> I have attached 3 screenshots of my Joomla 3.4x settings related to the Client and Banner Tracking.\r\n> I apologize if this is not a bug but let me know if I should instead post this as a question on the Joomla.org forum instead of GitHub.\r\n>\r\n> ![banners-1](https://cloud.githubusercontent.com/assets/4176111/12075826/109c26f6-b18e-11e5-9ad2-78caa81eab78.jpg)\r\n> ![banners-2](https://cloud.githubusercontent.com/assets/4176111/12075827/1b714cdc-b18e-11e5-9d29-3289d992b5b0.jpg)\r\n> ![banners-3](https://cloud.githubusercontent.com/assets/4176111/12075828/2290547c-b18e-11e5-8ab7-7197faf7a17b.jpg)\r\n","created_at":"2016-01-02T19:11:22Z","updated_at":"2016-06-28T19:09:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3eab949b85582d6b1b057a62a48dd4b249bf589","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8825/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/9a6acc7258ab1adbe0fbbcaccd7737ca0da521bb","head":{"label":"wojsmol:patch-6","ref":"patch-6","sha":"9a6acc7258ab1adbe0fbbcaccd7737ca0da521bb","user":{"login":"wojsmol","id":4176111,"avatar_url":"https://avatars.githubusercontent.com/u/4176111?v=3","gravatar_id":"","url":"https://api.github.com/users/wojsmol","html_url":"https://github.com/wojsmol","followers_url":"https://api.github.com/users/wojsmol/followers","following_url":"https://api.github.com/users/wojsmol/following{/other_user}","gists_url":"https://api.github.com/users/wojsmol/gists{/gist_id}","starred_url":"https://api.github.com/users/wojsmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojsmol/subscriptions","organizations_url":"https://api.github.com/users/wojsmol/orgs","repos_url":"https://api.github.com/users/wojsmol/repos","events_url":"https://api.github.com/users/wojsmol/events{/privacy}","received_events_url":"https://api.github.com/users/wojsmol/received_events","type":"User","site_admin":false},"repo":{"id":42508370,"name":"joomla-cms","full_name":"wojsmol/joomla-cms","owner":{"login":"wojsmol","id":4176111,"avatar_url":"https://avatars.githubusercontent.com/u/4176111?v=3","gravatar_id":"","url":"https://api.github.com/users/wojsmol","html_url":"https://github.com/wojsmol","followers_url":"https://api.github.com/users/wojsmol/followers","following_url":"https://api.github.com/users/wojsmol/following{/other_user}","gists_url":"https://api.github.com/users/wojsmol/gists{/gist_id}","starred_url":"https://api.github.com/users/wojsmol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojsmol/subscriptions","organizations_url":"https://api.github.com/users/wojsmol/orgs","repos_url":"https://api.github.com/users/wojsmol/repos","events_url":"https://api.github.com/users/wojsmol/events{/privacy}","received_events_url":"https://api.github.com/users/wojsmol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wojsmol/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/wojsmol/joomla-cms","forks_url":"https://api.github.com/repos/wojsmol/joomla-cms/forks","keys_url":"https://api.github.com/repos/wojsmol/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wojsmol/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wojsmol/joomla-cms/teams","hooks_url":"https://api.github.com/repos/wojsmol/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/wojsmol/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/wojsmol/joomla-cms/events","assignees_url":"https://api.github.com/repos/wojsmol/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/wojsmol/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/wojsmol/joomla-cms/tags","blobs_url":"https://api.github.com/repos/wojsmol/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wojsmol/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wojsmol/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/wojsmol/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wojsmol/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/wojsmol/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/wojsmol/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/wojsmol/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/wojsmol/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/wojsmol/joomla-cms/subscription","commits_url":"https://api.github.com/repos/wojsmol/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/wojsmol/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/wojsmol/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/wojsmol/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/wojsmol/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/wojsmol/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wojsmol/joomla-cms/merges","archive_url":"https://api.github.com/repos/wojsmol/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wojsmol/joomla-cms/downloads","issues_url":"https://api.github.com/repos/wojsmol/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/wojsmol/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/wojsmol/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/wojsmol/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wojsmol/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/wojsmol/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/wojsmol/joomla-cms/deployments","created_at":"2015-09-15T09:29:35Z","updated_at":"2016-01-14T21:52:27Z","pushed_at":"2016-06-28T18:56:11Z","git_url":"git://github.com/wojsmol/joomla-cms.git","ssh_url":"git@github.com:wojsmol/joomla-cms.git","clone_url":"https://github.com/wojsmol/joomla-cms.git","svn_url":"https://github.com/wojsmol/joomla-cms","homepage":"http://joomla.org","size":149757,"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":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"7102850262ab0267cdf769291569f18caa436087","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/joomla-cms/deployments","created_at":"2011-09-27T02:07:38Z","updated_at":"2016-06-28T12:23:30Z","pushed_at":"2016-06-28T18:47:05Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":281629,"stargazers_count":2049,"watchers_count":2049,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2208,"mirror_url":null,"open_issues_count":480,"forks":2208,"open_issues":480,"watchers":2049,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/8825"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/8825"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/8825/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/8825/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/9a6acc7258ab1adbe0fbbcaccd7737ca0da521bb"}}}}
{"actor":{"display_login":"zero-24"}}