web/modules/grail/Grail/Canvas.pm | 1
web/modules/rhn/MANIFEST | 2
web/modules/rhn/RHN/DB/Grail.pm | 88 ---------------------------------
web/modules/rhn/RHN/Grail.pm | 42 ---------------
web/modules/rhn/RHN/Mail.pm | 24 ---------
web/modules/sniglets/Sniglets/Users.pm | 1
web/spacewalk-web.spec | 1
7 files changed, 159 deletions(-)
New commits:
commit cc90057426168337405cb05a5d352b4e04b3bcf2
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:08:14 2010 +0100
Previous removals made RHN::Grail and RHN::DB::Grail noops, removing.
diff --git a/web/modules/grail/Grail/Canvas.pm b/web/modules/grail/Grail/Canvas.pm
index e40c93b..b43ce1e 100644
--- a/web/modules/grail/Grail/Canvas.pm
+++ b/web/modules/grail/Grail/Canvas.pm
@@ -17,7 +17,6 @@ use strict;
package Grail::Canvas;
use Grail::Component;
-use RHN::Grail;
use Carp;
@Grail::Canvas::ISA = qw/Grail::Component/;
diff --git a/web/modules/rhn/MANIFEST b/web/modules/rhn/MANIFEST
index ce301a0..c543ae8 100644
--- a/web/modules/rhn/MANIFEST
+++ b/web/modules/rhn/MANIFEST
@@ -10,7 +10,6 @@ RHN/DB/Action.pm
RHN/DB/ChannelEditor.pm
RHN/DB/Channel.pm
RHN/DB/Errata.pm
-RHN/DB/Grail.pm
RHN/DB/JoinClass.pm
RHN/DB/Notes.pm
RHN/DB/Org.pm
@@ -34,7 +33,6 @@ RHN/DB/UserGroup.pm
RHN/DB/User.pm
RHN/Errata.pm
RHN/Exception.pm
-RHN/Grail.pm
RHN/Mail.pm
RHN/Org.pm
RHN/Package.pm
diff --git a/web/modules/rhn/RHN/DB/Grail.pm b/web/modules/rhn/RHN/DB/Grail.pm
deleted file mode 100644
index b637553..0000000
--- a/web/modules/rhn/RHN/DB/Grail.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::Grail;
-use RHN::DB;
-
-1;
diff --git a/web/modules/rhn/RHN/Grail.pm b/web/modules/rhn/RHN/Grail.pm
deleted file mode 100644
index 488f1ea..0000000
--- a/web/modules/rhn/RHN/Grail.pm
+++ /dev/null
@@ -1,20 +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::Grail;
-
-1;
diff --git a/web/modules/sniglets/Sniglets/Users.pm
b/web/modules/sniglets/Sniglets/Users.pm
index 40f4c87..eec09c4 100644
--- a/web/modules/sniglets/Sniglets/Users.pm
+++ b/web/modules/sniglets/Sniglets/Users.pm
@@ -21,7 +21,6 @@ use PXT::Utils;
use RHN::User;
use RHN::Org;
-use RHN::Grail;
use PXT::HTML;
use RHN::UserActions;
use RHN::Exception qw/throw catchable/;
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index 72db751..3b57581 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -169,7 +169,6 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorlib}/RHN/FileList.pm
%{perl_vendorlib}/RHN/Form.pm
%{perl_vendorlib}/RHN/Form/
-%{perl_vendorlib}/RHN/Grail.pm
%{perl_vendorlib}/RHN/I18N.pm
%{perl_vendorlib}/RHN/KSTree.pm
%{perl_vendorlib}/RHN/Kickstart.pm
commit bff563dc580ac06b788b07f8c6fc4713f085f65d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:06:21 2010 +0100
Removal of components_for_user and set_user_components in RHN::Grail made them unused
in RHN::DB::Grail as well, removing.
diff --git a/web/modules/rhn/RHN/DB/Grail.pm b/web/modules/rhn/RHN/DB/Grail.pm
index 4ef0b39..b637553 100644
--- a/web/modules/rhn/RHN/DB/Grail.pm
+++ b/web/modules/rhn/RHN/DB/Grail.pm
@@ -18,50 +18,4 @@ use strict;
package RHN::DB::Grail;
use RHN::DB;
-sub components_for_user {
- my $class = shift;
- my $user_id = shift;
-
- my $dbh = RHN::DB->connect;
- my $query = "SELECT component_pkg, component_mode FROM rhnGrailComponentChoices
WHERE user_id = ? ORDER BY ordering";
- my $sth = $dbh->prepare($query);
- $sth->execute($user_id);
-
- my @ret;
- while (my ($pkg, $mode) = $sth->fetchrow) {
- push @ret, [ $pkg, $mode ];
- }
-
- return @ret;
-}
-
-sub set_user_components {
- my $class = shift;
- my $uid = shift;
- my @components = @_;
-
- my $dbh = RHN::DB->connect;
- my $query = <<EOQ;
-DELETE FROM rhnGrailComponentChoices WHERE user_id = ?
-EOQ
- my $sth = $dbh->prepare($query);
- $sth->execute($uid);
-
- $query = <<EOQ;
-INSERT INTO rhnGrailComponentChoices
- SELECT ?, ?, component_pkg, component_mode
- FROM rhnGrailComponents GC
- WHERE GC.id = ?
-EOQ
- $sth = $dbh->prepare($query);
-
- my $i = 0;
- foreach (@components) {
- $sth->execute($uid, $i++, $_);
- }
-
- $dbh->commit;
-
-}
-
1;
commit 19fb72fa640e3bca273f038c41954134e359dd79
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:05:35 2010 +0100
components_for_user and set_user_components is not called from anywhere, removing.
diff --git a/web/modules/rhn/RHN/Grail.pm b/web/modules/rhn/RHN/Grail.pm
index c1feeb2..488f1ea 100644
--- a/web/modules/rhn/RHN/Grail.pm
+++ b/web/modules/rhn/RHN/Grail.pm
@@ -17,19 +17,4 @@ use strict;
package RHN::Grail;
-use RHN::DB::Grail;
-
-sub components_for_user {
- my $class = shift;
- my $user = shift;
-
- return RHN::DB::Grail->components_for_user($user);
-}
-
-sub set_user_components {
- my $class = shift;
-
- RHN::DB::Grail->set_user_components(@_);
-}
-
1;
commit 1d96c4ebc19d9db830ea2ad682e8206c51bef335
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:04:19 2010 +0100
Removal of components_available_for_user made components_available unused, removing.
diff --git a/web/modules/rhn/RHN/DB/Grail.pm b/web/modules/rhn/RHN/DB/Grail.pm
index 32eaa2f..4ef0b39 100644
--- a/web/modules/rhn/RHN/DB/Grail.pm
+++ b/web/modules/rhn/RHN/DB/Grail.pm
@@ -35,27 +35,6 @@ sub components_for_user {
return @ret;
}
-sub components_available {
- my $class = shift;
-
- my $dbh = RHN::DB->connect;
- my $query = <<EOQ;
- SELECT component_pkg, component_mode, config_mode, component_label, NVL(UGT.label,
''), GC.id
- FROM rhnGrailComponents GC, rhnUserGroupType UGT
- WHERE UGT.id(+) = role_required
- ORDER BY UPPER(component_label), component_pkg, component_mode
-EOQ
- my $sth = $dbh->prepare($query);
- $sth->execute;
-
- my @ret;
- while (my @row = $sth->fetchrow) {
- push @ret, [ @row ];
- }
-
- return @ret;
-}
-
sub set_user_components {
my $class = shift;
my $uid = shift;
commit 621f611fe267296d1ef8a87167be4a1e32331bc5
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:03:41 2010 +0100
components_available_for_user is not called from anywhere, removing.
diff --git a/web/modules/rhn/RHN/Grail.pm b/web/modules/rhn/RHN/Grail.pm
index 4771ae1..c1feeb2 100644
--- a/web/modules/rhn/RHN/Grail.pm
+++ b/web/modules/rhn/RHN/Grail.pm
@@ -26,13 +26,6 @@ sub components_for_user {
return RHN::DB::Grail->components_for_user($user);
}
-sub components_available_for_user {
- my $class = shift;
- my $user = shift;
-
- return grep { $_->[4] ? $user->is($_->[4]) : 1 }
RHN::DB::Grail->components_available;
-}
-
sub set_user_components {
my $class = shift;
commit 497f50dfe7f3d934c60c340ee88cce862941cdf7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 5 18:03:05 2010 +0100
send_raw is not called from anywhere, removing.
diff --git a/web/modules/rhn/RHN/Mail.pm b/web/modules/rhn/RHN/Mail.pm
index 542ebb2..a4cd355 100644
--- a/web/modules/rhn/RHN/Mail.pm
+++ b/web/modules/rhn/RHN/Mail.pm
@@ -22,30 +22,6 @@ use Params::Validate;
my @header_order = qw/To From Subject/;
my $DEFAULT_FROM = PXT::Config->get('default_mail_from');
-sub send_raw {
- my $class = shift;
- my $data = shift;
-
- my $sendmail_from = $DEFAULT_FROM;
- my @command = ('/usr/sbin/sendmail', '-t', '-oi',
"-f'$sendmail_from'");
-
- $ENV{PATH} = "/bin:/usr/bin";
-
- my $command = join(' ', @command);
- open SM, "|$command"
- or die "Can't spawn sendmail: $!";
-
- print SM $data;
- if (not close SM) {
- if ($!) {
- die "Can't close sendmail: $!";
- }
- else {
- warn "sendmail returned failure code $?";
- }
- }
-}
-
# given a list of possible recipients, validate they're allowed to receive
# email in the current environment
sub validate_allowed_recipients {