web/modules/rhn/RHN/DB/Notes.pm | 30 -----------------------
web/modules/rhn/RHN/DataSource.pm | 48 -------------------------------------
web/modules/rhn/RHN/Form.pm | 11 --------
web/modules/rhn/RHN/SearchTypes.pm | 46 -----------------------------------
web/modules/rhn/RHN/ServerNotes.pm | 22 ----------------
5 files changed, 157 deletions(-)
New commits:
commit 574d376acda1c69ea22dd6e08acfa1e2a4057f39
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 14:02:06 2010 +0100
Removal of add_category mad parse_mode unused, removing.
diff --git a/web/modules/rhn/RHN/SearchTypes.pm b/web/modules/rhn/RHN/SearchTypes.pm
index 3dccd1a..7b2fed5 100644
--- a/web/modules/rhn/RHN/SearchTypes.pm
+++ b/web/modules/rhn/RHN/SearchTypes.pm
@@ -120,22 +120,6 @@ sub new {
return $self;
}
-sub parse_mode {
- my $self = shift;
- my %params = @_;
-
- throw "No mode name" unless $params{-name};
- throw "No mode label" unless $params{-label};
-
- return {
- mode_choice_name => $params{-name},
- mode_label => $params{-label},
- mode_column_name => $params{-column_name} || $params{-label},
- acl => $params{-acl},
- acl_mixins => $params{-acl_mixins},
- };
-}
-
sub render_search_selectbox {
my $self = shift;
my %params = validate(@_, {pxt => 1, search_type => 0});
commit fd4c37776dac086a1f961b1134d68a49ab3ec06e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 14:01:26 2010 +0100
set_min_search_length, valid_search_string, and add_category not referenced,
removing.
diff --git a/web/modules/rhn/RHN/SearchTypes.pm b/web/modules/rhn/RHN/SearchTypes.pm
index 10d5988..3dccd1a 100644
--- a/web/modules/rhn/RHN/SearchTypes.pm
+++ b/web/modules/rhn/RHN/SearchTypes.pm
@@ -54,11 +54,6 @@ sub acl_test {
return $acl_parser->eval_acl($params{pxt}, $params{acl_string});
}
-sub set_min_search_length {
- my $self = shift;
- $self->{min_search_length} = shift;
-}
-
sub set_name {
my $self = shift;
@@ -110,12 +105,6 @@ sub label_to_column_name {
return $matches[0]->{mode_column_name};
}
-sub valid_search_string {
- my $self = shift;
- my $search_str = shift;
-
- return;
-}
package RHN::SearchType::System;
@@ -131,25 +120,6 @@ sub new {
return $self;
}
-sub add_category {
- my $self = shift;
- my %params = @_;
-
- throw "No category label" unless $params{-label};
- my $modes = $params{-modes} || [];
-
- throw "modes param should be array ref"
- unless (ref $modes eq 'ARRAY');
-
- push @{$self->{categories}},
- {
- label => $params{-label},
- modes => [ map { $self->parse_mode(%{$_}) } @{$modes} ],
- acl => $params{-acl},
- acl_mixins => $params{-acl_mixins},
- };
-}
-
sub parse_mode {
my $self = shift;
my %params = @_;
commit 2c737613371fcd98434708bfab69dbed179246c9
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 14:00:03 2010 +0100
lookup_value not used anywhere, removing.
diff --git a/web/modules/rhn/RHN/Form.pm b/web/modules/rhn/RHN/Form.pm
index 5820d39..363baff 100644
--- a/web/modules/rhn/RHN/Form.pm
+++ b/web/modules/rhn/RHN/Form.pm
@@ -180,17 +180,6 @@ sub lookup_widget {
return $self->{widgets_by_label}->{$label};
}
-sub lookup_value {
- my $self = shift;
- my $label = shift;
-
- my $widg = $self->{widgets_by_label}->{$label};
-
- return undef unless $widg;
-
- return $widg->value;
-}
-
sub clone_widgets {
my $self = shift;
commit e4bfa0642b175389611b0f41805da26e8004417d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 13:59:03 2010 +0100
Removal of server_notes made notes_by_col unused, removing.
diff --git a/web/modules/rhn/RHN/DB/Notes.pm b/web/modules/rhn/RHN/DB/Notes.pm
index 97df80f..de55db0 100644
--- a/web/modules/rhn/RHN/DB/Notes.pm
+++ b/web/modules/rhn/RHN/DB/Notes.pm
@@ -156,36 +156,6 @@ sub commit {
delete $self->{":modified:"};
}
-# arg1 = column name
-# arg2 = column value
-# arg3 = columns wanted
-# return list of rows where column name has column value
-sub notes_by_col {
- my $self = shift;
- my $col = shift;
- my $colval = shift;
- my @cols = @_;
-
- my $dbh = RHN::DB->connect;
- my $query = sprintf <<EOS, join(", ", map { "T.$_" }
@cols),$self->table,$col;
-SELECT %s
-FROM %s T
-WHERE T.%s = ?
-ORDER BY T.created
-EOS
-
- my $sth = $dbh->prepare($query);
- $sth->execute($colval);
-
- my @ret;
-
- while (my (@row) = $sth->fetchrow) {
- push @ret, [ @row ];
- }
-
- return @ret;
-}
-
#
# Generate getter/setters
#
commit 3345f8ca7854e0455b4a308f6a05a18bb4a07961
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 13:57:28 2010 +0100
lookup_note and server_notes are not used anywhere, removing.
diff --git a/web/modules/rhn/RHN/ServerNotes.pm b/web/modules/rhn/RHN/ServerNotes.pm
index 0877214..0929ceb 100644
--- a/web/modules/rhn/RHN/ServerNotes.pm
+++ b/web/modules/rhn/RHN/ServerNotes.pm
@@ -37,33 +37,11 @@ sub lookup {
}
}
-sub lookup_note {
- my $class = shift;
-
- warn "deprecated use of $class->lookup_foo from (" . join(', ',
caller) . "). Using $class->lookup instead\n";
-
- return $class->lookup(@_);
-}
-
sub create {
my $class = shift;
return RHN::DB::ServerNotes->create_note(@_);
}
-sub server_notes {
- my $self = shift;
-
- my $id;
- if(ref $self) {
- $id = $self->id;
- }
- else {
- $id = shift;
- }
-
- return RHN::DB::ServerNotes->notes_by_col("server_id",$id,@_);
-}
-
1;
commit c21d07e85f8eeaaf1e160ebecc1ecffb927280e8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 13:43:38 2010 +0100
available_datasource_files not used, removing as dead code.
diff --git a/web/modules/rhn/RHN/DataSource.pm b/web/modules/rhn/RHN/DataSource.pm
index b24dbc7..569fc81 100644
--- a/web/modules/rhn/RHN/DataSource.pm
+++ b/web/modules/rhn/RHN/DataSource.pm
@@ -255,35 +255,4 @@ sub collate_data {
return $data;
}
-# static method to return a list of all the available datasources.
-# used by test suite and by query performance metric script
-
-sub available_datasource_files {
- my $class = shift;
- my @extra_entries = @_;
-
- my $core_dir = $INC{"RHN/DB/DataSource.pm"};
- $core_dir =~ s(\.pm$)(/xml);
-
- my @ret;
-
- for my $entry ($core_dir, @extra_entries) {
- my @files;
-
- if (-d $entry) {
- my $dir = $entry;
- opendir DIR, $dir or die "opendir $dir: $!";
- push @files, grep { -f "$dir/$_" } readdir DIR;
- closedir DIR;
- }
- else {
- push @files, $entry;
- }
-
- push @ret, map { s(\.xml$)(); $_ } grep { m(\.xml$) } @files;
- }
-
- return sort @ret;
-}
-
1;
commit c9dfef03e7b8d185f26a9b175b02ed4484fc18b8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 13:38:44 2010 +0100
get_query_params not used, removing as dead code.
diff --git a/web/modules/rhn/RHN/DataSource.pm b/web/modules/rhn/RHN/DataSource.pm
index 28d8439..b24dbc7 100644
--- a/web/modules/rhn/RHN/DataSource.pm
+++ b/web/modules/rhn/RHN/DataSource.pm
@@ -103,14 +103,6 @@ sub get_query_body {
return $mode_data->{query}->{body};
}
-sub get_query_params {
- my $self = shift;
-
- my $mode_data = $self->lookup_mode_data;
-
- return $mode_data->{query}->{params};
-}
-
sub execute_query {
my $self = shift;
my %params = @_;
commit 4d7720d80e58ec533f82e3932db7bf7ef9177962
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 13:35:33 2010 +0100
execute_one not used, removing as dead code.
diff --git a/web/modules/rhn/RHN/DataSource.pm b/web/modules/rhn/RHN/DataSource.pm
index 846f581..28d8439 100644
--- a/web/modules/rhn/RHN/DataSource.pm
+++ b/web/modules/rhn/RHN/DataSource.pm
@@ -96,15 +96,6 @@ sub required_params {
return @uniq_params;
}
-sub execute_one {
- my $self = shift;
-
- my $ret = $self->execute_query(@_);
- throw "Too many rows returned from query (mode $self->{mode})" if @$ret
> 1;
-
- return @$ret > 0 ? $ret->[0] : ();
-}
-
sub get_query_body {
my $self = shift;