Show
Ignore:
Timestamp:
10/21/08 14:25:52 (14 years ago)
Author:
beans
Message:

Better support for multiple killboards on same domain (/kb1, /kb2, /kb3 ...)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/class.session.php

    r336 r354  
    1717    function isAdmin() 
    1818    { 
    19         return (bool)($_SESSION['admin'] && $_SESSION['rsite'] == $_SERVER["HTTP_HOST"]); 
     19        return (bool)($_SESSION['admin'] && $_SESSION['rsite'] == $_SERVER["HTTP_HOST"] && md5(KB_SITE) == $_SESSION['site']); 
    2020    } 
    2121 
    2222    function isSuperAdmin() 
    2323    { 
    24         return (bool)($_SESSION['admin_super']&& $_SESSION['rsite'] == $_SERVER["HTTP_HOST"]); 
     24        return (bool)($_SESSION['admin_super']&& $_SESSION['rsite'] == $_SERVER["HTTP_HOST"] && md5(KB_SITE) == $_SESSION['site']); 
    2525    } 
    2626 
     
    2929        session_start(); 
    3030        $_SESSION['admin'] = $admin; 
    31                                 $_SESSION['rsite'] = $_SERVER["HTTP_HOST"]; 
     31        $_SESSION['rsite'] = $_SERVER["HTTP_HOST"]; 
     32        $_SESSION['site'] = md5(KB_SITE); 
    3233    } 
    3334