rel-eng/packages/spacewalk-web | 2 +-
web/modules/rhn/RHN/DB/User.pm | 5 +++--
web/spacewalk-web.spec | 5 ++++-
3 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 4a66496a0f3aaf79af1aceee1404bbbc2d32d37a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Oct 15 14:11:32 2013 +0200
Automatic commit of package [spacewalk-web] release [2.1.25-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 607a390..c875299 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-2.1.24-1 web/
+2.1.25-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index cf986d8..ca32265 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -4,7 +4,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 2.1.24
+Version: 2.1.25
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk/
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -271,6 +271,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue Oct 15 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.25-1
+- 1018194 - convert empty string to NULL
+
* Wed Oct 09 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.24-1
- cleaning up old svn Ids
commit 31417d7596d416002ddd97b8b4ccb65b2f2b0df4
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Oct 15 14:06:39 2013 +0200
1018194 - convert empty string to NULL
diff --git a/web/modules/rhn/RHN/DB/User.pm b/web/modules/rhn/RHN/DB/User.pm
index bb97097..16870fc 100644
--- a/web/modules/rhn/RHN/DB/User.pm
+++ b/web/modules/rhn/RHN/DB/User.pm
@@ -1038,8 +1038,9 @@ sub verify_channel_role {
my $sth = $dbh->prepare(<<EOQ);
select rhn_channel.user_role_check(:cid, :user_id, :role) from dual
EOQ
-
- my $result = $sth->execute_h(cid => $channel_id,
+ # channel_id is always > 0 because rhn_channel_id_seq starts at 101
+ # so next ternary operator is safe way to turn '' to NULL
+ my $result = $sth->execute_h(cid => ($channel_id ? $channel_id : undef),
user_id => $self->id,
role => $role,
);