cvs: bugtracker /includes cache.php session.php /includes/cache users.php

From: Date: Wed, 13 Aug 2008 10:55:57 +0000
Subject: cvs: bugtracker /includes cache.php session.php /includes/cache users.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2387@lists.php.net to get a copy of this message
bcarlyon Wed Aug 13 10:55:57 2008 UTC Modified files: /bugtracker/includes cache.php session.php /bugtracker/includes/cache users.php Log: Minor sessions update http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache.php?r1=1.10&r2=1.11&diff_format=u Index: bugtracker/includes/cache.php diff -u bugtracker/includes/cache.php:1.10 bugtracker/includes/cache.php:1.11 --- bugtracker/includes/cache.php:1.10 Tue Aug 12 16:30:21 2008 +++ bugtracker/includes/cache.php Wed Aug 13 10:55:57 2008 @@ -76,6 +76,10 @@ // return a single element function obtain($thecache, $ref) { + if (!isset($this->$thecache)) + { + return FALSE; + } $thiscache = $this->$thecache; if ($ref < 0 && is_numeric($ref)) http://cvs.php.net/viewvc.cgi/bugtracker/includes/session.php?r1=1.1&r2=1.2&diff_format=u Index: bugtracker/includes/session.php diff -u bugtracker/includes/session.php:1.1 bugtracker/includes/session.php:1.2 --- bugtracker/includes/session.php:1.1 Wed Aug 13 10:23:28 2008 +++ bugtracker/includes/session.php Wed Aug 13 10:55:57 2008 @@ -96,8 +96,14 @@ } function update_session($session_data) { trace('session update'); - global $user, $db; + global $user, $db, $template; + if (!$user->fetch_handle($session_data['handle'])) + { + $template->template_file = $_SERVER['DOCUMENT_ROOT'] . '../template/generic/user/logout.php'; + $this->end_session(); + return FALSE; + } $user->handle = $session_data['handle']; $user->logged_in = TRUE; http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/users.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/users.php diff -u bugtracker/includes/cache/users.php:1.3 bugtracker/includes/cache/users.php:1.4 --- bugtracker/includes/cache/users.php:1.3 Sun Aug 10 23:39:58 2008 +++ bugtracker/includes/cache/users.php Wed Aug 13 10:55:57 2008 @@ -1,15 +1,11 @@ <?php - $users["barrycarlyon"]["handle"] = "barrycarlyon"; - $cacher["users"]['barrycarlyon']["handle"] = "barrycarlyon"; - $users["barrycarlyon"]["email"] = "barry@barrycarlyon.co.uk"; - $cacher["users"]['barrycarlyon']["email"] = "barry@barrycarlyon.co.uk"; + $users["BarryCarlyon"]["handle"] = "BarryCarlyon"; + $users["BarryCarlyon"]["email"] = "barry@barrycarlyon.co.uk"; - $users["Tlars_strojny"]["handle"] = "Tlars_strojny"; - $cacher["users"]["Tlars_strojny"]["handle"] = "Tlars_strojny"; - $users["Tlars_strojny"]["email"] = "lars@strojny.net"; - $cacher["users"]["Tlars_strojny"]["email"] = "lars@strojny.net"; + $users["bob"]["handle"] = "bob"; + $users["bob"]["email"] = "b.carlyon@lsrfm.com"; - $users["T_"]["handle"] = "T_"; - $users["T_"]["email"] = ""; + $users["Fred"]["handle"] = "Fred"; + $users["Fred"]["email"] = "bcarlyon@php.net";

« previous php.webmaster (#2387) next »