Show
Ignore:
Timestamp:
07/11/09 03:56:22 (13 years ago)
Author:
kovell
Message:

Fixes: upgrade no longer relies on install directory existing, upgrade variables correctly named, legacy code removed, error notices reduced.

Files:
1 modified

Legend:

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

    r354 r416  
    1717    function isAdmin() 
    1818    { 
    19         return (bool)($_SESSION['admin'] && $_SESSION['rsite'] == $_SERVER["HTTP_HOST"] && md5(KB_SITE) == $_SESSION['site']); 
     19        return (bool)(isset($_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"] && md5(KB_SITE) == $_SESSION['site']); 
     24        return (bool)(isset($_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"]; 
    32         $_SESSION['site'] = md5(KB_SITE); 
     31                $_SESSION['rsite'] = $_SERVER["HTTP_HOST"]; 
     32                $_SESSION['site'] = md5(KB_SITE); 
    3333    } 
    3434