← Back to team overview

mvhub-dev team mailing list archive

[Branch ~mvhub-commit/mvhub/trunk] Rev 370: Merged fix_hard_coded_config

 

Merge authors:
  Lee Goodrich (leegoodrich)
Related merge proposals:
  https://code.launchpad.net/~leegoodrich/mvhub/fix_hard_coded_config/+merge/24163
  proposed by: Lee Goodrich (leegoodrich)
  review: Approve - Dan MacNeil (omacneil)
------------------------------------------------------------
revno: 370 [merge]
committer: Lee Goodrich <lgoodrich@xxxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-04-27 09:37:19 -0400
message:
  Merged fix_hard_coded_config
modified:
  lib-mvhub/lib/MVHub/AgencyAccount.pm
  lib-mvhub/lib/MVHub/Guide.pm
  lib-mvhub/lib/MVHub/Page.pm


--
lp:mvhub
https://code.launchpad.net/~mvhub-commit/mvhub/trunk

Your team MVHub Developers is subscribed to branch lp:mvhub.
To unsubscribe from this branch go to https://code.launchpad.net/~mvhub-commit/mvhub/trunk/+edit-subscription
=== modified file 'lib-mvhub/lib/MVHub/AgencyAccount.pm'
--- lib-mvhub/lib/MVHub/AgencyAccount.pm	2010-04-06 15:14:41 +0000
+++ lib-mvhub/lib/MVHub/AgencyAccount.pm	2010-04-26 19:58:07 +0000
@@ -120,6 +120,8 @@
         transfer_internal_style_sheet => 1,
         show_left_menu                => 1,
         show_search_bar               => 0,
+        site_code     => $self->get_config_param('SITE.website_code'),
+        site_location => $self->get_config_param('SITE.location'),
     );
 }
 

=== modified file 'lib-mvhub/lib/MVHub/Guide.pm'
--- lib-mvhub/lib/MVHub/Guide.pm	2010-03-17 14:09:50 +0000
+++ lib-mvhub/lib/MVHub/Guide.pm	2010-04-26 19:58:07 +0000
@@ -59,6 +59,8 @@
     $$output_ref = MVHub::Page::prepare_page(
         body            => $$output_ref,
         title           => $self->param('title'),
+        site_code       => $self->get_config_param('SITE.website_code'),
+        site_location   => $self->get_config_param('SITE.location'),
         show_left_menu  => 1,
         show_search_bar => 1,
         search_phrase   => $search_phrase,

=== modified file 'lib-mvhub/lib/MVHub/Page.pm'
--- lib-mvhub/lib/MVHub/Page.pm	2010-04-06 21:04:40 +0000
+++ lib-mvhub/lib/MVHub/Page.pm	2010-04-26 19:58:07 +0000
@@ -9,7 +9,6 @@
 use HTML::Template;
 
 use MVHub::Utils qw/assert/;
-use MVHub::Utils::ConfigSimple qw/create_config_from/;
 
 ####
 # IMPORTANT DEVELOPER'S NOTE: prepare_page() & print_page_and_exit()
@@ -21,10 +20,6 @@
 # the search phrase the user previously used:
 our $SEARCH_PHRASE_TAG = 'last_search_phrase';
 
-my $CFG
-    = MVHub::Utils::ConfigSimple::create_config_from( $ENV{MV_CONFIG_FILE} );
-my $SITE_CODE = $CFG->param('SITE.website_code');
-
 my $M_BODY_TAG               = 'mode_body';
 my $M_SHOW_SEARCH_BAR_TAG    = 'show_search_bar';
 my $M_OMIT_LEFT_MENU_TAG     = 'omit_left_menu';
@@ -65,6 +60,8 @@
     my $show_left_menu  = delete $args{show_left_menu};
     my $show_search_bar = delete $args{show_search_bar};
     my $search_phrase   = delete $args{search_phrase};
+    my $site_code       = delete $args{site_code};
+    my $site_location   = delete $args{site_location};
     my $agency_search   = delete
         $args{agency_search};  # 1: agency search, 0 (default): program search
     assert( ( scalar keys %args ) == 0, "Unknown arguments: @{[%args]}" );
@@ -86,7 +83,7 @@
     }
 
     my $show_nsp_left_menu = 0;
-    if ( $SITE_CODE eq 'nsp' ) {
+    if ( $site_code eq 'nsp' ) {
         $show_nsp_left_menu = 1;
     }
 
@@ -104,7 +101,7 @@
             $tmpl->param( $SB_CHECK_BY_AGENCY_TAG, $agency_search );
         }
         $tmpl->param( $SEARCH_PHRASE_TAG, $search_phrase );
-        $tmpl->param( 'site_location',    $CFG->param('SITE.location') );
+        $tmpl->param( 'site_location',    $site_location );
     }
 
     return $tmpl->output();