Show
Ignore:
Timestamp:
12/14/05 01:42:40 (6 years ago)
Author:
john
Message:

add comments and Session::start to dispatcher fix flash in session

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/session.php

    r73 r96  
    117117    } 
    118118 
    119     function flash($value) { 
     119    function isset_var($key) { 
     120        if(self::is_valid_host()) { 
     121            return isset($_SESSION[self::get_hash()][$key]); 
     122        } 
     123    } 
     124 
     125    function isset_flash($key) { 
     126        if(self::is_valid_host()) { 
     127            isset($_SESSION[self::get_hash()]['flash'][$key]); 
     128        } 
     129    } 
     130 
     131    function flash($key, $value) { 
    120132        if(self::is_valid_host()) { 
    121133            if($value) { 
    122                 $_SESSION[self::get_hash()]['flash'] = $value; 
     134                $_SESSION[self::get_hash()]['flash'][$key] = $value; 
    123135            } else { 
    124                 $value = $_SESSION[self::get_hash()]['flash']; 
    125                 unset($_SESSION[self::get_hash()]['flash']); 
     136                $value = $_SESSION[self::get_hash()]['flash'][$key]; 
     137                unset($_SESSION[self::get_hash()]['flash'][$key]); 
    126138                return $value; 
    127139            }