summaryrefslogtreecommitdiffstats
path: root/extensions/MyDashboard/lib/BugInterest.pm
diff options
context:
space:
mode:
authorPerl Tidy <perltidy@bugzilla.org>2018-12-05 21:38:52 +0100
committerDylan William Hardison <dylan@hardison.net>2018-12-05 23:49:08 +0100
commit8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch)
tree9d270f173330ca19700e0ba9f2ee931300646de1 /extensions/MyDashboard/lib/BugInterest.pm
parenta7bb5a65b71644d9efce5fed783ed545b9336548 (diff)
downloadbugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz
bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 'extensions/MyDashboard/lib/BugInterest.pm')
-rw-r--r--extensions/MyDashboard/lib/BugInterest.pm54
1 files changed, 26 insertions, 28 deletions
diff --git a/extensions/MyDashboard/lib/BugInterest.pm b/extensions/MyDashboard/lib/BugInterest.pm
index cf33900c5..2e427d612 100644
--- a/extensions/MyDashboard/lib/BugInterest.pm
+++ b/extensions/MyDashboard/lib/BugInterest.pm
@@ -25,47 +25,45 @@ use constant LIST_ORDER => 'id';
use constant NAME_FIELD => 'id';
# turn off auditing and exclude these objects from memcached
-use constant { AUDIT_CREATES => 0,
- AUDIT_UPDATES => 0,
- AUDIT_REMOVES => 0,
- USE_MEMCACHED => 0 };
+use constant {
+ AUDIT_CREATES => 0,
+ AUDIT_UPDATES => 0,
+ AUDIT_REMOVES => 0,
+ USE_MEMCACHED => 0
+};
#####################################################################
# Provide accessors for our columns
#####################################################################
-sub id { return $_[0]->{id} }
-sub bug_id { return $_[0]->{bug_id} }
-sub user_id { return $_[0]->{user_id} }
+sub id { return $_[0]->{id} }
+sub bug_id { return $_[0]->{bug_id} }
+sub user_id { return $_[0]->{user_id} }
sub modification_time { return $_[0]->{modification_time} }
sub mark {
- my ($class, $user_id, $bug_id, $timestamp) = @_;
+ my ($class, $user_id, $bug_id, $timestamp) = @_;
- my ($interest) = @{ $class->match({ user_id => $user_id,
- bug_id => $bug_id }) };
- if ($interest) {
- $interest->set(modification_time => $timestamp);
- $interest->update();
- return $interest;
- }
- else {
- return $class->create({
- user_id => $user_id,
- bug_id => $bug_id,
- modification_time => $timestamp,
- });
- }
+ my ($interest) = @{$class->match({user_id => $user_id, bug_id => $bug_id})};
+ if ($interest) {
+ $interest->set(modification_time => $timestamp);
+ $interest->update();
+ return $interest;
+ }
+ else {
+ return $class->create({
+ user_id => $user_id, bug_id => $bug_id, modification_time => $timestamp,
+ });
+ }
}
sub unmark {
- my ($class, $user_id, $bug_id) = @_;
+ my ($class, $user_id, $bug_id) = @_;
- my ($interest) = @{ $class->match({ user_id => $user_id,
- bug_id => $bug_id }) };
- if ($interest) {
- $interest->remove_from_db();
- }
+ my ($interest) = @{$class->match({user_id => $user_id, bug_id => $bug_id})};
+ if ($interest) {
+ $interest->remove_from_db();
+ }
}
1;