You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/06/02 17:01:12 UTC

[1/2] incubator-trafficcontrol git commit: This closes #641

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 68ad8ac08 -> 45b46b788


This closes #641


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/45b46b78
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/45b46b78
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/45b46b78

Branch: refs/heads/master
Commit: 45b46b7888a5dad30b6cbbd06622a91cda814a98
Parents: d7e9757
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jun 2 11:01:05 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Jun 2 11:01:05 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/2] incubator-trafficcontrol git commit: current_user() does not have a userid. also making sure count is numeric.

Posted by de...@apache.org.
current_user() does not have a userid. also making sure count is numeric.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/d7e97570
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/d7e97570
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/d7e97570

Branch: refs/heads/master
Commit: d7e97570f091d1d10801fca7a3d1cb8a49b2b028
Parents: 68ad8ac
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Fri Jun 2 10:56:20 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Jun 2 11:01:05 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/ChangeLog.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/d7e97570/traffic_ops/app/lib/API/ChangeLog.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/ChangeLog.pm b/traffic_ops/app/lib/API/ChangeLog.pm
index f4c3f8e..b72eff5 100644
--- a/traffic_ops/app/lib/API/ChangeLog.pm
+++ b/traffic_ops/app/lib/API/ChangeLog.pm
@@ -55,9 +55,8 @@ sub index {
 sub newlogcount {
 	my $self   = shift;
 	my $cookie = $self->cookie('last_seen_log');
-	my $user   = $self->current_user()->{userid};
-
 	my $count = 0;
+
 	if ( !defined($cookie) ) {
 		my $date_string = `date "+%Y-%m-%d% %H:%M:%S"`;
 		chomp($date_string);
@@ -65,7 +64,7 @@ sub newlogcount {
 	}
 	else {
 		my $since_string = "> \'" . $cookie . "\'";
-		$count = $self->db->resultset('Log')->search( { -and => [ { tm_user => { '!=' => $user } }, { last_updated => \$since_string } ] }, )->count();
+		$count = $self->db->resultset('Log')->search( { last_updated => \$since_string }, )->count() // 0;
 	}
 	my $jdata = { newLogcount => $count };
 	$self->success($jdata);