Skip to content

Commit

Permalink
cleanup unused variables
Browse files Browse the repository at this point in the history
(cherry picked from commit c0549bd)
  • Loading branch information
sni committed Feb 3, 2025
1 parent aa634b4 commit d72ef91
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
5 changes: 0 additions & 5 deletions lib/Thruk/Backend/Provider/Mysql.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,6 @@ sub _check_lock {

# check if there is already a update / import running
my $skip = 0;
my $cache_version = 1;
eval {
$dbh->do('LOCK TABLES `'.$prefix.'_status` READ') unless $c->config->{'logcache_pxc_strict_mode'};
my @pids = @{$dbh->selectcol_arrayref('SELECT value FROM `'.$prefix.'_status` WHERE status_id = 2 LIMIT 1')};
Expand All @@ -1524,10 +1523,6 @@ sub _check_lock {
$skip = 1;
}
}
my @versions = @{$dbh->selectcol_arrayref('SELECT value FROM `'.$prefix.'_status` WHERE status_id = 4 LIMIT 1')};
if(scalar @versions > 0 and $versions[0]) {
$cache_version = $versions[0];
}
};
$dbh->do('UNLOCK TABLES') unless $c->config->{'logcache_pxc_strict_mode'};
if($@) {
Expand Down
6 changes: 1 addition & 5 deletions lib/Thruk/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1888,13 +1888,9 @@ sub absolute_url {
$host =~ s/\/$//mx; # remove last /
$fullpath =~ s/\?.*$//mx;
$fullpath =~ s/^\///mx;
my($path,$file) = ('', '');
my $path = '';
if($fullpath =~ m/^(.+)\/(.*)$/mx) {
$path = $1;
$file = $2;
}
else {
$file = $fullpath;
}
$path =~ s/^\///mx; # remove first /

Expand Down

0 comments on commit d72ef91

Please sign in to comment.