From d4a86e6b292aca70aacc49248884c64235dfa9a5 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 13 Aug 2015 12:03:42 +0800 Subject: Bug 1192688 - backout non-schema changes --- Bugzilla/User/APIKey.pm | 7 ++----- template/en/default/account/prefs/apikey.html.tmpl | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Bugzilla/User/APIKey.pm b/Bugzilla/User/APIKey.pm index d89203e68..c37cccb92 100644 --- a/Bugzilla/User/APIKey.pm +++ b/Bugzilla/User/APIKey.pm @@ -13,7 +13,7 @@ use strict; use parent qw(Bugzilla::Object); use Bugzilla::User; -use Bugzilla::Util qw(generate_random_password trim remote_ip); +use Bugzilla::Util qw(generate_random_password trim); use Bugzilla::Error; ##################################################################### @@ -29,10 +29,9 @@ use constant DB_COLUMNS => qw( description revoked last_used - last_used_ip ); -use constant UPDATE_COLUMNS => qw(description revoked last_used last_used_ip); +use constant UPDATE_COLUMNS => qw(description revoked last_used); use constant VALIDATORS => { api_key => \&_check_api_key, app_id => \&_check_app_id, @@ -56,7 +55,6 @@ sub app_id { return $_[0]->{app_id} } sub description { return $_[0]->{description} } sub revoked { return $_[0]->{revoked} } sub last_used { return $_[0]->{last_used} } -sub last_used_ip { return $_[0]->{last_used_ip} } # Helpers sub user { @@ -70,7 +68,6 @@ sub update_last_used { my $timestamp = shift || Bugzilla->dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)'); $self->set('last_used', $timestamp); - $self->set('last_used_ip', remote_ip()); $self->update; } diff --git a/template/en/default/account/prefs/apikey.html.tmpl b/template/en/default/account/prefs/apikey.html.tmpl index 8b740cf1e..ff9ed697a 100644 --- a/template/en/default/account/prefs/apikey.html.tmpl +++ b/template/en/default/account/prefs/apikey.html.tmpl @@ -41,9 +41,7 @@ here.

value="[% api_key.description FILTER html %]"> [% IF api_key.last_used %] - [% api_key.last_used FILTER time %] - [% IF api_key.last_used_ip %] ([% api_key.last_used_ip FILTER html %]) [% END %] - + [% api_key.last_used FILTER time %] [% ELSE %] never used [% END %] -- cgit v1.2.3-24-g4f1b