Show
Ignore:
Timestamp:
06/16/07 22:33:16 (18 months ago)
Author:
ilmari
Message:

Preferences cleanup
- Separate preference defaulting from cookie parsing.
- Remove duplicate preference defaulting from the cgi.
- Use the prefs template variable in the template.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/CGI.pm

    r992 r1084  
    156156        %data = $cookies{$cookie_name}->value; # call ->value in list context 
    157157    } 
     158 
     159    return $class->get_prefs_from_hash( %data ); 
     160} 
     161 
     162sub get_prefs_from_hash { 
     163    my ($class, %data) = @_; 
    158164    my %defaults = ( 
    159165                     username                   => "Anonymous",