projects
/
MojoFacets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix timefmt load into session position
[MojoFacets.git]
/
lib
/
MojoFacets
/
Data.pm
diff --git
a/lib/MojoFacets/Data.pm
b/lib/MojoFacets/Data.pm
index
eceafb7
..
c715f6f
100644
(file)
--- a/
lib/MojoFacets/Data.pm
+++ b/
lib/MojoFacets/Data.pm
@@
-264,10
+264,6
@@
sub _load_path {
$loaded->{ $path } = $info;
$self->_save( $path ) unless $info->{generated};
$loaded->{ $path } = $info;
$self->_save( $path ) unless $info->{generated};
- my $timefmt_path = $self->_permanent_path( 'timefmt' );
- if ( -e $timefmt_path ) {
- $self->session( 'timefmt', read_file $timefmt_path );
- }
}
}
@@
-293,6
+289,13
@@
sub load {
$self->session( 'path' => $path );
$self->session( 'path' => $path );
+ my $timefmt_path = $self->_permanent_path( 'timefmt' );
+ if ( -e $timefmt_path ) {
+ my $timefmt = read_file $timefmt_path;
+ $self->session( 'timefmt', $timefmt );
+ warn "timefmt = ", $timefmt;
+ }
+
my $redirect_to = '/data/items';
$self->session( 'header' => $loaded->{$path}->{header} );
my $redirect_to = '/data/items';
$self->session( 'header' => $loaded->{$path}->{header} );
@@
-429,6
+432,7
@@
sub columns {
return $self->redirect_to('/data/items');
} elsif ( ! $self->session('header') ) {
return $self->redirect_to('/data/items');
} elsif ( ! $self->session('header') ) {
+ return $self->redirect_to('/');
return $self->redirect_to('/data/load');
}
return $self->redirect_to('/data/load');
}