cvs: pear /HTML_QuickForm_Controller Controller.php

From: Date: Mon, 15 Sep 2003 13:46:38 +0000
Subject: cvs: pear /HTML_QuickForm_Controller Controller.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-12752@lists.php.net to get a copy of this message
avb Mon Sep 15 09:46:38 2003 EDT Modified files: /pear/HTML_QuickForm_Controller Controller.php Log: Possibility to force reset of container (by Bertrand's request) Index: pear/HTML_QuickForm_Controller/Controller.php diff -u pear/HTML_QuickForm_Controller/Controller.php:1.2 pear/HTML_QuickForm_Controller/Controller.php:1.3 --- pear/HTML_QuickForm_Controller/Controller.php:1.2 Fri Sep 12 08:19:40 2003 +++ pear/HTML_QuickForm_Controller/Controller.php Mon Sep 15 09:46:38 2003 @@ -17,7 +17,7 @@ // | Bertrand Mansion <bmansion@mamasam.com> | // +----------------------------------------------------------------------+ // -// $Id: Controller.php,v 1.2 2003/09/12 12:19:40 avb Exp $ +// $Id: Controller.php,v 1.3 2003/09/15 13:46:38 avb Exp $ require_once 'HTML/QuickForm/Page.php'; @@ -32,7 +32,7 @@ * * @author Alexey Borzov <avb@php.net> * @package HTML_QuickForm_Controller - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class HTML_QuickForm_Controller { @@ -93,12 +93,13 @@ * get the form's values. * * @access public + * @param bool If true, then reset the container: clear all default, constant and submitted values * @return array */ - function &container() + function &container($reset = false) { $name = '_' . $this->_name . '_container'; - if (!isset($_SESSION[$name])) { + if (!isset($_SESSION[$name]) || $reset) { $_SESSION[$name] = array( 'defaults' => array(), 'constants' => array(),

« previous php.pear.cvs (#12752) next »