even more agressicly script export path
[MojoFacets.git] / lib / MojoFacets / Gnuplot.pm
index 47c721f..67b484f 100644 (file)
@@ -14,7 +14,12 @@ sub index {
 
        my $columns = $self->session('columns') || $self->redirect_to('/data/columns');
 
-       my $url = '/export/' . $self->session('path') . '/' . unac_string( join('.', 'items', @$columns) );
+       my $name = unac_string( join('.', 'items', @$columns) );
+       $name =~ s/\W+/_/g;
+
+       warn "# name $name\n";
+
+       my $url = '/export/' . $self->session('path') . '/' . $name;
        my $dir = $self->app->home->rel_dir('public');
 
        if ( -e "$dir/$url" ) {
@@ -32,7 +37,7 @@ set output '$dir/$url.png'
 
                |;
 
-               if ( my $timefmt = $self->session('timefmt') ) {
+               if ( my $timefmt = $self->param('timefmt') ) {
                        $g .= qq|
 
 set xdata time