web/modules/rhn/RHN/ConfigFile.pm | 24 ---------
web/modules/rhn/RHN/DB/ConfigFile.pm | 82 -------------------------------
web/modules/rhn/RHN/DB/FileList.pm | 70 --------------------------
web/modules/sniglets/Sniglets/Servers.pm | 1
web/spacewalk-web.spec | 1
5 files changed, 178 deletions(-)
New commits:
commit b195c1fa009989b0cb8a341ead21cc568c292c0d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 16:53:00 2010 +0100
Previous removals made RHN::ConfigFile and RHN::DB::ConfigFile empty, likely not
needed, removing.
diff --git a/web/modules/rhn/RHN/ConfigFile.pm b/web/modules/rhn/RHN/ConfigFile.pm
deleted file mode 100644
index 277bb71..0000000
--- a/web/modules/rhn/RHN/ConfigFile.pm
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use strict;
-
-package RHN::ConfigFile;
-
-use RHN::DB::ConfigFile;
-our @ISA = qw/RHN::DB::ConfigFile/;
-
-1;
-
diff --git a/web/modules/rhn/RHN/DB/ConfigFile.pm b/web/modules/rhn/RHN/DB/ConfigFile.pm
deleted file mode 100644
index c2d60e1..0000000
--- a/web/modules/rhn/RHN/DB/ConfigFile.pm
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-
-use strict;
-
-package RHN::DB::ConfigFile;
-use RHN::DB;
-
-1;
diff --git a/web/modules/sniglets/Sniglets/Servers.pm
b/web/modules/sniglets/Sniglets/Servers.pm
index e836214..3d287a5 100644
--- a/web/modules/sniglets/Sniglets/Servers.pm
+++ b/web/modules/sniglets/Sniglets/Servers.pm
@@ -40,7 +40,6 @@ use RHN::Form;
use RHN::Form::Widget::Select;
use RHN::Form::Widget::CheckboxGroup;
use RHN::SatelliteCert;
-use RHN::ConfigFile;
use RHN::Kickstart::Session;
use Sniglets::Forms;
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 4710799..c60a656 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -152,7 +152,6 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorlib}/RHN/Cleansers.pm
%{perl_vendorlib}/RHN/Command.pm
%{perl_vendorlib}/RHN/ConfigChannel.pm
-%{perl_vendorlib}/RHN/ConfigFile.pm
%{perl_vendorlib}/RHN/ConfigRevision.pm
%{perl_vendorlib}/RHN/ContactGroup.pm
%{perl_vendorlib}/RHN/ContactMethod.pm
commit d19a1ac5019da509554dad3add81742154c5be73
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 16:50:39 2010 +0100
Removal of set_file_list made path_to_id unused, removing.
diff --git a/web/modules/rhn/RHN/DB/ConfigFile.pm b/web/modules/rhn/RHN/DB/ConfigFile.pm
index 0012f4b..c2d60e1 100644
--- a/web/modules/rhn/RHN/DB/ConfigFile.pm
+++ b/web/modules/rhn/RHN/DB/ConfigFile.pm
@@ -18,12 +18,4 @@ use strict;
package RHN::DB::ConfigFile;
use RHN::DB;
-# given a path, return the rhnConfigFileName id
-sub path_to_id {
- my $class = shift;
-
- my $dbh = RHN::DB->connect;
- return $dbh->call_function('lookup_config_filename', @_);
-}
-
1;
commit b879dfd0c1a6567b45a3f29b41a39937dfc3c9d7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 16:49:49 2010 +0100
get_file_list, set_file_list, and delete_list not called from anywhere, removing.
diff --git a/web/modules/rhn/RHN/DB/FileList.pm b/web/modules/rhn/RHN/DB/FileList.pm
index 95c8dc4..925f5e3 100644
--- a/web/modules/rhn/RHN/DB/FileList.pm
+++ b/web/modules/rhn/RHN/DB/FileList.pm
@@ -31,65 +31,6 @@ my @filelist_fields = qw/ID LABEL ORG_ID CREATED MODIFIED/;
my $fl = new RHN::DB::TableClass("rhnFileList", "FL", "",
@filelist_fields);
-sub get_file_list {
- my $self = shift;
-
- my $dbh = RHN::DB->connect;
- my $query = <<EOQ;
-SELECT CFN.path
- FROM rhnConfigFileName CFN,
- rhnFileListMembers FLM
- WHERE CFN.id = FLM.config_file_name_id
- AND FLM.file_list_id = :id
-EOQ
- my $sth;
-
- $sth = $dbh->prepare($query);
- $sth->execute_h(id => $self->id);
-
- my @flist;
- while (my @row = $sth->fetchrow) {
- push @flist, $row[0];
- }
-
- return \@flist;
-}
-
-sub set_file_list {
- my $self = shift;
- my %params = validate(@_, { file_list => { type => ARRAYREF }});
-
- my $dbh = RHN::DB->connect;
- my $query;
- my $sth;
- my @file_list = grep {$_} @{$params{file_list}};
-
- $query = <<EOQ;
-DELETE FROM rhnFileListMembers FLM
- WHERE FLM.FILE_LIST_ID = :flid
-EOQ
-
- $sth = $dbh->prepare($query);
- $sth->execute_h(flid => $self->id);
-
- $query = <<EOQ;
-INSERT INTO rhnFileListMembers
- (file_list_id, config_file_name_id)
- VALUES (:flid, :cfnid)
-EOQ
- $sth = $dbh->prepare($query);
-
- foreach my $path (@file_list) {
- my $cfnid = RHN::ConfigFile->path_to_id($path);
- $sth->execute_h(flid => $self->id, cfnid =>$cfnid);
- }
-
- $sth->finish;
- $dbh->commit;
-
- return;
-}
-
# build some accessors
foreach my $field ($fl->method_names) {
my $sub = q {
@@ -196,15 +137,4 @@ sub commit {
delete $self->{":modified:"};
}
-sub delete_list {
- my $self = shift;
-
- my $dbh = RHN::DB->connect;
-
- my $sth = $dbh->prepare("DELETE FROM rhnFileList WHERE id = :flid");
- $sth->execute_h(flid => $self->id);
- $sth->finish;
- $dbh->commit;
-}
-
1;
commit 5c171de052a3b6fc2b5f25c46937e47f1d2eb89a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 16:00:45 2010 +0100
Removing bunch of unused methods from RHN::DB::ConfigFile:
id_to_latest_revision_crid
file_name_id_to_path
delete_file_path
file_id_to_path
diff --git a/web/modules/rhn/RHN/DB/ConfigFile.pm b/web/modules/rhn/RHN/DB/ConfigFile.pm
index 7ea4a20..0012f4b 100644
--- a/web/modules/rhn/RHN/DB/ConfigFile.pm
+++ b/web/modules/rhn/RHN/DB/ConfigFile.pm
@@ -18,22 +18,6 @@ use strict;
package RHN::DB::ConfigFile;
use RHN::DB;
-# given a config file id, return the crid of the latest revision, if any
-sub id_to_latest_revision_crid {
- my $class = shift;
- my $cf_id = shift;
-
- my $dbh = RHN::DB->connect;
-
- my $sth = $dbh->prepare('SELECT CFt.latest_config_revision_id FROM rhnConfigFile
CFt WHERE CFT.id = :cf_id');
- $sth->execute_h(cf_id => $cf_id);
-
- my ($ret) = $sth->fetchrow;
- $sth->finish;
-
- return $ret;
-}
-
# given a path, return the rhnConfigFileName id
sub path_to_id {
my $class = shift;
@@ -42,41 +26,4 @@ sub path_to_id {
return $dbh->call_function('lookup_config_filename', @_);
}
-# given an id, return the rhnConfigFileName path
-sub file_name_id_to_path {
- my $class = shift;
-
- my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare("SELECT path FROM rhnConfigFileName WHERE id =
?");
- $sth->execute(@_);
-
- my ($ret) = $sth->fetchrow;
- $sth->finish;
-
- return $ret;
-}
-
-# given an rhnConfigFile id, delete it
-sub delete_file_path {
- my $self = shift;
- my $cfid = shift;
-
- my $dbh = RHN::DB->connect;
- my $sth = $dbh->call_procedure('rhn_config.delete_file', $cfid);
- $dbh->commit;
-}
-
-# given a config file id, find the path
-sub file_id_to_path {
- my $class = shift;
-
- my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare("SELECT config_file_name_id FROM rhnConfigFile WHERE id
= ?");
- $sth->execute(@_);
-
- my ($ret) = $sth->fetchrow;
- $sth->finish;
- return $class->file_name_id_to_path($ret);
-}
-
1;