From 9cfee8ff605382a6ce8503a79c19f17e03d19aa9 Mon Sep 17 00:00:00 2001 From: Daniel Tiefnig Date: Mon, 4 Apr 2011 00:33:05 +0000 Subject: [PATCH] filtering for usr preferences in preferences list this depends on latest ossbss trunk code --- debian/control | 2 +- lib/admin/Controller/subscriber.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index e0221cc..25c272b 100644 --- a/debian/control +++ b/debian/control @@ -26,7 +26,7 @@ Description: Configuration templates for the web-based admin interface Package: ngcp-www-admin Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, ngcp-ossbss-billing (>= 2.1.1), ngcp-ossbss-voip (>= 2.1.1), libcatalyst-perl, libcatalyst-modules-perl, libcatalyst-engine-apache-perl, ngcp-templates-www-admin +Depends: ${shlibs:Depends}, ${misc:Depends}, ngcp-ossbss-billing (>= 2.1.1), ngcp-ossbss-voip (>= 3.1.0), libcatalyst-perl, libcatalyst-modules-perl, libcatalyst-engine-apache-perl, ngcp-templates-www-admin Description: administration framework to configure the Sipwise NGCP This package provides an administration framework which is used to configure the Sipwise NGCP. diff --git a/lib/admin/Controller/subscriber.pm b/lib/admin/Controller/subscriber.pm index b36330f..6494ee8 100644 --- a/lib/admin/Controller/subscriber.pm +++ b/lib/admin/Controller/subscriber.pm @@ -488,7 +488,7 @@ sub preferences : Local { return unless $c->model('Provisioning')->call_prov( $c, 'voip', 'get_preferences', undef, \$db_prefs ); - $c->session->{voip_preferences} = $db_prefs if eval { @$db_prefs }; + $c->session->{voip_preferences} = [ grep { $$_{usr_pref} } @$db_prefs ] if eval { @$db_prefs }; ### restore data entered by the user ### @@ -640,6 +640,7 @@ sub update_preferences : Local { foreach my $db_pref (eval { @$db_prefs }) { + next unless $$db_pref{usr_pref}; next if $$db_pref{read_only}; if($$db_pref{preference} eq 'cfu'