Changeset 2080

Show
Ignore:
Timestamp:
11/02/06 19:08:02
Author:
miyagawa
Message:

add redirect screen. check Cookie

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Mixxi/trunk/lib/Mixxi/Controller/Root.pm

    r2070 r2080  
    6262        my $rs = $c->model('DBIC::Url')->search(alias => $alias); 
    6363        $rs->count or die "No url matched $alias"; 
    64         $c->res->redirect($rs->first->url); 
     64        my $url = $rs->first; 
     65 
     66        if ($c->req->cookie('seen')) { 
     67            $c->res->redirect( $url->url ); 
     68        } else { 
     69            $c->res->cookies->{seen} = { 
     70                value   => 1, 
     71                expires => '+3d', 
     72            }; 
     73            $c->stash->{url} = $url; 
     74            $c->stash->{template} = 'redirect.tt'; 
     75        } 
    6576    }; 
    6677 
  • Mixxi/trunk/root/head.tt

    r2079 r2080  
    11<html> 
    22<head> 
     3[% IF meta_refresh -%] 
     4<meta http-equiv="Refresh" content="10;URL=[% meta_refresh | html %]" /> 
     5[% END -%] 
    36<title>mixxi.jp: tinyURL for mixi.jp</title> 
    47<style type="text/css">