--- FreeBSD/tinderbox/webui/module/moduleSession.php 2007/11/02 20:55:00 1.1.1.1 +++ FreeBSD/tinderbox/webui/module/moduleSession.php 2007/11/13 07:36:19 1.1.1.1.2.1 @@ -24,20 +24,15 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # +# $Paefchen$ # $MCom: portstools/tinderbox/webui/module/moduleSession.php,v 1.3 2005/07/21 11:28:29 oliver Exp $ # -require_once 'module/module.php'; - class moduleSession extends module { - function moduleSession() { - $this->module(); - } - - function setAttribute( $attribute, $value ) { - if( !session_id() ) { - if( !$this->start() ) { + public function setAttribute( $attribute, $value ) { + if(! session_id() ) { + if(! $this->start() ) { return false; } } @@ -46,7 +41,7 @@ class moduleSession extends module { return true; } - function getAttribute( $attribute ) { + public function getAttribute( $attribute ) { if( isset( $_SESSION[$attribute] ) ) { return $_SESSION[$attribute]; } else { @@ -54,22 +49,22 @@ class moduleSession extends module { } } - function removeAttribute( $attribute ) { + public function removeAttribute( $attribute ) { unset( $_SESSION[$attribute] ); } - function start() { - if( !headers_sent() ) { + public function start() { + if(! headers_sent() ) { session_start(); return true; } return false; } - function destroy() { - if( session_id() ) { + public function __destruct() { + if(session_id()) session_destroy(); - } } } + ?>