diff options
author | emkael <emkael@tlen.pl> | 2016-04-07 16:09:16 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-04-07 16:09:16 +0200 |
commit | d42b25cbf6d3f1e51cb2a3149f1ff54cc5474bc9 (patch) | |
tree | 96b734357392d6094cfc5f8284ad8f2578b96b7f /lib/prado/framework | |
parent | ac6c2b9c4f787dfdfa00547f764c77d80dad14c0 (diff) |
* Prado upgrade (to 3.3.r6b8e6601752b21a8a96c385a5529bbec7bb2b408)
Diffstat (limited to 'lib/prado/framework')
337 files changed, 1626 insertions, 613 deletions
diff --git a/lib/prado/framework/Caching/TAPCCache.php b/lib/prado/framework/Caching/TAPCCache.php index 2274412..ee6e165 100644 --- a/lib/prado/framework/Caching/TAPCCache.php +++ b/lib/prado/framework/Caching/TAPCCache.php @@ -4,7 +4,7 @@ * * @author Alban Hanry <compte_messagerie@hotmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Caching/TCache.php b/lib/prado/framework/Caching/TCache.php index 4a66dd0..fb41344 100644 --- a/lib/prado/framework/Caching/TCache.php +++ b/lib/prado/framework/Caching/TCache.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Caching/TDbCache.php b/lib/prado/framework/Caching/TDbCache.php index f0cf962..a296cf4 100644 --- a/lib/prado/framework/Caching/TDbCache.php +++ b/lib/prado/framework/Caching/TDbCache.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Caching/TEACache.php b/lib/prado/framework/Caching/TEACache.php index 251566b..e223176 100644 --- a/lib/prado/framework/Caching/TEACache.php +++ b/lib/prado/framework/Caching/TEACache.php @@ -1 +1 @@ -<?php
/**
* TEACache class file
*
* @author Dario rigolin <drigolin@e-portaltech.it>
* @link https://github.com/pradosoft/prado
* @copyright Copyright © 2005-2015 The PRADO Group
* @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Caching
*/
/**
* TEACache class
*
* TEACache implements a cache application module based on {@link http://eaccelerator.net/ eAccelerator}.
*
* By definition, cache does not ensure the existence of a value
* even if it never expires. Cache is not meant to be an persistent storage.
*
* To use this module, the eAccelerator PHP extension must be loaded and enabled
*
* Please note that as of v0.9.6, eAccelerator no longer supports data caching.
* This means if you still want to use this component, your eAccelerator should be of 0.9.5.x or lower version.
*
* Some usage examples of TEACache are as follows,
* <code>
* $cache=new TEACache; // TEACache may also be loaded as a Prado application module
* $cache->init(null);
* $cache->add('object',$object);
* $object2=$cache->get('object');
* </code>
*
* If loaded, TEACache will register itself with {@link TApplication} as the
* cache module. It can be accessed via {@link TApplication::getCache()}.
*
* TEACache may be configured in application configuration file as follows
* <code>
* <module id="cache" class="System.Caching.TEACache" />
* </code>
*
* @author Dario Rigolin <drigolin@e-portaltech.it>
* @package System.Caching
* @since 3.2.2
*/
class TEACache extends TCache
{
/**
* Initializes this module.
* This method is required by the IModule interface.
* @param TXmlElement configuration for this module, can be null
* @throws TConfigurationException if eaccelerator extension is not installed or not started, check your php.ini
*/
public function init($config)
{
if(!function_exists('eaccelerator_get'))
throw new TConfigurationException('eacceleratorcache_extension_required');
parent::init($config);
}
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string a unique key identifying the cached value
* @return string the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
$value = eaccelerator_get($key);
return ($value === null) ? false : $value;
}
/**
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string the key identifying the value to be cached
* @param string the value to be cached
* @param integer the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key,$value,$expire)
{
return eaccelerator_put($key,$value,$expire);
}
/**
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string the key identifying the value to be cached
* @param string the value to be cached
* @param integer the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key,$value,$expire)
{
return (null === eaccelerator_get($key)) ? $this->setValue($key,$value,$expire) : false;
}
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
{
return eaccelerator_rm($key);
}
/**
* Deletes all values from cache.
* Be careful of performing this operation if the cache is shared by multiple applications.
*/
public function flush()
{
// first, remove expired content from cache
eaccelerator_gc();
// now, remove leftover cache-keys
$keys = eaccelerator_list_keys();
foreach($keys as $key)
$this->deleteValue(substr($key['name'], 1));
return true;
}
}
\ No newline at end of file +<?php
/**
* TEACache class file
*
* @author Dario rigolin <drigolin@e-portaltech.it>
* @link https://github.com/pradosoft/prado
* @copyright Copyright © 2005-2016 The PRADO Group
* @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Caching
*/
/**
* TEACache class
*
* TEACache implements a cache application module based on {@link http://eaccelerator.net/ eAccelerator}.
*
* By definition, cache does not ensure the existence of a value
* even if it never expires. Cache is not meant to be an persistent storage.
*
* To use this module, the eAccelerator PHP extension must be loaded and enabled
*
* Please note that as of v0.9.6, eAccelerator no longer supports data caching.
* This means if you still want to use this component, your eAccelerator should be of 0.9.5.x or lower version.
*
* Some usage examples of TEACache are as follows,
* <code>
* $cache=new TEACache; // TEACache may also be loaded as a Prado application module
* $cache->init(null);
* $cache->add('object',$object);
* $object2=$cache->get('object');
* </code>
*
* If loaded, TEACache will register itself with {@link TApplication} as the
* cache module. It can be accessed via {@link TApplication::getCache()}.
*
* TEACache may be configured in application configuration file as follows
* <code>
* <module id="cache" class="System.Caching.TEACache" />
* </code>
*
* @author Dario Rigolin <drigolin@e-portaltech.it>
* @package System.Caching
* @since 3.2.2
*/
class TEACache extends TCache
{
/**
* Initializes this module.
* This method is required by the IModule interface.
* @param TXmlElement configuration for this module, can be null
* @throws TConfigurationException if eaccelerator extension is not installed or not started, check your php.ini
*/
public function init($config)
{
if(!function_exists('eaccelerator_get'))
throw new TConfigurationException('eacceleratorcache_extension_required');
parent::init($config);
}
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string a unique key identifying the cached value
* @return string the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
$value = eaccelerator_get($key);
return ($value === null) ? false : $value;
}
/**
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string the key identifying the value to be cached
* @param string the value to be cached
* @param integer the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key,$value,$expire)
{
return eaccelerator_put($key,$value,$expire);
}
/**
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string the key identifying the value to be cached
* @param string the value to be cached
* @param integer the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key,$value,$expire)
{
return (null === eaccelerator_get($key)) ? $this->setValue($key,$value,$expire) : false;
}
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
{
return eaccelerator_rm($key);
}
/**
* Deletes all values from cache.
* Be careful of performing this operation if the cache is shared by multiple applications.
*/
public function flush()
{
// first, remove expired content from cache
eaccelerator_gc();
// now, remove leftover cache-keys
$keys = eaccelerator_list_keys();
foreach($keys as $key)
$this->deleteValue(substr($key['name'], 1));
return true;
}
}
\ No newline at end of file diff --git a/lib/prado/framework/Caching/TMemCache.php b/lib/prado/framework/Caching/TMemCache.php index 8d09119..ba4a200 100644 --- a/lib/prado/framework/Caching/TMemCache.php +++ b/lib/prado/framework/Caching/TMemCache.php @@ -5,7 +5,7 @@ * @author Qiang Xue <qiang.xue@gmail.com> * @author Carl G. Mathisen <carlgmathisen@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Caching/TSqliteCache.php b/lib/prado/framework/Caching/TSqliteCache.php index 8451a9e..db7639d 100644 --- a/lib/prado/framework/Caching/TSqliteCache.php +++ b/lib/prado/framework/Caching/TSqliteCache.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Caching/TXCache.php b/lib/prado/framework/Caching/TXCache.php index 19ae42a..ef771bd 100644 --- a/lib/prado/framework/Caching/TXCache.php +++ b/lib/prado/framework/Caching/TXCache.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Caching */ diff --git a/lib/prado/framework/Collections/TAttributeCollection.php b/lib/prado/framework/Collections/TAttributeCollection.php index a0f14ef..eb3cb29 100644 --- a/lib/prado/framework/Collections/TAttributeCollection.php +++ b/lib/prado/framework/Collections/TAttributeCollection.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ @@ -45,6 +45,19 @@ class TAttributeCollection extends TMap private $_caseSensitive=false; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_caseSensitive===false) + $exprops[] = "\0TAttributeCollection\0_caseSensitive"; + } + + /** * Returns a property value or an event handler list by property or event name. * This method overrides the parent implementation by returning * a key value if the key exists in the collection. diff --git a/lib/prado/framework/Collections/TDummyDataSource.php b/lib/prado/framework/Collections/TDummyDataSource.php index 6aaaeaa..275d847 100644 --- a/lib/prado/framework/Collections/TDummyDataSource.php +++ b/lib/prado/framework/Collections/TDummyDataSource.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Collections/TList.php b/lib/prado/framework/Collections/TList.php index bba0dae..6e9e16f 100644 --- a/lib/prado/framework/Collections/TList.php +++ b/lib/prado/framework/Collections/TList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ @@ -406,78 +406,7 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countabl * @package System.Collections * @since 3.0 */ -class TListIterator implements Iterator +class TListIterator extends ArrayIterator { - /** - * @var array the data to be iterated through - */ - private $_d; - /** - * @var integer index of the current item - */ - private $_i; - /** - * @var integer count of the data items - */ - private $_c; - - /** - * Constructor. - * @param array the data to be iterated through - */ - public function __construct(&$data) - { - $this->_d=&$data; - $this->_i=0; - $this->_c=count($this->_d); - } - - /** - * Rewinds internal array pointer. - * This method is required by the interface Iterator. - */ - public function rewind() - { - $this->_i=0; - } - - /** - * Returns the key of the current array item. - * This method is required by the interface Iterator. - * @return integer the key of the current array item - */ - public function key() - { - return $this->_i; - } - - /** - * Returns the current array item. - * This method is required by the interface Iterator. - * @return mixed the current array item - */ - public function current() - { - return $this->_d[$this->_i]; - } - - /** - * Moves the internal pointer to the next array item. - * This method is required by the interface Iterator. - */ - public function next() - { - $this->_i++; - } - - /** - * Returns whether there is an item at current position. - * This method is required by the interface Iterator. - * @return boolean - */ - public function valid() - { - return $this->_i<$this->_c; - } } diff --git a/lib/prado/framework/Collections/TListItemCollection.php b/lib/prado/framework/Collections/TListItemCollection.php index ed00146..5c146b6 100644 --- a/lib/prado/framework/Collections/TListItemCollection.php +++ b/lib/prado/framework/Collections/TListItemCollection.php @@ -6,7 +6,7 @@ * @author Robin J. Rogge <rojaro@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Collections/TMap.php b/lib/prado/framework/Collections/TMap.php index d610dce..017f70b 100644 --- a/lib/prado/framework/Collections/TMap.php +++ b/lib/prado/framework/Collections/TMap.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ @@ -42,6 +42,21 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable private $_r=false; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_d===array()) + $exprops[] = "\0TMap\0_d"; + if ($this->_r===false) + $exprops[] = "\0TMap\0_r"; + } + + /** * Constructor. * Initializes the list with an array or an iterable object. * @param array|Iterator the intial data. Default is null, meaning no initialization. @@ -275,76 +290,6 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable * @package System.Collections * @since 3.0 */ -class TMapIterator implements Iterator +class TMapIterator extends ArrayIterator { - /** - * @var array the data to be iterated through - */ - private $_d; - /** - * @var array list of keys in the map - */ - private $_keys; - /** - * @var mixed current key - */ - private $_key; - - /** - * Constructor. - * @param array the data to be iterated through - */ - public function __construct(&$data) - { - $this->_d=&$data; - $this->_keys=array_keys($data); - } - - /** - * Rewinds internal array pointer. - * This method is required by the interface Iterator. - */ - public function rewind() - { - $this->_key=reset($this->_keys); - } - - /** - * Returns the key of the current array element. - * This method is required by the interface Iterator. - * @return mixed the key of the current array element - */ - public function key() - { - return $this->_key; - } - - /** - * Returns the current array element. - * This method is required by the interface Iterator. - * @return mixed the current array element - */ - public function current() - { - return $this->_d[$this->_key]; - } - - /** - * Moves the internal pointer to the next array element. - * This method is required by the interface Iterator. - */ - public function next() - { - $this->_key=next($this->_keys); - } - - /** - * Returns whether there is an element at current position. - * This method is required by the interface Iterator. - * @return boolean - */ - public function valid() - { - return $this->_key!==false; - } } diff --git a/lib/prado/framework/Collections/TPagedDataSource.php b/lib/prado/framework/Collections/TPagedDataSource.php index ec0b895..7fe43e5 100644 --- a/lib/prado/framework/Collections/TPagedDataSource.php +++ b/lib/prado/framework/Collections/TPagedDataSource.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Collections/TPagedList.php b/lib/prado/framework/Collections/TPagedList.php index 118bba1..a933b4e 100644 --- a/lib/prado/framework/Collections/TPagedList.php +++ b/lib/prado/framework/Collections/TPagedList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ @@ -295,7 +295,7 @@ class TPagedList extends TList else { $data=$this->toArray(); - return new TListIterator($data); + return new ArrayIterator($data); } } diff --git a/lib/prado/framework/Collections/TPriorityList.php b/lib/prado/framework/Collections/TPriorityList.php index ad548dc..06dbae0 100644 --- a/lib/prado/framework/Collections/TPriorityList.php +++ b/lib/prado/framework/Collections/TPriorityList.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Collections/TPriorityMap.php b/lib/prado/framework/Collections/TPriorityMap.php index 9af10da..eebb81b 100644 --- a/lib/prado/framework/Collections/TPriorityMap.php +++ b/lib/prado/framework/Collections/TPriorityMap.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@mac.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Collections/TQueue.php b/lib/prado/framework/Collections/TQueue.php index 6c989e2..ac6f9df 100644 --- a/lib/prado/framework/Collections/TQueue.php +++ b/lib/prado/framework/Collections/TQueue.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Collections diff --git a/lib/prado/framework/Collections/TStack.php b/lib/prado/framework/Collections/TStack.php index de78527..8bb4216 100644 --- a/lib/prado/framework/Collections/TStack.php +++ b/lib/prado/framework/Collections/TStack.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Collections */ diff --git a/lib/prado/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php b/lib/prado/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php index c4b8adf..fd762f6 100644 --- a/lib/prado/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php +++ b/lib/prado/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php index 4b0f89d..ff3d798 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php index cf3a8fc..a14e8fa 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php index 4c638d0..9a54710 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php index 2b9ada2..9c62cbd 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php index 1b577f0..354c3e2 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php index 24fdee5..7b8944c 100644 --- a/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php +++ b/lib/prado/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Relations diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php index 47b6797..4786d86 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php @@ -4,7 +4,7 @@ * * @author Cesar Ramos <cramos[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php index 3ebc0c7..14554d1 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php @@ -3,7 +3,7 @@ * TMssqlScaffoldInput class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php index 6885461..6ae2c90 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php @@ -3,7 +3,7 @@ * TMysqlScaffoldInput class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php index 312f34d..4e02f16 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php @@ -3,7 +3,7 @@ * TPgsqlScaffoldInput class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php index bb1715a..e1bc308 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php @@ -3,7 +3,7 @@ * TScaffoldInputBase class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php index 1805aff..b4bbebf 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php @@ -3,7 +3,7 @@ * TScaffoldInputCommon class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php index 95078be..2350a2b 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php @@ -3,7 +3,7 @@ * TSqliteScaffoldInput class file. * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold.InputBuilder */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php index 15cb2c0..1a209c7 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php index 1d706d6..3134934 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php index d5367e9..0903126 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold */ diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php index e2627e5..30c3e7f 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.ActiveRecord.Scaffold diff --git a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php index 3d4019a..291bf65 100644 --- a/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php +++ b/lib/prado/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord.Scaffold */ diff --git a/lib/prado/framework/Data/ActiveRecord/TActiveRecord.php b/lib/prado/framework/Data/ActiveRecord/TActiveRecord.php index 186af85..91d5780 100644 --- a/lib/prado/framework/Data/ActiveRecord/TActiveRecord.php +++ b/lib/prado/framework/Data/ActiveRecord/TActiveRecord.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/ActiveRecord/TActiveRecordConfig.php b/lib/prado/framework/Data/ActiveRecord/TActiveRecordConfig.php index f2c7e0b..fd69e3c 100644 --- a/lib/prado/framework/Data/ActiveRecord/TActiveRecordConfig.php +++ b/lib/prado/framework/Data/ActiveRecord/TActiveRecordConfig.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/ActiveRecord/TActiveRecordCriteria.php b/lib/prado/framework/Data/ActiveRecord/TActiveRecordCriteria.php index 612658e..366011a 100644 --- a/lib/prado/framework/Data/ActiveRecord/TActiveRecordCriteria.php +++ b/lib/prado/framework/Data/ActiveRecord/TActiveRecordCriteria.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php b/lib/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php index e631a73..85b1c2d 100644 --- a/lib/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php +++ b/lib/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/ActiveRecord/TActiveRecordManager.php b/lib/prado/framework/Data/ActiveRecord/TActiveRecordManager.php index 1e836d5..615555a 100644 --- a/lib/prado/framework/Data/ActiveRecord/TActiveRecordManager.php +++ b/lib/prado/framework/Data/ActiveRecord/TActiveRecordManager.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.ActiveRecord */ diff --git a/lib/prado/framework/Data/Common/Mssql/TMssqlCommandBuilder.php b/lib/prado/framework/Data/Common/Mssql/TMssqlCommandBuilder.php index e3f1f5c..d23e62e 100644 --- a/lib/prado/framework/Data/Common/Mssql/TMssqlCommandBuilder.php +++ b/lib/prado/framework/Data/Common/Mssql/TMssqlCommandBuilder.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Mssql/TMssqlMetaData.php b/lib/prado/framework/Data/Common/Mssql/TMssqlMetaData.php index d0fc167..725d0a5 100644 --- a/lib/prado/framework/Data/Common/Mssql/TMssqlMetaData.php +++ b/lib/prado/framework/Data/Common/Mssql/TMssqlMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mssql */ diff --git a/lib/prado/framework/Data/Common/Mssql/TMssqlTableColumn.php b/lib/prado/framework/Data/Common/Mssql/TMssqlTableColumn.php index a02ebf0..793a14f 100644 --- a/lib/prado/framework/Data/Common/Mssql/TMssqlTableColumn.php +++ b/lib/prado/framework/Data/Common/Mssql/TMssqlTableColumn.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mssql */ diff --git a/lib/prado/framework/Data/Common/Mssql/TMssqlTableInfo.php b/lib/prado/framework/Data/Common/Mssql/TMssqlTableInfo.php index bee4730..3a0c86f 100644 --- a/lib/prado/framework/Data/Common/Mssql/TMssqlTableInfo.php +++ b/lib/prado/framework/Data/Common/Mssql/TMssqlTableInfo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mssql */ diff --git a/lib/prado/framework/Data/Common/Mysql/TMysqlCommandBuilder.php b/lib/prado/framework/Data/Common/Mysql/TMysqlCommandBuilder.php index b5bdc28..3dccb77 100644 --- a/lib/prado/framework/Data/Common/Mysql/TMysqlCommandBuilder.php +++ b/lib/prado/framework/Data/Common/Mysql/TMysqlCommandBuilder.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Mysql/TMysqlMetaData.php b/lib/prado/framework/Data/Common/Mysql/TMysqlMetaData.php index e7747b7..5777321 100644 --- a/lib/prado/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/lib/prado/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mysql */ diff --git a/lib/prado/framework/Data/Common/Mysql/TMysqlTableColumn.php b/lib/prado/framework/Data/Common/Mysql/TMysqlTableColumn.php index 5b84f80..24790ea 100644 --- a/lib/prado/framework/Data/Common/Mysql/TMysqlTableColumn.php +++ b/lib/prado/framework/Data/Common/Mysql/TMysqlTableColumn.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mysql */ diff --git a/lib/prado/framework/Data/Common/Mysql/TMysqlTableInfo.php b/lib/prado/framework/Data/Common/Mysql/TMysqlTableInfo.php index bc5dc4e..c538668 100644 --- a/lib/prado/framework/Data/Common/Mysql/TMysqlTableInfo.php +++ b/lib/prado/framework/Data/Common/Mysql/TMysqlTableInfo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Mysql */ diff --git a/lib/prado/framework/Data/Common/Oracle/TOracleCommandBuilder.php b/lib/prado/framework/Data/Common/Oracle/TOracleCommandBuilder.php index ad4c9f4..9db3937 100644 --- a/lib/prado/framework/Data/Common/Oracle/TOracleCommandBuilder.php +++ b/lib/prado/framework/Data/Common/Oracle/TOracleCommandBuilder.php @@ -5,7 +5,7 @@ * * @author Marcos Nobre <marconobre[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Oracle/TOracleMetaData.php b/lib/prado/framework/Data/Common/Oracle/TOracleMetaData.php index 7fd3d1f..f7c7406 100644 --- a/lib/prado/framework/Data/Common/Oracle/TOracleMetaData.php +++ b/lib/prado/framework/Data/Common/Oracle/TOracleMetaData.php @@ -4,7 +4,7 @@ * * @author Marcos Nobre <marconobre[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Oracle */ diff --git a/lib/prado/framework/Data/Common/Oracle/TOracleTableColumn.php b/lib/prado/framework/Data/Common/Oracle/TOracleTableColumn.php index 31a5e6c..7dd2838 100644 --- a/lib/prado/framework/Data/Common/Oracle/TOracleTableColumn.php +++ b/lib/prado/framework/Data/Common/Oracle/TOracleTableColumn.php @@ -4,7 +4,7 @@ * * @author Marcos Nobre <marconobre[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Oracle */ diff --git a/lib/prado/framework/Data/Common/Oracle/TOracleTableInfo.php b/lib/prado/framework/Data/Common/Oracle/TOracleTableInfo.php index f226562..156a2a1 100644 --- a/lib/prado/framework/Data/Common/Oracle/TOracleTableInfo.php +++ b/lib/prado/framework/Data/Common/Oracle/TOracleTableInfo.php @@ -5,7 +5,7 @@ * * @author Marcos Nobre <marconobre[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php b/lib/prado/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php index 5e219ad..9612978 100644 --- a/lib/prado/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php +++ b/lib/prado/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Pgsql/TPgsqlMetaData.php b/lib/prado/framework/Data/Common/Pgsql/TPgsqlMetaData.php index 3001cf4..bf99b9f 100644 --- a/lib/prado/framework/Data/Common/Pgsql/TPgsqlMetaData.php +++ b/lib/prado/framework/Data/Common/Pgsql/TPgsqlMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Pgsql */ diff --git a/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableColumn.php b/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableColumn.php index efe516e..ff06b20 100644 --- a/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableColumn.php +++ b/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableColumn.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Pgsql */ diff --git a/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableInfo.php b/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableInfo.php index aef09fa..17aacee 100644 --- a/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableInfo.php +++ b/lib/prado/framework/Data/Common/Pgsql/TPgsqlTableInfo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Pgsql */ diff --git a/lib/prado/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php b/lib/prado/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php index 970ede4..eaa0678 100644 --- a/lib/prado/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php +++ b/lib/prado/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/Sqlite/TSqliteMetaData.php b/lib/prado/framework/Data/Common/Sqlite/TSqliteMetaData.php index a2fe870..2fb641b 100644 --- a/lib/prado/framework/Data/Common/Sqlite/TSqliteMetaData.php +++ b/lib/prado/framework/Data/Common/Sqlite/TSqliteMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Sqlite */ diff --git a/lib/prado/framework/Data/Common/Sqlite/TSqliteTableColumn.php b/lib/prado/framework/Data/Common/Sqlite/TSqliteTableColumn.php index e58ec85..018323a 100644 --- a/lib/prado/framework/Data/Common/Sqlite/TSqliteTableColumn.php +++ b/lib/prado/framework/Data/Common/Sqlite/TSqliteTableColumn.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Sqlite */ diff --git a/lib/prado/framework/Data/Common/Sqlite/TSqliteTableInfo.php b/lib/prado/framework/Data/Common/Sqlite/TSqliteTableInfo.php index 6c047e4..387382e 100644 --- a/lib/prado/framework/Data/Common/Sqlite/TSqliteTableInfo.php +++ b/lib/prado/framework/Data/Common/Sqlite/TSqliteTableInfo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common.Sqlite */ diff --git a/lib/prado/framework/Data/Common/TDbCommandBuilder.php b/lib/prado/framework/Data/Common/TDbCommandBuilder.php index e1d476e..389fe77 100644 --- a/lib/prado/framework/Data/Common/TDbCommandBuilder.php +++ b/lib/prado/framework/Data/Common/TDbCommandBuilder.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/TDbMetaData.php b/lib/prado/framework/Data/Common/TDbMetaData.php index 0ec9ce4..d44cd0b 100644 --- a/lib/prado/framework/Data/Common/TDbMetaData.php +++ b/lib/prado/framework/Data/Common/TDbMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/TDbTableColumn.php b/lib/prado/framework/Data/Common/TDbTableColumn.php index 9987197..b994dd7 100644 --- a/lib/prado/framework/Data/Common/TDbTableColumn.php +++ b/lib/prado/framework/Data/Common/TDbTableColumn.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/Common/TDbTableInfo.php b/lib/prado/framework/Data/Common/TDbTableInfo.php index 8e60157..0285f92 100644 --- a/lib/prado/framework/Data/Common/TDbTableInfo.php +++ b/lib/prado/framework/Data/Common/TDbTableInfo.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.Common */ diff --git a/lib/prado/framework/Data/DataGateway/TDataGatewayCommand.php b/lib/prado/framework/Data/DataGateway/TDataGatewayCommand.php index d314ca0..bbc741a 100644 --- a/lib/prado/framework/Data/DataGateway/TDataGatewayCommand.php +++ b/lib/prado/framework/Data/DataGateway/TDataGatewayCommand.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.DataGateway diff --git a/lib/prado/framework/Data/DataGateway/TSqlCriteria.php b/lib/prado/framework/Data/DataGateway/TSqlCriteria.php index 3325c7f..c556238 100644 --- a/lib/prado/framework/Data/DataGateway/TSqlCriteria.php +++ b/lib/prado/framework/Data/DataGateway/TSqlCriteria.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.DataGateway */ diff --git a/lib/prado/framework/Data/DataGateway/TTableGateway.php b/lib/prado/framework/Data/DataGateway/TTableGateway.php index 0906d8d..d1b8264 100644 --- a/lib/prado/framework/Data/DataGateway/TTableGateway.php +++ b/lib/prado/framework/Data/DataGateway/TTableGateway.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Data.DataGateway diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TDiscriminator.php b/lib/prado/framework/Data/SqlMap/Configuration/TDiscriminator.php index 004bcca..45aa984 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TDiscriminator.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TDiscriminator.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php b/lib/prado/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php index dfe14f8..56e2929 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TParameterMap.php b/lib/prado/framework/Data/SqlMap/Configuration/TParameterMap.php index d6f90b2..0f137c5 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TParameterMap.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TParameterMap.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TParameterProperty.php b/lib/prado/framework/Data/SqlMap/Configuration/TParameterProperty.php index f6282e4..d706a83 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TParameterProperty.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TParameterProperty.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TResultMap.php b/lib/prado/framework/Data/SqlMap/Configuration/TResultMap.php index 95e8d34..d0f017a 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TResultMap.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TResultMap.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TResultProperty.php b/lib/prado/framework/Data/SqlMap/Configuration/TResultProperty.php index 87b0677..0a4f8f1 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TResultProperty.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TResultProperty.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php b/lib/prado/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php index 41b706a..899ed74 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php index 8a1e344..54b8c32 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapStatement.php b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapStatement.php index abb21c7..e0533bf 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapStatement.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapStatement.php @@ -5,7 +5,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ diff --git a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php index 062b65e..5018699 100644 --- a/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php +++ b/lib/prado/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Configuration */ @@ -347,7 +347,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder static $bCacheDependencies; if($bCacheDependencies === null) - $bCacheDependencies = Prado::getApplication()->getMode() !== TApplicationMode::Performance; + $bCacheDependencies = true; //Prado::getApplication()->getMode() !== TApplicationMode::Performance; if($bCacheDependencies) $this->_manager->getCacheDependencies() diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php b/lib/prado/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php index ec05978..07527ab 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php @@ -4,7 +4,7 @@ * * @author Berczi Gabor <gabor.berczi@devworx.hu> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TLazyLoadList.php b/lib/prado/framework/Data/SqlMap/DataMapper/TLazyLoadList.php index 721c0fc..c7dac7b 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TLazyLoadList.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TLazyLoadList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/lib/prado/framework/Data/SqlMap/DataMapper/TPropertyAccess.php index 3aadc17..f49e0ff 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TPropertyAccess.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TPropertyAccess.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapCache.php b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapCache.php index 2df52eb..fb7e310 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapCache.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapCache.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php index 0bf9fdc..5781c5b 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php index 7941426..f1e73f0 100644 --- a/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php +++ b/lib/prado/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TCachingStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TCachingStatement.php index 067b7b9..f286812 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TCachingStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TCachingStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php index fac34fa..9cc476a 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TInsertMappedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TInsertMappedStatement.php index 0673bcc..074ee59 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TInsertMappedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TInsertMappedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TMappedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TMappedStatement.php index 2887114..0883564 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TMappedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TMappedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TPreparedCommand.php b/lib/prado/framework/Data/SqlMap/Statements/TPreparedCommand.php index 1f560b3..827fd23 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TPreparedCommand.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TPreparedCommand.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatement.php index f536e39..3f33ed6 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php b/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php index a85cd76..9dffd56 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TSelectMappedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TSelectMappedStatement.php index 0231c09..a819fd7 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TSelectMappedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TSelectMappedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php b/lib/prado/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php index 11f8a56..26ae872 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TStaticSql.php b/lib/prado/framework/Data/SqlMap/Statements/TStaticSql.php index 180d0e4..d925dea 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TStaticSql.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TStaticSql.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php b/lib/prado/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php index 8a39640..173cf29 100644 --- a/lib/prado/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php +++ b/lib/prado/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap.Statements */ diff --git a/lib/prado/framework/Data/SqlMap/TSqlMapConfig.php b/lib/prado/framework/Data/SqlMap/TSqlMapConfig.php index 5fa641a..8fa6e41 100644 --- a/lib/prado/framework/Data/SqlMap/TSqlMapConfig.php +++ b/lib/prado/framework/Data/SqlMap/TSqlMapConfig.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/TSqlMapGateway.php b/lib/prado/framework/Data/SqlMap/TSqlMapGateway.php index e1df2e5..c9b6bc4 100644 --- a/lib/prado/framework/Data/SqlMap/TSqlMapGateway.php +++ b/lib/prado/framework/Data/SqlMap/TSqlMapGateway.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/SqlMap/TSqlMapManager.php b/lib/prado/framework/Data/SqlMap/TSqlMapManager.php index eba42f7..66b7b66 100644 --- a/lib/prado/framework/Data/SqlMap/TSqlMapManager.php +++ b/lib/prado/framework/Data/SqlMap/TSqlMapManager.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data.SqlMap */ diff --git a/lib/prado/framework/Data/TDataSourceConfig.php b/lib/prado/framework/Data/TDataSourceConfig.php index e9c00da..b01a28d 100644 --- a/lib/prado/framework/Data/TDataSourceConfig.php +++ b/lib/prado/framework/Data/TDataSourceConfig.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data */ diff --git a/lib/prado/framework/Data/TDbCommand.php b/lib/prado/framework/Data/TDbCommand.php index 93e9e74..b2dcbb8 100644 --- a/lib/prado/framework/Data/TDbCommand.php +++ b/lib/prado/framework/Data/TDbCommand.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data */ @@ -201,8 +201,8 @@ class TDbCommand extends TComponent */ public function getDebugStatementText() { - if(Prado::getApplication()->getMode() === TApplicationMode::Debug) - return $this->_statement instanceof PDOStatement ? + //if(Prado::getApplication()->getMode() === TApplicationMode::Debug) + return $this->_statement instanceof PDOStatement ? $this->_statement->queryString : $this->getText(); } diff --git a/lib/prado/framework/Data/TDbConnection.php b/lib/prado/framework/Data/TDbConnection.php index d9c43f9..b5bb8cf 100644 --- a/lib/prado/framework/Data/TDbConnection.php +++ b/lib/prado/framework/Data/TDbConnection.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data */ diff --git a/lib/prado/framework/Data/TDbDataReader.php b/lib/prado/framework/Data/TDbDataReader.php index a74952e..6c4b314 100644 --- a/lib/prado/framework/Data/TDbDataReader.php +++ b/lib/prado/framework/Data/TDbDataReader.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data */ diff --git a/lib/prado/framework/Data/TDbTransaction.php b/lib/prado/framework/Data/TDbTransaction.php index a7484eb..04271cf 100644 --- a/lib/prado/framework/Data/TDbTransaction.php +++ b/lib/prado/framework/Data/TDbTransaction.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Data */ diff --git a/lib/prado/framework/Exceptions/TErrorHandler.php b/lib/prado/framework/Exceptions/TErrorHandler.php index f9a120a..76f7396 100644 --- a/lib/prado/framework/Exceptions/TErrorHandler.php +++ b/lib/prado/framework/Exceptions/TErrorHandler.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Exceptions */ @@ -345,7 +345,12 @@ class TErrorHandler extends TModule // if PHP exception, we want to show the 2nd stack level context // because the 1st stack level is of little use (it's in error handler) if($exception instanceof TPhpErrorException) - $result=isset($trace[0]['file'])?$trace[0]:$trace[1]; + { + if(isset($trace[0]['file'])) + $result=$trace[0]; + elseif(isset($trace[1])) + $result=$trace[1]; + } else if($exception instanceof TInvalidOperationException) { // in case of getter or setter error, find out the exact file and row diff --git a/lib/prado/framework/Exceptions/TException.php b/lib/prado/framework/Exceptions/TException.php index 651adb5..2c915a4 100644 --- a/lib/prado/framework/Exceptions/TException.php +++ b/lib/prado/framework/Exceptions/TException.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Exceptions */ @@ -357,6 +357,17 @@ class TPhpErrorException extends TSystemException $errorType=isset($errorTypes[$errno])?$errorTypes[$errno]:'Unknown Error'; parent::__construct("[$errorType] $errstr (@line $errline in file $errfile)."); } + + /** + * Returns if error is one of fatal type. + * + * @param array $error error got from error_get_last() + * @return boolean if error is one of fatal type + */ + public static function isFatalError($error) + { + return isset($error['type']) && in_array($error['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING)); + } } diff --git a/lib/prado/framework/Exceptions/messages/messages.txt b/lib/prado/framework/Exceptions/messages/messages.txt index 46dde55..8958014 100644 --- a/lib/prado/framework/Exceptions/messages/messages.txt +++ b/lib/prado/framework/Exceptions/messages/messages.txt @@ -210,6 +210,7 @@ page_statepersister_invalid = Page state persister must implement IPageStateP page_csmanagerclass_invalid = ClientScriptManager class '{0}' must be an instance of TClientScriptManager. csmanager_pradoscript_invalid = Unknown Prado script library name '{0}'. +csmanager_pradostyle_invalid = Unknown Prado style library name '{0}'. csmanager_invalid_packages = Unkownn packages '{1}' for javascript packages defined in '{0}'. Valid packages are '{2}'. contentplaceholder_id_required = TContentPlaceHolder must have an ID. diff --git a/lib/prado/framework/I18N/TChoiceFormat.php b/lib/prado/framework/I18N/TChoiceFormat.php index 28f0487..81900c3 100644 --- a/lib/prado/framework/I18N/TChoiceFormat.php +++ b/lib/prado/framework/I18N/TChoiceFormat.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TDateFormat.php b/lib/prado/framework/I18N/TDateFormat.php index 5cb2ee8..3108508 100644 --- a/lib/prado/framework/I18N/TDateFormat.php +++ b/lib/prado/framework/I18N/TDateFormat.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TGlobalization.php b/lib/prado/framework/I18N/TGlobalization.php index 7976277..41c89c1 100644 --- a/lib/prado/framework/I18N/TGlobalization.php +++ b/lib/prado/framework/I18N/TGlobalization.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo<weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TGlobalizationAutoDetect.php b/lib/prado/framework/I18N/TGlobalizationAutoDetect.php index 2412712..707424d 100644 --- a/lib/prado/framework/I18N/TGlobalizationAutoDetect.php +++ b/lib/prado/framework/I18N/TGlobalizationAutoDetect.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo<weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ * @package System.I18N diff --git a/lib/prado/framework/I18N/TI18NControl.php b/lib/prado/framework/I18N/TI18NControl.php index d784dfc..b89440d 100644 --- a/lib/prado/framework/I18N/TI18NControl.php +++ b/lib/prado/framework/I18N/TI18NControl.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TNumberFormat.php b/lib/prado/framework/I18N/TNumberFormat.php index ac7a736..4e8a022 100644 --- a/lib/prado/framework/I18N/TNumberFormat.php +++ b/lib/prado/framework/I18N/TNumberFormat.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TTranslate.php b/lib/prado/framework/I18N/TTranslate.php index 1289a70..9f70a50 100644 --- a/lib/prado/framework/I18N/TTranslate.php +++ b/lib/prado/framework/I18N/TTranslate.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/TTranslateParameter.php b/lib/prado/framework/I18N/TTranslateParameter.php index a12546e..230c0a9 100644 --- a/lib/prado/framework/I18N/TTranslateParameter.php +++ b/lib/prado/framework/I18N/TTranslateParameter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/Translation.php b/lib/prado/framework/I18N/Translation.php index 69b3eb4..4e244a4 100644 --- a/lib/prado/framework/I18N/Translation.php +++ b/lib/prado/framework/I18N/Translation.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.I18N */ diff --git a/lib/prado/framework/I18N/core/TCache_Lite.php b/lib/prado/framework/I18N/core/TCache_Lite.php index 69e1c30..b42bf1f 100644 --- a/lib/prado/framework/I18N/core/TCache_Lite.php +++ b/lib/prado/framework/I18N/core/TCache_Lite.php @@ -228,7 +228,7 @@ class TCache_Lite * @param array $options options * @access public */ - function TCache_Lite($options = array(null)) + function __construct($options = array(null)) { $availableOptions = array( 'automaticSerialization', 'fileNameProtection', @@ -533,18 +533,11 @@ class TCache_Lite // because the filesize can be cached by PHP itself... clearstatcache(); $length = @filesize($this->_file); - if(version_compare(PHP_VERSION, '5.3.0', 'lt')) - { - $mqr = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - } if ($this->_readControl) { $hashControl = @fread($fp, 32); $length = $length - 32; } $data = @fread($fp, $length); - if(isset($mqr)) - set_magic_quotes_runtime($mqr); if ($this->_fileLocking) @flock($fp, LOCK_UN); @fclose($fp); if ($this->_readControl) { diff --git a/lib/prado/framework/IO/TTextWriter.php b/lib/prado/framework/IO/TTextWriter.php index 44dc3bd..237755f 100644 --- a/lib/prado/framework/IO/TTextWriter.php +++ b/lib/prado/framework/IO/TTextWriter.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.IO */ diff --git a/lib/prado/framework/PradoBase.php b/lib/prado/framework/PradoBase.php index de8c465..7cd2618 100644 --- a/lib/prado/framework/PradoBase.php +++ b/lib/prado/framework/PradoBase.php @@ -7,7 +7,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ @@ -84,9 +84,17 @@ class PradoBase */ set_error_handler(array('PradoBase','phpErrorHandler')); /** + * Sets shutdown function to be Prado::phpFatalErrorHandler + */ + register_shutdown_function(array('PradoBase','phpFatalErrorHandler')); + /** * Sets exception handler to be Prado::exceptionHandler */ set_exception_handler(array('PradoBase','exceptionHandler')); + /** + * Disable php's builtin error reporting to avoid duplicated reports + */ + ini_set('display_errors', 0); } /** @@ -97,8 +105,6 @@ class PradoBase public static function autoload($className) { include_once($className.self::CLASS_FILE_EXT); - if(!class_exists($className,false) && !interface_exists($className,false)) - self::fatalError("Class file for '$className' cannot be found."); } /** @@ -135,6 +141,23 @@ class PradoBase } /** + * PHP shutdown function used to catch fatal errors. + * This method should be registered as PHP error handler using + * {@link register_shutdown_function}. The method throws an exception that + * contains the error information. + */ + public static function phpFatalErrorHandler() + { + $error = error_get_last(); + if($error && + TPhpErrorException::isFatalError($error) && + error_reporting() & $error['type']) + { + self::exceptionHandler(new TPhpErrorException($error['type'],$error['message'],$error['file'],$error['line'])); + } + } + + /** * Default exception handler. * This method should be registered as default exception handler using * {@link set_exception_handler}. The method tries to use the errorhandler diff --git a/lib/prado/framework/Security/IUserManager.php b/lib/prado/framework/Security/IUserManager.php index ee37b64..ff69c21 100644 --- a/lib/prado/framework/Security/IUserManager.php +++ b/lib/prado/framework/Security/IUserManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TAuthManager.php b/lib/prado/framework/Security/TAuthManager.php index 52d30d9..aaa816f 100644 --- a/lib/prado/framework/Security/TAuthManager.php +++ b/lib/prado/framework/Security/TAuthManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TAuthorizationRule.php b/lib/prado/framework/Security/TAuthorizationRule.php index 1b86496..9f9aa50 100644 --- a/lib/prado/framework/Security/TAuthorizationRule.php +++ b/lib/prado/framework/Security/TAuthorizationRule.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TDbUserManager.php b/lib/prado/framework/Security/TDbUserManager.php index 4a9f032..578059d 100644 --- a/lib/prado/framework/Security/TDbUserManager.php +++ b/lib/prado/framework/Security/TDbUserManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TSecurityManager.php b/lib/prado/framework/Security/TSecurityManager.php index c9283bc..1b61211 100644 --- a/lib/prado/framework/Security/TSecurityManager.php +++ b/lib/prado/framework/Security/TSecurityManager.php @@ -5,7 +5,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TUser.php b/lib/prado/framework/Security/TUser.php index 8be382c..ffa34d8 100644 --- a/lib/prado/framework/Security/TUser.php +++ b/lib/prado/framework/Security/TUser.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/Security/TUserManager.php b/lib/prado/framework/Security/TUserManager.php index 6ca8a42..b7e0383 100644 --- a/lib/prado/framework/Security/TUserManager.php +++ b/lib/prado/framework/Security/TUserManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Security */ diff --git a/lib/prado/framework/TApplication.php b/lib/prado/framework/TApplication.php index 1ae868d..3982fe7 100644 --- a/lib/prado/framework/TApplication.php +++ b/lib/prado/framework/TApplication.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/TApplicationComponent.php b/lib/prado/framework/TApplicationComponent.php index d58c74c..b167181 100644 --- a/lib/prado/framework/TApplicationComponent.php +++ b/lib/prado/framework/TApplicationComponent.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/TComponent.php b/lib/prado/framework/TComponent.php index 5901f93..127b68a 100644 --- a/lib/prado/framework/TComponent.php +++ b/lib/prado/framework/TComponent.php @@ -8,7 +8,7 @@ * @author Brad Anderson <javalizard@mac.com> * * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ @@ -1698,16 +1698,6 @@ class TComponent } /** - * Do not call this method. This is a PHP magic method that will be called automatically - * after any unserialization; it can perform reinitialization tasks on the object. - */ - public function __wakeup() - { - if ($this->_e===null) - $this->_e = array(); - } - - /** * Returns an array with the names of all variables of that object that should be serialized. * Do not call this method. This is a PHP magic method that will be called automatically * prior to any serialization. @@ -1717,6 +1707,18 @@ class TComponent $a = (array)$this; $a = array_keys($a); $exprops = array(); + $this->_getZappableSleepProps($exprops); + return array_diff($a, $exprops); + } + + /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { if($this->_listeningenabled===false) $exprops[] = "\0TComponent\0_listeningenabled"; if($this->_behaviorsenabled===true) @@ -1725,7 +1727,6 @@ class TComponent $exprops[] = "\0TComponent\0_e"; if ($this->_m===null) $exprops[] = "\0TComponent\0_m"; - return array_diff($a,$exprops); } } diff --git a/lib/prado/framework/TModule.php b/lib/prado/framework/TModule.php index ba5686c..9148cb3 100644 --- a/lib/prado/framework/TModule.php +++ b/lib/prado/framework/TModule.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/TService.php b/lib/prado/framework/TService.php index a9d9e5e..e4c61e3 100644 --- a/lib/prado/framework/TService.php +++ b/lib/prado/framework/TService.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/TShellApplication.php b/lib/prado/framework/TShellApplication.php index 10844cd..619656e 100644 --- a/lib/prado/framework/TShellApplication.php +++ b/lib/prado/framework/TShellApplication.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/Util/TCallChain.php b/lib/prado/framework/Util/TCallChain.php index 4e9e23f..4989164 100644 --- a/lib/prado/framework/Util/TCallChain.php +++ b/lib/prado/framework/Util/TCallChain.php @@ -19,7 +19,7 @@ class TCallChain extends TList implements IDynamicMethods { /** - * @var {@link TListIterator} for moving through the chained method calls + * @var {@link ArrayIterator} for moving through the chained method calls */ private $_iterator=null; @@ -97,7 +97,7 @@ class TCallChain extends TList implements IDynamicMethods if(!$this->_iterator) { $chain_array=array_reverse($this->toArray()); - $this->_iterator=new TListIterator($chain_array); + $this->_iterator=new ArrayIterator($chain_array); } if($this->_iterator->valid()) do { diff --git a/lib/prado/framework/Util/TDataFieldAccessor.php b/lib/prado/framework/Util/TDataFieldAccessor.php index e86b8c1..d718165 100644 --- a/lib/prado/framework/Util/TDataFieldAccessor.php +++ b/lib/prado/framework/Util/TDataFieldAccessor.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TDateTimeStamp.php b/lib/prado/framework/Util/TDateTimeStamp.php index 2bc2a9f..260301f 100644 --- a/lib/prado/framework/Util/TDateTimeStamp.php +++ b/lib/prado/framework/Util/TDateTimeStamp.php @@ -4,7 +4,7 @@ * @author Fabio Bas ctrlaltca[AT]gmail[DOT]com * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TLogRouter.php b/lib/prado/framework/Util/TLogRouter.php index 5b40f54..2e1201b 100644 --- a/lib/prado/framework/Util/TLogRouter.php +++ b/lib/prado/framework/Util/TLogRouter.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TLogger.php b/lib/prado/framework/Util/TLogger.php index 6f188b0..4f1de3c 100644 --- a/lib/prado/framework/Util/TLogger.php +++ b/lib/prado/framework/Util/TLogger.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TParameterModule.php b/lib/prado/framework/Util/TParameterModule.php index 4819d30..ce600f6 100644 --- a/lib/prado/framework/Util/TParameterModule.php +++ b/lib/prado/framework/Util/TParameterModule.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TSimpleDateFormatter.php b/lib/prado/framework/Util/TSimpleDateFormatter.php index 7e9fec6..021948e 100644 --- a/lib/prado/framework/Util/TSimpleDateFormatter.php +++ b/lib/prado/framework/Util/TSimpleDateFormatter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Util/TVarDumper.php b/lib/prado/framework/Util/TVarDumper.php index c531848..9c09dea 100644 --- a/lib/prado/framework/Util/TVarDumper.php +++ b/lib/prado/framework/Util/TVarDumper.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Util */ diff --git a/lib/prado/framework/Web/Javascripts/TJavaScript.php b/lib/prado/framework/Web/Javascripts/TJavaScript.php index b92b0c3..bd0f2be 100644 --- a/lib/prado/framework/Web/Javascripts/TJavaScript.php +++ b/lib/prado/framework/Web/Javascripts/TJavaScript.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo<weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.Javascripts */ diff --git a/lib/prado/framework/Web/Javascripts/css-packages.php b/lib/prado/framework/Web/Javascripts/css-packages.php new file mode 100644 index 0000000..8bc5fe5 --- /dev/null +++ b/lib/prado/framework/Web/Javascripts/css-packages.php @@ -0,0 +1,93 @@ +<?php + +//$Id: packages.php 3319 2013-09-08 20:59:44Z ctrlaltca $ + +// To make future upgrades easier +if (!defined('JQUERY_DIR')) define ('JQUERY_DIR', 'jquery'); +if (!defined('BOOTSTRAP_DIR')) define ('BOOTSTRAP_DIR', 'bootstrap3'); + +//package names and its contents (files relative to the current directory) +$packages = array( + 'jquery-ui' => array( + JQUERY_DIR.'/css/base/jquery-ui.css', + ), + 'jquery.ui.accordion' => array( + JQUERY_DIR.'/css/base/jquery.ui.accordion.css', + ), + 'jquery.ui.autocomplete' => array( + JQUERY_DIR.'/css/base/jquery.ui.autocomplete.css', + ), + 'jquery.ui.button' => array( + JQUERY_DIR.'/css/base/jquery.ui.button.css', + ), + 'jquery.ui.core' => array( + JQUERY_DIR.'/css/base/jquery.ui.core.css', + ), + 'jquery.ui.datepicker' => array( + JQUERY_DIR.'/css/base/jquery.ui.datepicker.css', + ), + 'jquery.ui.dialog' => array( + JQUERY_DIR.'/css/base/jquery.ui.dialog.css', + ), + 'jquery.ui.menu' => array( + JQUERY_DIR.'/css/base/jquery.ui.menu.css', + ), + 'jquery.ui.progressbar' => array( + JQUERY_DIR.'/css/base/jquery.ui.progressbar.css', + ), + 'jquery.ui.resizable' => array( + JQUERY_DIR.'/css/base/jquery.ui.resizable.css', + ), + 'jquery.ui.selectable' => array( + JQUERY_DIR.'/css/base/jquery.ui.selectable.css', + ), + 'jquery.ui.slider' => array( + JQUERY_DIR.'/css/base/jquery.ui.slider.css', + ), + 'jquery.ui.spinner' => array( + JQUERY_DIR.'/css/base/jquery.ui.spinner.css', + ), + 'jquery.ui.tabs' => array( + JQUERY_DIR.'/css/base/jquery.ui.tabs.css', + ), + 'jquery.ui.theme' => array( + JQUERY_DIR.'/css/base/jquery.ui.theme.css', + ), + 'jquery.ui.tooltip' => array( + JQUERY_DIR.'/css/base/jquery.ui.tooltip.css', + ), + + // bootstrap + 'bootstrap' => array( + BOOTSTRAP_DIR.'/css/bootstrap.css', + ), + 'bootstrap-theme' => array( + BOOTSTRAP_DIR.'/css/bootstrap-theme.css', + ), +); + + +//package names and their dependencies +$dependencies = array( + 'jquery-ui' => array('jquery-ui'), + 'jquery.ui.accordion' => array('jquery.ui.core', 'jquery.ui.accordion'), + 'jquery.ui.autocomplete' => array('jquery.ui.core', 'jquery.ui.autocomplete'), + 'jquery.ui.button' => array('jquery.ui.core', 'jquery.ui.button'), + 'jquery.ui.core' => array('jquery.ui.core'), + 'jquery.ui.datepicker' => array('jquery.ui.core', 'jquery.ui.datepicker'), + 'jquery.ui.dialog' => array('jquery.ui.core', 'jquery.ui.dialog'), + 'jquery.ui.menu' => array('jquery.ui.core', 'jquery.ui.menu'), + 'jquery.ui.progressbar' => array('jquery.ui.core', 'jquery.ui.progressbar'), + 'jquery.ui.resizable' => array('jquery.ui.core', 'jquery.ui.resizable'), + 'jquery.ui.selectable' => array('jquery.ui.core', 'jquery.ui.selectable'), + 'jquery.ui.slider' => array('jquery.ui.core', 'jquery.ui.slider'), + 'jquery.ui.spinner' => array('jquery.ui.core', 'jquery.ui.spinner'), + 'jquery.ui.tabs' => array('jquery.ui.core', 'jquery.ui.tabs'), + 'jquery.ui.theme' => array('jquery.ui.core', 'jquery.ui.theme'), + 'jquery.ui.tooltip' => array('jquery.ui.core', 'jquery.ui.tooltip'), + 'bootstrap' => array('bootstrap'), + 'bootstrap-theme' => array('bootstrap', 'bootstrap-theme'), +); + +return array($packages, $dependencies); + diff --git a/lib/prado/framework/Web/Javascripts/packages.php b/lib/prado/framework/Web/Javascripts/packages.php index fe16d97..68b4822 100644 --- a/lib/prado/framework/Web/Javascripts/packages.php +++ b/lib/prado/framework/Web/Javascripts/packages.php @@ -95,7 +95,7 @@ $packages = array( //bootstrap 'bootstrap' => array( - BOOTSTRAP_DIR.'/js/bootstrap.js', + BOOTSTRAP_DIR.'/js/bootstrap.js', ), 'dragdrop'=>array( diff --git a/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js index e0e67ce..1115c3b 100644 --- a/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js @@ -270,6 +270,7 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack, // go! this.options.data = this.getParameters(); this.options.url = this.getCallbackUrl(); + this.options.timeout = this.getRequestTimeOut(); this.request = Prado.CallbackRequestManager.ajax(this.options); }, @@ -449,8 +450,7 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack, }, /** - * Updates the page state. It will update only if EnablePageStateUpdate and - * HasPriority options are both true. + * Updates the page state. It will update only if EnablePageStateUpdate is true. */ updatePageState : function(request, datain) { diff --git a/lib/prado/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js b/lib/prado/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js index 1599827..04c02ac 100755 --- a/lib/prado/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js @@ -20,6 +20,8 @@ Prado.WebUI.TActiveFileUpload = jQuery.klass(Prado.WebUI.Control, }, fileChanged : function(){ + // ie11 fix + if(this.input.value=='') return; // show the upload indicator, and hide the complete and error indicators (if they areSn't already). this.flag.value = '1'; this.complete.style.display = 'none'; diff --git a/lib/prado/framework/Web/Javascripts/source/prado/prado.js b/lib/prado/framework/Web/Javascripts/source/prado/prado.js index e100dc7..0a1c485 100644 --- a/lib/prado/framework/Web/Javascripts/source/prado/prado.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/prado.js @@ -446,7 +446,11 @@ Prado.Element = focus : function(element) { - jQuery("#"+element).focus(); + jQuery(document).ajaxStop(function () { + setTimeout(function(){ + jQuery("#"+element).focus(); + }, 100); + }); }, /** diff --git a/lib/prado/framework/Web/Javascripts/source/prado/validator/validation3.js b/lib/prado/framework/Web/Javascripts/source/prado/validator/validation3.js index 98be95d..6dcf02e 100644 --- a/lib/prado/framework/Web/Javascripts/source/prado/validator/validation3.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/validator/validation3.js @@ -1239,6 +1239,8 @@ Prado.WebUI.TBaseValidator = jQuery.klass(Prado.WebUI.Control, case 'TActiveCheckBox': case 'TActiveRadioButton': return value; + case 'TReCaptcha2': + return document.getElementById(this.options.ResponseFieldName).value; default: if(this.isListControlType()) return value; @@ -1603,7 +1605,7 @@ Prado.WebUI.TActiveCustomValidator = jQuery.klass(Prado.WebUI.TBaseValidator, this.options.OnValidate(this, invoker); } - return this.isValid; + return true; }, /** @@ -1994,3 +1996,83 @@ Prado.WebUI.TReCaptchaValidator = jQuery.klass(Prado.WebUI.TBaseValidator, } }); +/** + * Registry for TReCaptcha2 components + */ +Prado.WebUI.TReCaptcha2Instances = {}; +/** + * Render callback; called by google's js when loaded + */ +TReCaptcha2_onloadCallback = function() +{ + jQuery.each(Prado.WebUI.TReCaptcha2Instances, function(index, item) { + item.build(); + }); +} + +/** + * TReCaptcha2 client-side control. + * + * @class Prado.WebUI.TReCaptcha2 + * @extends Prado.WebUI.Control + */ +Prado.WebUI.TReCaptcha2 = jQuery.klass(Prado.WebUI.Control, +{ + onInit: function(options) + { + for (key in options) { this[key] = options[key]; } + this.options['callback'] = jQuery.proxy(this.callback,this); + this.options['expired-callback'] = jQuery.proxy(this.callbackExpired,this); + + Prado.WebUI.TReCaptcha2Instances[this.element.id] = this; + }, + build: function() + { + if (grecaptcha !== undefined) this.widgetId = grecaptcha.render(this.element, this.options); + }, + callback: function(response) + { + var responseField = jQuery('#' + this.ID + ' textarea').attr('id'); + var params = { + widgetId: this.widgetId, + response: response, + responseField: responseField, + onCallback: this.onCallback + }; + var request = new Prado.CallbackRequest(this.EventTarget,this); + request.setCallbackParameter(params); + request.dispatch(); + }, + callbackExpired: function() + { + var responseField = jQuery('#' + this.ID + ' textarea').attr('id'); + var params = { + responseField: responseField, + onCallbackExpired: this.onCallbackExpired + }; + var request = new Prado.CallbackRequest(this.EventTarget,this); + request.setCallbackParameter(params); + request.dispatch(); + } +}); + +/** + * TReCaptcha2Validator client-side control. + * + * @class Prado.WebUI.TReCaptcha2Validator + * @extends Prado.WebUI.TBaseValidator + */ +Prado.WebUI.TReCaptcha2Validator = jQuery.klass(Prado.WebUI.TBaseValidator, +{ + /** + * Evaluate validation state + * @function {boolean} ? + * @return True if the captcha has validate, False otherwise. + */ + evaluateIsValid : function() + { + var a = this.getValidationValue(); + var b = this.trim(this.options.InitialValue); + return(a != b); + } +});
\ No newline at end of file diff --git a/lib/prado/framework/Web/Services/TFeedService.php b/lib/prado/framework/Web/Services/TFeedService.php index dc9c064..20ef0f3 100644 --- a/lib/prado/framework/Web/Services/TFeedService.php +++ b/lib/prado/framework/Web/Services/TFeedService.php @@ -5,7 +5,7 @@ * @author Qiang Xue <qiang.xue@gmail.com> * @author Knut Urdalen <knut.urdalen@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Web.Services diff --git a/lib/prado/framework/Web/Services/TJsonService.php b/lib/prado/framework/Web/Services/TJsonService.php index d17b330..f2d2609 100644 --- a/lib/prado/framework/Web/Services/TJsonService.php +++ b/lib/prado/framework/Web/Services/TJsonService.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.Services */ diff --git a/lib/prado/framework/Web/Services/TPageService.php b/lib/prado/framework/Web/Services/TPageService.php index 4a422c4..b20617e 100644 --- a/lib/prado/framework/Web/Services/TPageService.php +++ b/lib/prado/framework/Web/Services/TPageService.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.Services */ diff --git a/lib/prado/framework/Web/Services/TSoapService.php b/lib/prado/framework/Web/Services/TSoapService.php index 9554af2..11abe5a 100644 --- a/lib/prado/framework/Web/Services/TSoapService.php +++ b/lib/prado/framework/Web/Services/TSoapService.php @@ -5,7 +5,7 @@ * @author Knut Urdalen <knut.urdalen@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.Services */ diff --git a/lib/prado/framework/Web/TAssetManager.php b/lib/prado/framework/Web/TAssetManager.php index d84ca56..eef5fbf 100644 --- a/lib/prado/framework/Web/TAssetManager.php +++ b/lib/prado/framework/Web/TAssetManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ diff --git a/lib/prado/framework/Web/TCacheHttpSession.php b/lib/prado/framework/Web/TCacheHttpSession.php index 604eef4..a1784e0 100644 --- a/lib/prado/framework/Web/TCacheHttpSession.php +++ b/lib/prado/framework/Web/TCacheHttpSession.php @@ -5,7 +5,7 @@ * @author Carl G. Mathisen <carlgmathisen@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web * @since 3.1.1 diff --git a/lib/prado/framework/Web/THttpRequest.php b/lib/prado/framework/Web/THttpRequest.php index f89c354..926cfa4 100644 --- a/lib/prado/framework/Web/THttpRequest.php +++ b/lib/prado/framework/Web/THttpRequest.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ @@ -816,7 +816,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar */ public function getIterator() { - return new TMapIterator($this->_items); + return new ArrayIterator($this->_items); } /** diff --git a/lib/prado/framework/Web/THttpResponse.php b/lib/prado/framework/Web/THttpResponse.php index 21e6410..93d3c91 100644 --- a/lib/prado/framework/Web/THttpResponse.php +++ b/lib/prado/framework/Web/THttpResponse.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ diff --git a/lib/prado/framework/Web/THttpResponseAdapter.php b/lib/prado/framework/Web/THttpResponseAdapter.php index 7f87590..276dfe2 100644 --- a/lib/prado/framework/Web/THttpResponseAdapter.php +++ b/lib/prado/framework/Web/THttpResponseAdapter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Web diff --git a/lib/prado/framework/Web/THttpSession.php b/lib/prado/framework/Web/THttpSession.php index 50d11b1..35cd89b 100644 --- a/lib/prado/framework/Web/THttpSession.php +++ b/lib/prado/framework/Web/THttpSession.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ diff --git a/lib/prado/framework/Web/THttpUtility.php b/lib/prado/framework/Web/THttpUtility.php index 2be5fa4..8b8b9f6 100644 --- a/lib/prado/framework/Web/THttpUtility.php +++ b/lib/prado/framework/Web/THttpUtility.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ diff --git a/lib/prado/framework/Web/TUrlManager.php b/lib/prado/framework/Web/TUrlManager.php index 0525a7e..e392a07 100644 --- a/lib/prado/framework/Web/TUrlManager.php +++ b/lib/prado/framework/Web/TUrlManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id $ * @package System.Web diff --git a/lib/prado/framework/Web/TUrlMapping.php b/lib/prado/framework/Web/TUrlMapping.php index f7fdba6..5d8ab82 100644 --- a/lib/prado/framework/Web/TUrlMapping.php +++ b/lib/prado/framework/Web/TUrlMapping.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveButton.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveButton.php index ae5b7f0..cc88423 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveButton.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveButton.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -94,6 +94,9 @@ class TActiveButton extends TButton implements ICallbackEventHandler, IActiveCon */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'value', $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBox.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBox.php index 034666f..058ba70 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBox.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBox.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -88,6 +88,9 @@ class TActiveCheckBox extends TCheckBox implements ICallbackEventHandler, IActiv */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->update( @@ -103,6 +106,9 @@ class TActiveCheckBox extends TCheckBox implements ICallbackEventHandler, IActiv public function setChecked($value) { $value = TPropertyValue::ensureBoolean($value); + if(parent::getChecked() === $value) + return; + parent::setChecked($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->check($this, $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php index dfcb72c..4b31d86 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -63,6 +63,17 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall } /** + * Since at least a control with id is needed to update the content during callback, + * always force the surrounding span to be rendered, so initially empty lists can be + * updated later. + *@return boolean always true + */ + protected function getSpanNeeded () + { + return true; + } + + /** * Override parent implementation, no javascript is rendered here instead * the javascript required for active control is registered in {@link addAttributesToRender}. */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveClientScript.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveClientScript.php index 4093d8f..01a88a4 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveClientScript.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveClientScript.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveControlAdapter.php index 0cd39c7..f68c7a3 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveControlAdapter.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveControlAdapter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php index 18f9f5f..0814c7c 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveCustomValidator.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -104,6 +104,9 @@ class TActiveCustomValidator extends TCustomValidator */ public function setIsValid($value) { + // Always update the clientside, since the clientside's value for IsValid + // it could have been changed by the clientside validation. + parent::setIsValid($value); if($this->getActiveControl()->canUpdateClientSide()) { @@ -137,11 +140,15 @@ class TActiveCustomValidator extends TCustomValidator } /** - * Sets the text for the error message. Updates client-side erorr message. + * Sets the text for the error message. Updates client-side error message. * @param string the error message */ public function setErrorMessage($value) { + if(parent::getErrorMessage() === $value) + return; + + parent::setErrorMessage($value); if($this->getActiveControl()->canUpdateClientSide()) { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveDatePicker.php index 6328bac..72f9953 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveDatePicker.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveDatePicker.php @@ -5,7 +5,7 @@ * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -89,6 +89,9 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I * @param string text content for the textbox */ public function setText($value){ + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){ $cb=$this->getPage()->getCallbackClient(); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveDropDownList.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveDropDownList.php index 3245ea6..2f09c03 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveDropDownList.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveDropDownList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveFileUpload.php index 6f051ba..0435041 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveFileUpload.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveFileUpload.php @@ -101,8 +101,7 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback // save the file so that it will persist past the end of this return. $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),'')); parent::saveAs($localName); - - $this->_localName = $localName; + $this->_localName = $localName; $params = new TActiveFileUploadCallbackParams; $params->localName = $localName; diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveHiddenField.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveHiddenField.php index f87ff07..fbd8eda 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveHiddenField.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveHiddenField.php @@ -4,7 +4,7 @@ * * @author Carl G. Mathisen <carlgmathisen@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Web.UI.ActiveControls @@ -55,6 +55,9 @@ class TActiveHiddenField extends THiddenField implements ICallbackEventHandler, */ public function setValue($value) { + if(parent::getValue() === $value) + return; + parent::setValue($value); if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) $this->getPage()->getCallbackClient()->setValue($this, $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveHyperLink.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveHyperLink.php index 2ffee7e..5e98250 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveHyperLink.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveHyperLink.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -50,6 +50,9 @@ class TActiveHyperLink extends THyperLink implements IActiveControl */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->update($this, $value); @@ -61,6 +64,9 @@ class TActiveHyperLink extends THyperLink implements IActiveControl */ public function setImageUrl($value) { + if(parent::getImageUrl() === $value) + return; + parent::setImageUrl($value); if($this->getActiveControl()->canUpdateClientSide() && $value !== '') { @@ -77,6 +83,9 @@ class TActiveHyperLink extends THyperLink implements IActiveControl */ public function setNavigateUrl($value) { + if(parent::getNavigateUrl() === $value) + return; + parent::setNavigateUrl($value); if($this->getActiveControl()->canUpdateClientSide()) { @@ -92,6 +101,9 @@ class TActiveHyperLink extends THyperLink implements IActiveControl */ public function setTarget($value) { + if(parent::getTarget() === $value) + return; + parent::setTarget($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'target', $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveImage.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveImage.php index 13d5314..4058599 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveImage.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveImage.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -48,6 +48,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setAlternateText($value) { + if(parent::getAlternateText() === $value) + return; + parent::setAlternateText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); @@ -62,6 +65,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setImageAlign($value) { + if(parent::getImageAlign() === $value) + return; + parent::setImageAlign($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); @@ -72,6 +78,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setImageUrl($value) { + if(parent::getImageUrl() === $value) + return; + parent::setImageUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); @@ -82,6 +91,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setDescriptionUrl($value) { + if(parent::getDescriptionUrl() === $value) + return; + parent::setDescriptionUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveImageButton.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveImageButton.php index 351a996..6f2ceed 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveImageButton.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveImageButton.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -58,6 +58,9 @@ class TActiveImageButton extends TImageButton implements IActiveControl, ICallba */ public function setAlternateText($value) { + if(parent::getAlternateText() === $value) + return; + parent::setAlternateText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); @@ -72,6 +75,9 @@ class TActiveImageButton extends TImageButton implements IActiveControl, ICallba */ public function setImageAlign($value) { + if(parent::getImageAlign() === $value) + return; + parent::setImageAlign($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); @@ -82,6 +88,9 @@ class TActiveImageButton extends TImageButton implements IActiveControl, ICallba */ public function setImageUrl($value) { + if(parent::getImageUrl() === $value) + return; + parent::setImageUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); @@ -92,6 +101,9 @@ class TActiveImageButton extends TImageButton implements IActiveControl, ICallba */ public function setDescriptionUrl($value) { + if(parent::getDescriptionUrl() === $value) + return; + parent::setDescriptionUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveLabel.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveLabel.php index 70ff20e..a0825f8 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveLabel.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveLabel.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -55,6 +55,9 @@ class TActiveLabel extends TLabel implements IActiveControl */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->update($this, $value); @@ -68,6 +71,9 @@ class TActiveLabel extends TLabel implements IActiveControl */ public function setForControl($value) { + if(parent::getForControl() === $value) + return; + parent::setForControl($value); if($this->getActiveControl()->canUpdateClientSide()) { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveLinkButton.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveLinkButton.php index aaf2d35..7c2159a 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveLinkButton.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveLinkButton.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -95,6 +95,9 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->update($this, $value); @@ -131,6 +134,9 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback */ public function setEnabled($value) { + if(parent::getEnabled() === $value) + return; + parent::setEnabled($value); if($this->getActiveControl()->canUpdateClientSide()) { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveListBox.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveListBox.php index e32a8eb..82fe662 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveListBox.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveListBox.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -85,6 +85,9 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH */ public function setSelectionMode($value) { + if(parent::getSelectionMode() === $value) + return; + parent::setSelectionMode($value); $multiple = $this->getIsMultiSelect(); $id = $this->getUniqueID(); $multi_id = $id.'[]'; diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php index 927912b..04539f3 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php index 215706e..45c137d 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php @@ -92,9 +92,11 @@ class TActiveMultiView extends TMultiView implements IActiveControl */ public function setActiveViewIndex($value) { - $old=parent::getActiveViewIndex(); + if(parent::getActiveViewIndex() === $value) + return; + parent::setActiveViewIndex($value); - if($this->getActiveControl()->canUpdateClientSide() && $old!=$value) + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); } @@ -104,9 +106,11 @@ class TActiveMultiView extends TMultiView implements IActiveControl */ public function setActiveView($value) { - $old=parent::getActiveView(); + if(parent::getActiveView() === $value) + return; + parent::setActiveView($value); - if($this->getActiveControl()->canUpdateClientSide() && $old!=$value) + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); } } diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/lib/prado/framework/Web/UI/ActiveControls/TActivePageAdapter.php index 1803f44..2cdcaba 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActivePageAdapter.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActivePageAdapter.php @@ -5,7 +5,7 @@ * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (lazyload additions & progressive rendering) * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActivePager.php b/lib/prado/framework/Web/UI/ActiveControls/TActivePager.php index e99743f..d8d2fb6 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActivePager.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActivePager.php @@ -4,7 +4,7 @@ * * @author "gevik" (forum contributor) and Christophe Boulain (Christophe.Boulain@gmail.com) * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActivePanel.php b/lib/prado/framework/Web/UI/ActiveControls/TActivePanel.php index 5192b0d..992ccb8 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActivePanel.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActivePanel.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButton.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButton.php index 90190a1..8dd3927 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButton.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButton.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -87,6 +87,9 @@ class TActiveRadioButton extends TRadioButton implements IActiveControl, ICallba */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->update( @@ -102,6 +105,9 @@ class TActiveRadioButton extends TRadioButton implements IActiveControl, ICallba public function setChecked($value) { $value = TPropertyValue::ensureBoolean($value); + if(parent::getChecked() === $value) + return; + parent::setChecked($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->check($this, $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php index 9acb672..e6b0cbb 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveRatingList.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveRatingList.php index a154eb6..9c985d5 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveRatingList.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveRatingList.php @@ -5,7 +5,7 @@ * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @author Bradley Booms <bradley[dot]booms[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Web.UI.ActiveControls @@ -80,6 +80,9 @@ class TActiveRatingList extends TRatingList implements IActiveControl, ICallback */ public function setReadOnly($value) { + if(parent::getReadOnly() === $value) + return; + parent::setReadOnly($value); $value = $this->getReadOnly(); $this->callClientFunction('setReadOnly',$value); @@ -90,6 +93,9 @@ class TActiveRatingList extends TRatingList implements IActiveControl, ICallback */ public function setRating($value) { + if(parent::getRating() === $value) + return; + parent::setRating($value); $value = $this->getRating(); $this->callClientFunction('setRating',$value); @@ -115,6 +121,9 @@ class TActiveRatingList extends TRatingList implements IActiveControl, ICallback */ public function setCaption($value) { + if(parent::getCaption() === $value) + return; + parent::setCaption($value); // if it's an active control, this should not be needed. $this->callClientFunction('setCaption',$value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveTextBox.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveTextBox.php index f80b498..fa1740e 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveTextBox.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveTextBox.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -62,6 +62,9 @@ class TActiveTextBox extends TTextBox implements ICallbackEventHandler, IActiveC */ public function setText($value) { + if(parent::getText() === $value) + return; + parent::setText($value); if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) $this->getPage()->getCallbackClient()->setValue($this, $value); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TAutoComplete.php b/lib/prado/framework/Web/UI/ActiveControls/TAutoComplete.php index e396e11..744565a 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TAutoComplete.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TAutoComplete.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -18,6 +18,9 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter'); /** * TAutoComplete class. * + * Warning: this class is deprecatd and will be removed in a future release. + * We suggest you to investigate using {@link TJuiAutoComplete} instead. + * * TAutoComplete is a textbox that provides a list of suggestion on * the current partial word typed in the textbox. The suggestions are * requested using callbacks, and raises the {@link onSuggestion OnSuggestion} @@ -78,6 +81,7 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter'); * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @package System.Web.UI.ActiveControls * @since 3.1 + * @deprecated Use TJuiAutoComplete instead */ class TAutoComplete extends TActiveTextBox implements INamingContainer { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/lib/prado/framework/Web/UI/ActiveControls/TBaseActiveControl.php index 01583eb..5ac51fd 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallback.php b/lib/prado/framework/Web/UI/ActiveControls/TCallback.php index 1aae6ce..eb78b54 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallback.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallback.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientScript.php index 1f631f2..12309bb 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientSide.php index 874aeb4..4cb482a 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientSide.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallbackClientSide.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -38,11 +38,8 @@ * * - <b>PostState</b> true to collect the form inputs and post them during callback, default is true. * - <b>RequestTimeOut</b> The request timeout in milliseconds. - * - <b>HasPriority</b> true to ensure that the callback request will be sent - * immediately and will abort existing prioritized requests. It does not affect - * callbacks that are not prioritized. * - <b>EnablePageStateUpdate</b> enable the callback response to enable the - * viewstate update. This will automatically set HasPriority to true when enabled. + * viewstate update. * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @package System.Web.UI.ActiveControls @@ -239,23 +236,23 @@ class TCallbackClientSide extends TClientSideOptions * @return boolean true if the callback request has priority and will abort * existing prioritized request in order to send immediately. It does not * affect callbacks that are not prioritized. Default is true. + * @deprecated since 3.3.0 */ public function getHasPriority() { - $option = $this->getOption('HasPriority'); - return ($option===null) ? true : $option; + return true; } /** * @param boolean true to ensure that the callback request will be sent * immediately and will abort existing prioritized requests. It does not * affect callbacks that are not prioritized. + * @deprecated since 3.3.0 */ public function setHasPriority($value) { - $hasPriority = TPropertyValue::ensureBoolean($value); - $this->setOption('HasPriority', $hasPriority); - if(!$hasPriority) + // mimic the old behavior + if(!$value) $this->setEnablePageStateUpdate(false); } @@ -269,8 +266,6 @@ class TCallbackClientSide extends TClientSideOptions { $enabled = TPropertyValue::ensureBoolean($value); $this->setOption('EnablePageStateUpdate', $enabled); - if($enabled) - $this->setHasPriority(true); } /** diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallbackEventParameter.php b/lib/prado/framework/Web/UI/ActiveControls/TCallbackEventParameter.php index 9306aec..5d585c4 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallbackEventParameter.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallbackEventParameter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @package System.Web.UI.ActiveControls diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallbackOptions.php b/lib/prado/framework/Web/UI/ActiveControls/TCallbackOptions.php index e79561d..e307145 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallbackOptions.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallbackOptions.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php b/lib/prado/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php index 4a1c41b..115c4c6 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TDraggable.php b/lib/prado/framework/Web/UI/ActiveControls/TDraggable.php index 3f6008b..830200e 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TDraggable.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TDraggable.php @@ -11,6 +11,9 @@ /** * TDraggable is a control which can be dragged * + * Warning: this class is deprecatd and will be removed in a future release. + * We suggest you to investigate using {@link TJuiDraggable} instead. + * * This control will make "draggable" control. * Properties : * @@ -25,6 +28,7 @@ * @copyright Copyright © 2008, PradoSoft * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls + * @deprecated Use TJuiDraggable instead */ class TDraggable extends TPanel { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TDropContainer.php b/lib/prado/framework/Web/UI/ActiveControls/TDropContainer.php index 49eb0db..216d3db 100755 --- a/lib/prado/framework/Web/UI/ActiveControls/TDropContainer.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TDropContainer.php @@ -21,6 +21,10 @@ Prado::using('System.Web.UI.ActiveControls.TActivePanel'); /** * TDropContainer is a panel where TDraggable controls can be dropped. + * + * Warning: this class is deprecatd and will be removed in a future release. + * We suggest you to investigate using {@link TJuiDroppable} instead. + * * When a TDraggable component is dropped into a TDropContainer, the {@link OnDrop OnDrop} event is raised. * The {@link TDropContainerEventParameter} param will contain the dropped control. * @@ -39,6 +43,7 @@ Prado::using('System.Web.UI.ActiveControls.TActivePanel'); * @copyright Copyright © 2008, PradoSoft * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls + * @deprecated Use TJuiDroppable instead */ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php b/lib/prado/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php index d990e09..aa00331 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/lib/prado/framework/Web/UI/ActiveControls/TInPlaceTextBox.php index d267729..2515184 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -13,7 +13,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveTextBox'); /** * TInPlaceTextBox Class - * * + * * TInPlaceTextBox is a component rendered as a label and allows its * contents to be edited by changing the label to a textbox when * the label is clicked or when another control or html element with @@ -135,6 +135,9 @@ class TInPlaceTextBox extends TActiveTextBox */ public function setText($value) { + if(TTextBox::getText() === $value) + return; + TTextBox::setText($value); if($this->getActiveControl()->canUpdateClientSide()) { @@ -152,6 +155,9 @@ class TInPlaceTextBox extends TActiveTextBox public function setReadOnly ($value) { $value=TPropertyValue::ensureBoolean($value); + if(TTextBox::getReadOnly() === $value) + return; + TTextBox::setReadOnly($value); if ($this->getActiveControl()->canUpdateClientSide()) { diff --git a/lib/prado/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php b/lib/prado/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php index b643de4..038f76d 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -46,6 +46,10 @@ class TTimeTriggeredCallback extends TCallback $interval = TPropertyValue::ensureFloat($value); if($interval <= 0) throw new TConfigurationException('callback_interval_be_positive', $this->getID()); + + if($this->getInterval() === $value) + return; + $this->setViewState('Interval', $interval, 1); if ($this->getActiveControl()->canUpdateClientSide()){ $client = $this->getPage()->getCallbackClient(); diff --git a/lib/prado/framework/Web/UI/ActiveControls/TTriggeredCallback.php b/lib/prado/framework/Web/UI/ActiveControls/TTriggeredCallback.php index 7675bc8..faebaf5 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TTriggeredCallback.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TTriggeredCallback.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php b/lib/prado/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php index 87a7d60..7f9a6b5 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ diff --git a/lib/prado/framework/Web/UI/JuiControls/TJuiAutoComplete.php b/lib/prado/framework/Web/UI/JuiControls/TJuiAutoComplete.php index be6b1b4..612d89d 100644 --- a/lib/prado/framework/Web/UI/JuiControls/TJuiAutoComplete.php +++ b/lib/prado/framework/Web/UI/JuiControls/TJuiAutoComplete.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.ActiveControls */ @@ -364,7 +364,7 @@ class TJuiAutoComplete extends TActiveTextBox implements INamingContainer, IJuiO */ public function renderSuggestions($writer) { - if($this->getActiveControl()->canUpdateClientSide()) + if($this->getActiveControl()->canUpdateClientSide(true)) { $data=array(); $items=$this->getSuggestions()->getItems(); diff --git a/lib/prado/framework/Web/UI/JuiControls/TJuiControlOptions.php b/lib/prado/framework/Web/UI/JuiControls/TJuiControlOptions.php index 64cf710..8b0cc84 100644 --- a/lib/prado/framework/Web/UI/JuiControls/TJuiControlOptions.php +++ b/lib/prado/framework/Web/UI/JuiControls/TJuiControlOptions.php @@ -112,7 +112,7 @@ class TJuiControlOptions } } - throw new THttpException(500,'juioptions_option_invalid',$this->_control->ID, $name); + throw new TConfigurationException('juioptions_option_invalid',$this->_control->ID, $name); } /** diff --git a/lib/prado/framework/Web/UI/JuiControls/TJuiDialog.php b/lib/prado/framework/Web/UI/JuiControls/TJuiDialog.php index e02157d..cd349f1 100644 --- a/lib/prado/framework/Web/UI/JuiControls/TJuiDialog.php +++ b/lib/prado/framework/Web/UI/JuiControls/TJuiDialog.php @@ -161,7 +161,7 @@ class TJuiDialog extends TActivePanel implements IJuiOptions, ICallbackEventHand private function triggerClientMethod($method) { $cs = $this->getPage()->getClientScript(); - $code = "jQuery('#".$this->getClientId()."').dialog('".$method."');"; + $code = "jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })"; $cs->registerEndScript(sprintf('%08X', crc32($code)), $code); } diff --git a/lib/prado/framework/Web/UI/TCachePageStatePersister.php b/lib/prado/framework/Web/UI/TCachePageStatePersister.php index e8419e6..a428ef8 100644 --- a/lib/prado/framework/Web/UI/TCachePageStatePersister.php +++ b/lib/prado/framework/Web/UI/TCachePageStatePersister.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TClientScriptManager.php b/lib/prado/framework/Web/UI/TClientScriptManager.php index e35a1ca..d5335b3 100644 --- a/lib/prado/framework/Web/UI/TClientScriptManager.php +++ b/lib/prado/framework/Web/UI/TClientScriptManager.php @@ -5,7 +5,7 @@ * @author Qiang Xue <qiang.xue@gmail.com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (lazyload additions & progressive rendering) * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ @@ -31,6 +31,10 @@ class TClientScriptManager extends TApplicationComponent */ const PACKAGES_FILE='Web/Javascripts/packages.php'; /** + * file containing css packages and their cross dependencies + */ + const CSS_PACKAGES_FILE='Web/Javascripts/css-packages.php'; + /** * @var TPage page who owns this manager */ private $_page; @@ -80,12 +84,27 @@ class TClientScriptManager extends TApplicationComponent * @var array */ private static $_pradoPackages; + /** + * @var array registered PRADO style libraries + */ + private $_registeredPradoStyles=array(); + /** + * Client-side style library dependencies, loads from PACKAGES_FILE; + * @var array + */ + private static $_pradoStyles; + /** + * Client-side style library packages, loads from CSS_PACKAGES_FILE; + * @var array + */ + private static $_pradoStylePackages; private $_renderedHiddenFields; private $_renderedScriptFiles=array(); private $_expandedPradoScripts; + private $_expandedPradoStyles; /** * Constructor. @@ -214,7 +233,7 @@ class TClientScriptManager extends TApplicationComponent } /** - * @param string javascript package path. + * @param string javascript or css package path. * @return array tuple($path,$url). */ protected function getPackagePathUrl($base) @@ -348,6 +367,67 @@ class TClientScriptManager extends TApplicationComponent } /** + * Registers Prado style by library name. See "Web/Javascripts/packages.php" + * for library names. + * @param string style library name. + */ + public function registerPradoStyle($name) + { + $this->registerPradoStyleInternal($name); + $params=func_get_args(); + $this->_page->registerCachingAction('Page.ClientScript','registerPradoStyle',$params); + } + + /** + * Registers a Prado style library to be loaded. + */ + protected function registerPradoStyleInternal($name) + { + // $this->checkIfNotInRender(); + if(!isset($this->_registeredPradoStyles[$name])) + { + $base = $this->getPradoScriptAssetUrl(); + + if(self::$_pradoStyles === null) + { + $packageFile = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::CSS_PACKAGES_FILE; + list($packages,$deps)= include($packageFile); + self::$_pradoStyles = $deps; + self::$_pradoStylePackages = $packages; + } + + if (isset(self::$_pradoStyles[$name])) + $this->_registeredPradoStyles[$name]=true; + else + throw new TInvalidOperationException('csmanager_pradostyle_invalid',$name); + + if(($packages=array_keys($this->_registeredPradoStyles))!==array()) + { + $base = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH; + list($path,$baseUrl)=$this->getPackagePathUrl($base); + $packagesUrl=array(); + $isDebug=$this->getApplication()->getMode()===TApplicationMode::Debug; + foreach ($packages as $p) + { + foreach (self::$_pradoStyles[$p] as $dep) + { + foreach (self::$_pradoStylePackages[$dep] as $style) + if (!isset($this->_expandedPradoStyles[$style])) + { + $this->_expandedPradoStyles[$style] = true; + // TODO minify css? + if (!in_array($url=$baseUrl.'/'.$style,$packagesUrl)) + $packagesUrl[]=$url; + } + } + } + foreach($packagesUrl as $url) + $this->registerStyleSheetFile($url,$url); + } + } + } + + /** * Registers a CSS file to be rendered in the page head * * The CSS files in themes are registered in {@link OnPreRenderComplete onPreRenderComplete} if you want to override @@ -400,9 +480,9 @@ class TClientScriptManager extends TApplicationComponent public function getStyleSheetUrls() { $stylesheets = array_values( - array_map( - create_function('$e', 'return is_array($e) ? $e[0] : $e;'), - $this->_styleSheetFiles) + array_map(function($e) { + return is_array($e) ? $e[0] : $e; + }, $this->_styleSheetFiles) ); foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url) diff --git a/lib/prado/framework/Web/UI/TCompositeControl.php b/lib/prado/framework/Web/UI/TCompositeControl.php index e830351..6bde562 100644 --- a/lib/prado/framework/Web/UI/TCompositeControl.php +++ b/lib/prado/framework/Web/UI/TCompositeControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TControl.php b/lib/prado/framework/Web/UI/TControl.php index 055b552..be7b118 100644 --- a/lib/prado/framework/Web/UI/TControl.php +++ b/lib/prado/framework/Web/UI/TControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ @@ -769,13 +769,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable { if($this->_trackViewState) { - $this->_viewState[$key]=$value; unset($this->_tempState[$key]); + if($value===$defaultValue) + unset($this->_viewState[$key]); + else + $this->_viewState[$key]=$value; } else { unset($this->_viewState[$key]); - $this->_tempState[$key]=$value; + if($value===$defaultValue) + unset($this->_tempState[$key]); + else + $this->_tempState[$key]=$value; } } @@ -1655,7 +1661,10 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable foreach($this->_rf[self::RF_CONTROLS] as $control) { if($control instanceof TControl) - $state[$control->_id]=&$control->saveStateRecursive($needViewState); + { + if(count($tmp = &$control->saveStateRecursive($needViewState))) + $state[$control->_id]=$tmp; + } } } if($needViewState && !empty($this->_viewState)) diff --git a/lib/prado/framework/Web/UI/TControlAdapter.php b/lib/prado/framework/Web/UI/TControlAdapter.php index 3abc004..4168e40 100644 --- a/lib/prado/framework/Web/UI/TControlAdapter.php +++ b/lib/prado/framework/Web/UI/TControlAdapter.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TForm.php b/lib/prado/framework/Web/UI/TForm.php index a6fe355..aed24b3 100644 --- a/lib/prado/framework/Web/UI/TForm.php +++ b/lib/prado/framework/Web/UI/TForm.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/THtmlWriter.php b/lib/prado/framework/Web/UI/THtmlWriter.php index 9c0c599..27b6ed4 100644 --- a/lib/prado/framework/Web/UI/THtmlWriter.php +++ b/lib/prado/framework/Web/UI/THtmlWriter.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TPage.php b/lib/prado/framework/Web/UI/TPage.php index f1ae591..515898b 100644 --- a/lib/prado/framework/Web/UI/TPage.php +++ b/lib/prado/framework/Web/UI/TPage.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TPageStatePersister.php b/lib/prado/framework/Web/UI/TPageStatePersister.php index 161316b..be5c013 100644 --- a/lib/prado/framework/Web/UI/TPageStatePersister.php +++ b/lib/prado/framework/Web/UI/TPageStatePersister.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TSessionPageStatePersister.php b/lib/prado/framework/Web/UI/TSessionPageStatePersister.php index a825a7d..85053b8 100644 --- a/lib/prado/framework/Web/UI/TSessionPageStatePersister.php +++ b/lib/prado/framework/Web/UI/TSessionPageStatePersister.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TTemplateControl.php b/lib/prado/framework/Web/UI/TTemplateControl.php index 4917d4b..e4a5980 100644 --- a/lib/prado/framework/Web/UI/TTemplateControl.php +++ b/lib/prado/framework/Web/UI/TTemplateControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TTemplateManager.php b/lib/prado/framework/Web/UI/TTemplateManager.php index b065eb6..49c619f 100644 --- a/lib/prado/framework/Web/UI/TTemplateManager.php +++ b/lib/prado/framework/Web/UI/TTemplateManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/TThemeManager.php b/lib/prado/framework/Web/UI/TThemeManager.php index efc7268..380f255 100644 --- a/lib/prado/framework/Web/UI/TThemeManager.php +++ b/lib/prado/framework/Web/UI/TThemeManager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/WebControls/TAccordion.php b/lib/prado/framework/Web/UI/WebControls/TAccordion.php index d193613..e0af4d9 100644 --- a/lib/prado/framework/Web/UI/WebControls/TAccordion.php +++ b/lib/prado/framework/Web/UI/WebControls/TAccordion.php @@ -4,7 +4,7 @@ * * @author Gabor Berczi, DevWorx Hungary <gabor.berczi@devworx.hu> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.2 diff --git a/lib/prado/framework/Web/UI/WebControls/TBaseDataList.php b/lib/prado/framework/Web/UI/WebControls/TBaseDataList.php index 4501073..8f3590c 100644 --- a/lib/prado/framework/Web/UI/WebControls/TBaseDataList.php +++ b/lib/prado/framework/Web/UI/WebControls/TBaseDataList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TBaseValidator.php b/lib/prado/framework/Web/UI/WebControls/TBaseValidator.php index a74d4bc..9911b06 100644 --- a/lib/prado/framework/Web/UI/WebControls/TBaseValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TBaseValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TBoundColumn.php b/lib/prado/framework/Web/UI/WebControls/TBoundColumn.php index 95697bd..caa6aca 100644 --- a/lib/prado/framework/Web/UI/WebControls/TBoundColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TBoundColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TBulletedList.php b/lib/prado/framework/Web/UI/WebControls/TBulletedList.php index 5d4167e..00a9a50 100644 --- a/lib/prado/framework/Web/UI/WebControls/TBulletedList.php +++ b/lib/prado/framework/Web/UI/WebControls/TBulletedList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TButton.php b/lib/prado/framework/Web/UI/WebControls/TButton.php index aed518a..ca5479a 100644 --- a/lib/prado/framework/Web/UI/WebControls/TButton.php +++ b/lib/prado/framework/Web/UI/WebControls/TButton.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TButtonColumn.php b/lib/prado/framework/Web/UI/WebControls/TButtonColumn.php index d2d0ec5..304c8fa 100644 --- a/lib/prado/framework/Web/UI/WebControls/TButtonColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TButtonColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCaptcha.php b/lib/prado/framework/Web/UI/WebControls/TCaptcha.php index cf9cc8e..863b164 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCaptcha.php +++ b/lib/prado/framework/Web/UI/WebControls/TCaptcha.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCaptchaValidator.php b/lib/prado/framework/Web/UI/WebControls/TCaptchaValidator.php index 1a08430..a9990de 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCaptchaValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TCaptchaValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCheckBox.php b/lib/prado/framework/Web/UI/WebControls/TCheckBox.php index bfbfbf5..b994259 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCheckBox.php +++ b/lib/prado/framework/Web/UI/WebControls/TCheckBox.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCheckBoxColumn.php b/lib/prado/framework/Web/UI/WebControls/TCheckBoxColumn.php index 5cf0265..1eb0acc 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCheckBoxColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TCheckBoxColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCheckBoxList.php b/lib/prado/framework/Web/UI/WebControls/TCheckBoxList.php index 9225e17..2950c53 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/lib/prado/framework/Web/UI/WebControls/TCheckBoxList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -402,13 +402,13 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont */ public function render($writer) { + if ($needSpan=$this->getSpanNeeded()) + { + $writer->addAttribute('id', $this->getClientId()); + $writer->renderBeginTag('span'); + } if($this->getItemCount()>0) { - if ($needSpan=$this->getSpanNeeded()) - { - $writer->addAttribute('id', $this->getClientId()); - $writer->renderBeginTag('span'); - } $this->_isEnabled=$this->getEnabled(true); $repeatInfo=$this->getRepeatInfo(); $accessKey=$this->getAccessKey(); @@ -422,9 +422,9 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont $repeatInfo->renderRepeater($writer,$this); $this->setAccessKey($accessKey); $this->setTabIndex($tabIndex); - if ($needSpan) - $writer->renderEndTag(); } + if ($needSpan) + $writer->renderEndTag(); //checkbox skipped the client control script in addAttributesToRender if($this->getEnabled(true) diff --git a/lib/prado/framework/Web/UI/WebControls/TClientScript.php b/lib/prado/framework/Web/UI/WebControls/TClientScript.php index c931bcb..96dfb99 100644 --- a/lib/prado/framework/Web/UI/WebControls/TClientScript.php +++ b/lib/prado/framework/Web/UI/WebControls/TClientScript.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TColorPicker.php b/lib/prado/framework/Web/UI/WebControls/TColorPicker.php index fbe71c0..08ad000 100644 --- a/lib/prado/framework/Web/UI/WebControls/TColorPicker.php +++ b/lib/prado/framework/Web/UI/WebControls/TColorPicker.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCompareValidator.php b/lib/prado/framework/Web/UI/WebControls/TCompareValidator.php index 3048895..87eeb07 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCompareValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TCompareValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TConditional.php b/lib/prado/framework/Web/UI/WebControls/TConditional.php index d9bc168..23e5381 100644 --- a/lib/prado/framework/Web/UI/WebControls/TConditional.php +++ b/lib/prado/framework/Web/UI/WebControls/TConditional.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TContent.php b/lib/prado/framework/Web/UI/WebControls/TContent.php index 1a0fd37..26c6b62 100644 --- a/lib/prado/framework/Web/UI/WebControls/TContent.php +++ b/lib/prado/framework/Web/UI/WebControls/TContent.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TContentPlaceHolder.php b/lib/prado/framework/Web/UI/WebControls/TContentPlaceHolder.php index 0355467..5dc824e 100644 --- a/lib/prado/framework/Web/UI/WebControls/TContentPlaceHolder.php +++ b/lib/prado/framework/Web/UI/WebControls/TContentPlaceHolder.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TCustomValidator.php b/lib/prado/framework/Web/UI/WebControls/TCustomValidator.php index ca31a2a..316afca 100644 --- a/lib/prado/framework/Web/UI/WebControls/TCustomValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TCustomValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataBoundControl.php b/lib/prado/framework/Web/UI/WebControls/TDataBoundControl.php index 8078b6f..7fe3717 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataBoundControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataGrid.php b/lib/prado/framework/Web/UI/WebControls/TDataGrid.php index 109252a..2f338d2 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataGrid.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataGrid.php @@ -9,7 +9,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -1162,7 +1162,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer $param=new TDataGridItemEventParameter($item); if($dataBind) { - $item->setDataItem($dataItem); + $item->setData($dataItem); $this->onItemCreated($param); $this->getControls()->add($item); $item->dataBind(); diff --git a/lib/prado/framework/Web/UI/WebControls/TDataGridColumn.php b/lib/prado/framework/Web/UI/WebControls/TDataGridColumn.php index 2f547ff..0e3ddbe 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataGridColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataGridColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataGridItemRenderer.php b/lib/prado/framework/Web/UI/WebControls/TDataGridItemRenderer.php index 23cf515..4cd12d3 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataGridItemRenderer.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataGridItemRenderer.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/lib/prado/framework/Web/UI/WebControls/TDataGridPagerStyle.php index b96d0cd..fc5b848 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataGridPagerStyle.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataGridPagerStyle.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -33,6 +33,35 @@ class TDataGridPagerStyle extends TPanelStyle private $_buttonType=null; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_mode===null) + $exprops[] = "\0TDataGridPagerStyle\0_mode"; + if ($this->_nextText===null) + $exprops[] = "\0TDataGridPagerStyle\0_nextText"; + if ($this->_prevText===null) + $exprops[] = "\0TDataGridPagerStyle\0_prevText"; + if ($this->_firstText===null) + $exprops[] = "\0TDataGridPagerStyle\0_firstText"; + if ($this->_lastText===null) + $exprops[] = "\0TDataGridPagerStyle\0_lastText"; + if ($this->_buttonCount===null) + $exprops[] = "\0TDataGridPagerStyle\0_buttonCount"; + if ($this->_position===null) + $exprops[] = "\0TDataGridPagerStyle\0_position"; + if ($this->_visible===null) + $exprops[] = "\0TDataGridPagerStyle\0_visible"; + if ($this->_buttonType===null) + $exprops[] = "\0TDataGridPagerStyle\0_buttonType"; + } + + /** * @return TDataGridPagerMode pager mode. Defaults to TDataGridPagerMode::NextPrev. */ public function getMode() diff --git a/lib/prado/framework/Web/UI/WebControls/TDataList.php b/lib/prado/framework/Web/UI/WebControls/TDataList.php index a3cf8b6..c883ba3 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataList.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataListItemRenderer.php b/lib/prado/framework/Web/UI/WebControls/TDataListItemRenderer.php index d7cb59c..8e62190 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataListItemRenderer.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataListItemRenderer.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataRenderer.php b/lib/prado/framework/Web/UI/WebControls/TDataRenderer.php index 6e76013..b7155c8 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataRenderer.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataRenderer.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.1.2 diff --git a/lib/prado/framework/Web/UI/WebControls/TDataSourceControl.php b/lib/prado/framework/Web/UI/WebControls/TDataSourceControl.php index ff47a78..11a97c9 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataSourceControl.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataSourceControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataSourceView.php b/lib/prado/framework/Web/UI/WebControls/TDataSourceView.php index ed6d868..43cc63f 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataSourceView.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataSourceView.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDataTypeValidator.php b/lib/prado/framework/Web/UI/WebControls/TDataTypeValidator.php index b78a962..886bb64 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDatePicker.php b/lib/prado/framework/Web/UI/WebControls/TDatePicker.php index 3f9e445..7a164dd 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDatePicker.php +++ b/lib/prado/framework/Web/UI/WebControls/TDatePicker.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDropDownList.php b/lib/prado/framework/Web/UI/WebControls/TDropDownList.php index 0598d24..1903d43 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDropDownList.php +++ b/lib/prado/framework/Web/UI/WebControls/TDropDownList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TDropDownListColumn.php b/lib/prado/framework/Web/UI/WebControls/TDropDownListColumn.php index 507dafd..2b07a73 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDropDownListColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TDropDownListColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TEditCommandColumn.php b/lib/prado/framework/Web/UI/WebControls/TEditCommandColumn.php index 36e188f..c305cd7 100644 --- a/lib/prado/framework/Web/UI/WebControls/TEditCommandColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TEditCommandColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TEmailAddressValidator.php b/lib/prado/framework/Web/UI/WebControls/TEmailAddressValidator.php index bb95372..2d76d67 100644 --- a/lib/prado/framework/Web/UI/WebControls/TEmailAddressValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TEmailAddressValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TExpression.php b/lib/prado/framework/Web/UI/WebControls/TExpression.php index 57bbb59..6b987c9 100644 --- a/lib/prado/framework/Web/UI/WebControls/TExpression.php +++ b/lib/prado/framework/Web/UI/WebControls/TExpression.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TFileUpload.php b/lib/prado/framework/Web/UI/WebControls/TFileUpload.php index 20f3c5e..60f4670 100644 --- a/lib/prado/framework/Web/UI/WebControls/TFileUpload.php +++ b/lib/prado/framework/Web/UI/WebControls/TFileUpload.php @@ -4,7 +4,7 @@ * * @author Marcus Nyeholt <tanus@users.sourceforge.net>, Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -276,3 +276,4 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata } } + diff --git a/lib/prado/framework/Web/UI/WebControls/TFont.php b/lib/prado/framework/Web/UI/WebControls/TFont.php index 52a5db7..432532b 100644 --- a/lib/prado/framework/Web/UI/WebControls/TFont.php +++ b/lib/prado/framework/Web/UI/WebControls/TFont.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -54,6 +54,23 @@ class TFont extends TComponent private $_size=''; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_flags===0) + $exprops[] = "\0TFont\0_flags"; + if ($this->_name==='') + $exprops[] = "\0TFont\0_name"; + if ($this->_size==='') + $exprops[] = "\0TFont\0_size"; + } + + /** * @return boolean whether the font is in bold face. Defaults to false. */ public function getBold() diff --git a/lib/prado/framework/Web/UI/WebControls/THead.php b/lib/prado/framework/Web/UI/WebControls/THead.php index c7c9b57..487b4a1 100644 --- a/lib/prado/framework/Web/UI/WebControls/THead.php +++ b/lib/prado/framework/Web/UI/WebControls/THead.php @@ -4,7 +4,7 @@ * * @author Marcus Nyeholt <tanus@users.sourceforge.net> and Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader1.php b/lib/prado/framework/Web/UI/WebControls/THeader1.php index 5eee499..b36cb5a 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader1.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader1.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader2.php b/lib/prado/framework/Web/UI/WebControls/THeader2.php index c54b52f..e60759e 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader2.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader2.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader3.php b/lib/prado/framework/Web/UI/WebControls/THeader3.php index ef89e02..2c156bd 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader3.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader3.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader4.php b/lib/prado/framework/Web/UI/WebControls/THeader4.php index d2dada4..58e3721 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader4.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader4.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader5.php b/lib/prado/framework/Web/UI/WebControls/THeader5.php index 582567d..440546b 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader5.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader5.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THeader6.php b/lib/prado/framework/Web/UI/WebControls/THeader6.php index ae876f8..d2c724e 100644 --- a/lib/prado/framework/Web/UI/WebControls/THeader6.php +++ b/lib/prado/framework/Web/UI/WebControls/THeader6.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THiddenField.php b/lib/prado/framework/Web/UI/WebControls/THiddenField.php index 8ea1c5b..a120be0 100644 --- a/lib/prado/framework/Web/UI/WebControls/THiddenField.php +++ b/lib/prado/framework/Web/UI/WebControls/THiddenField.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.xisc.com/ - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THtmlArea.php b/lib/prado/framework/Web/UI/WebControls/THtmlArea.php index 7fc5969..679ce4a 100644 --- a/lib/prado/framework/Web/UI/WebControls/THtmlArea.php +++ b/lib/prado/framework/Web/UI/WebControls/THtmlArea.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THtmlArea4.php b/lib/prado/framework/Web/UI/WebControls/THtmlArea4.php index 9485150..ebee649 100644 --- a/lib/prado/framework/Web/UI/WebControls/THtmlArea4.php +++ b/lib/prado/framework/Web/UI/WebControls/THtmlArea4.php @@ -4,7 +4,7 @@ * * @author Fabio Bas <ctrlaltca[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THtmlElement.php b/lib/prado/framework/Web/UI/WebControls/THtmlElement.php index 6efd608..e40045c 100644 --- a/lib/prado/framework/Web/UI/WebControls/THtmlElement.php +++ b/lib/prado/framework/Web/UI/WebControls/THtmlElement.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THyperLink.php b/lib/prado/framework/Web/UI/WebControls/THyperLink.php index 8e8d3f5..a21dc6b 100644 --- a/lib/prado/framework/Web/UI/WebControls/THyperLink.php +++ b/lib/prado/framework/Web/UI/WebControls/THyperLink.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.xisc.com/ - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/THyperLinkColumn.php b/lib/prado/framework/Web/UI/WebControls/THyperLinkColumn.php index d24616a..2c7590e 100644 --- a/lib/prado/framework/Web/UI/WebControls/THyperLinkColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/THyperLinkColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TImage.php b/lib/prado/framework/Web/UI/WebControls/TImage.php index 8538545..5ec8399 100644 --- a/lib/prado/framework/Web/UI/WebControls/TImage.php +++ b/lib/prado/framework/Web/UI/WebControls/TImage.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TImageButton.php b/lib/prado/framework/Web/UI/WebControls/TImageButton.php index 288def3..04ac3b8 100644 --- a/lib/prado/framework/Web/UI/WebControls/TImageButton.php +++ b/lib/prado/framework/Web/UI/WebControls/TImageButton.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TImageMap.php b/lib/prado/framework/Web/UI/WebControls/TImageMap.php index 8775496..6c83175 100644 --- a/lib/prado/framework/Web/UI/WebControls/TImageMap.php +++ b/lib/prado/framework/Web/UI/WebControls/TImageMap.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TInlineFrame.php b/lib/prado/framework/Web/UI/WebControls/TInlineFrame.php index 3d18235..ab0fb48 100644 --- a/lib/prado/framework/Web/UI/WebControls/TInlineFrame.php +++ b/lib/prado/framework/Web/UI/WebControls/TInlineFrame.php @@ -5,7 +5,7 @@ * @author Jason Ragsdale <jrags@jasrags.net> * @author Harry Pottash <hpottash@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TItemDataRenderer.php b/lib/prado/framework/Web/UI/WebControls/TItemDataRenderer.php index 1800fa7..6765695 100644 --- a/lib/prado/framework/Web/UI/WebControls/TItemDataRenderer.php +++ b/lib/prado/framework/Web/UI/WebControls/TItemDataRenderer.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.1.2 diff --git a/lib/prado/framework/Web/UI/WebControls/TJavascriptLogger.php b/lib/prado/framework/Web/UI/WebControls/TJavascriptLogger.php index 83f9fcb..7164689 100644 --- a/lib/prado/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/lib/prado/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TKeyboard.php b/lib/prado/framework/Web/UI/WebControls/TKeyboard.php index 15a4aa3..3808f2e 100644 --- a/lib/prado/framework/Web/UI/WebControls/TKeyboard.php +++ b/lib/prado/framework/Web/UI/WebControls/TKeyboard.php @@ -4,7 +4,7 @@ * * @author Sergey Morkovkin <sergeymorkovkin@mail.ru> and Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.1.1 diff --git a/lib/prado/framework/Web/UI/WebControls/TLabel.php b/lib/prado/framework/Web/UI/WebControls/TLabel.php index bf43b4d..ba342b7 100644 --- a/lib/prado/framework/Web/UI/WebControls/TLabel.php +++ b/lib/prado/framework/Web/UI/WebControls/TLabel.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -102,7 +102,7 @@ class TLabel extends TWebControl implements IDataRenderer */ public function setText($value) { - $this->setViewState('Text',$value,''); + $this->setViewState('Text',TPropertyValue::ensureString($value),''); } /** diff --git a/lib/prado/framework/Web/UI/WebControls/TLinkButton.php b/lib/prado/framework/Web/UI/WebControls/TLinkButton.php index dadea1d..95cf5d2 100644 --- a/lib/prado/framework/Web/UI/WebControls/TLinkButton.php +++ b/lib/prado/framework/Web/UI/WebControls/TLinkButton.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TListBox.php b/lib/prado/framework/Web/UI/WebControls/TListBox.php index 520fc5e..ef8423e 100644 --- a/lib/prado/framework/Web/UI/WebControls/TListBox.php +++ b/lib/prado/framework/Web/UI/WebControls/TListBox.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TListControl.php b/lib/prado/framework/Web/UI/WebControls/TListControl.php index ff89a74..8bf1352 100644 --- a/lib/prado/framework/Web/UI/WebControls/TListControl.php +++ b/lib/prado/framework/Web/UI/WebControls/TListControl.php @@ -6,7 +6,7 @@ * @author Robin J. Rogge <rojaro@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TListControlValidator.php b/lib/prado/framework/Web/UI/WebControls/TListControlValidator.php index 76096ef..15ade02 100644 --- a/lib/prado/framework/Web/UI/WebControls/TListControlValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TListControlValidator.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TListItem.php b/lib/prado/framework/Web/UI/WebControls/TListItem.php index aec006d..0118a91 100644 --- a/lib/prado/framework/Web/UI/WebControls/TListItem.php +++ b/lib/prado/framework/Web/UI/WebControls/TListItem.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -32,19 +32,19 @@ class TListItem extends TComponent /** * @var string text of the item */ - private $_text; + private $_text=''; /** * @var string value of the item */ - private $_value; + private $_value=''; /** * @var boolean whether the item is enabled */ - private $_enabled; + private $_enabled=true; /** * @var boolean whether the item is selected */ - private $_selected; + private $_selected=false; /** * Constructor. @@ -62,6 +62,27 @@ class TListItem extends TComponent } /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_attributes===null) + $exprops[] = "\0TListItem\0_attributes"; + if($this->_text==='') + $exprops[] = "\0TListItem\0_text"; + if($this->_value==='') + $exprops[] = "\0TListItem\0_value"; + if ($this->_enabled===true) + $exprops[] = "\0TListItem\0_enabled"; + if ($this->_selected===false) + $exprops[] = "\0TListItem\0_selected"; + } + + /** * @return boolean whether the item is enabled */ public function getEnabled() diff --git a/lib/prado/framework/Web/UI/WebControls/TLiteral.php b/lib/prado/framework/Web/UI/WebControls/TLiteral.php index f2306b4..d5c5b66 100644 --- a/lib/prado/framework/Web/UI/WebControls/TLiteral.php +++ b/lib/prado/framework/Web/UI/WebControls/TLiteral.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -45,7 +45,7 @@ class TLiteral extends TControl implements IDataRenderer */ public function setText($value) { - $this->setViewState('Text',$value,''); + $this->setViewState('Text',TPropertyValue::ensureString($value),''); } /** diff --git a/lib/prado/framework/Web/UI/WebControls/TLiteralColumn.php b/lib/prado/framework/Web/UI/WebControls/TLiteralColumn.php index 3cf3c3a..dae5ac9 100644 --- a/lib/prado/framework/Web/UI/WebControls/TLiteralColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TLiteralColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TMarkdown.php b/lib/prado/framework/Web/UI/WebControls/TMarkdown.php index 7a99b1f..0d38f9d 100644 --- a/lib/prado/framework/Web/UI/WebControls/TMarkdown.php +++ b/lib/prado/framework/Web/UI/WebControls/TMarkdown.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TMultiView.php b/lib/prado/framework/Web/UI/WebControls/TMultiView.php index 5f338d7..169428f 100644 --- a/lib/prado/framework/Web/UI/WebControls/TMultiView.php +++ b/lib/prado/framework/Web/UI/WebControls/TMultiView.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TOutputCache.php b/lib/prado/framework/Web/UI/WebControls/TOutputCache.php index 5615418..eaa0f83 100644 --- a/lib/prado/framework/Web/UI/WebControls/TOutputCache.php +++ b/lib/prado/framework/Web/UI/WebControls/TOutputCache.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TPager.php b/lib/prado/framework/Web/UI/WebControls/TPager.php index 467c0f7..dd0a7e5 100644 --- a/lib/prado/framework/Web/UI/WebControls/TPager.php +++ b/lib/prado/framework/Web/UI/WebControls/TPager.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TPanel.php b/lib/prado/framework/Web/UI/WebControls/TPanel.php index 22d44a5..e73ba3b 100644 --- a/lib/prado/framework/Web/UI/WebControls/TPanel.php +++ b/lib/prado/framework/Web/UI/WebControls/TPanel.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TPanelStyle.php b/lib/prado/framework/Web/UI/WebControls/TPanelStyle.php index 2e0f1a2..8bb1354 100644 --- a/lib/prado/framework/Web/UI/WebControls/TPanelStyle.php +++ b/lib/prado/framework/Web/UI/WebControls/TPanelStyle.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -46,6 +46,27 @@ class TPanelStyle extends TStyle private $_wrap=null; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_backImageUrl===null) + $exprops[] = "\0TPanelStyle\0_backImageUrl"; + if ($this->_direction===null) + $exprops[] = "\0TPanelStyle\0_direction"; + if ($this->_horizontalAlign===null) + $exprops[] = "\0TPanelStyle\0_horizontalAlign"; + if ($this->_scrollBars===null) + $exprops[] = "\0TPanelStyle\0_scrollBars"; + if ($this->_wrap===null) + $exprops[] = "\0TPanelStyle\0_wrap"; + } + + /** * Adds attributes related to CSS styles to renderer. * This method overrides the parent implementation. * @param THtmlWriter the writer used for the rendering purpose diff --git a/lib/prado/framework/Web/UI/WebControls/TPlaceHolder.php b/lib/prado/framework/Web/UI/WebControls/TPlaceHolder.php index 65f5ba2..8fee46f 100644 --- a/lib/prado/framework/Web/UI/WebControls/TPlaceHolder.php +++ b/lib/prado/framework/Web/UI/WebControls/TPlaceHolder.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRadioButton.php b/lib/prado/framework/Web/UI/WebControls/TRadioButton.php index cfdb795..d10fe1d 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRadioButton.php +++ b/lib/prado/framework/Web/UI/WebControls/TRadioButton.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRadioButtonList.php b/lib/prado/framework/Web/UI/WebControls/TRadioButtonList.php index dc9e2da..ef9c040 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRadioButtonList.php +++ b/lib/prado/framework/Web/UI/WebControls/TRadioButtonList.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRangeValidator.php b/lib/prado/framework/Web/UI/WebControls/TRangeValidator.php index a6668f4..2556e07 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRangeValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TRangeValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRatingList.php b/lib/prado/framework/Web/UI/WebControls/TRatingList.php index 0f1f364..94f9da1 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRatingList.php +++ b/lib/prado/framework/Web/UI/WebControls/TRatingList.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TReCaptcha2.php b/lib/prado/framework/Web/UI/WebControls/TReCaptcha2.php new file mode 100644 index 0000000..a4a9e83 --- /dev/null +++ b/lib/prado/framework/Web/UI/WebControls/TReCaptcha2.php @@ -0,0 +1,364 @@ +<?php + +/** + * TReCaptcha2 class file + * + * @author Cristian Camilo Naranjo Valencia + * @link http://icolectiva.co + * @copyright Copyright © 2005-2016 The PRADO Group + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT + * @package System.Web.UI.WebControls + */ + +Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter'); +Prado::using('System.Web.UI.ActiveControls.TActivePanel'); + +/** + * TReCaptcha2 class. + * + * TReCaptcha2 displays a reCAPTCHA (a token displayed as an image) that can be used + * to determine if the input is entered by a real user instead of some program. It can + * also prevent multiple submits of the same form either by accident, or on purpose (ie. spamming). + * + * The reCAPTCHA to solve (a string consisting of two separate words) displayed is automatically + * generated by the reCAPTCHA system at recaptcha.net. However, in order to use the services + * of the site you will need to register and get a public and a private API key pair, and + * supply those to the reCAPTCHA control through setting the {@link setSecretKey SecretKey} + * and {@link setSiteKey SiteKey} properties. + * + * Currently the reCAPTCHA API supports only one reCAPTCHA field per page, so you MUST make sure that all + * your input is protected and validated by a single reCAPTCHA control. Placing more than one reCAPTCHA + * control on the page will lead to unpredictable results, and the user will most likely unable to solve + * any of them successfully. + * + * Upon postback, user input can be validated by calling {@link validate()}. + * The {@link TReCaptcha2Validator} control can also be used to do validation, which provides + * server-side validation. Calling (@link validate()) will invalidate the token supplied, so all consecutive + * calls to the method - without solving a new captcha - will return false. Therefore if implementing a multi-stage + * input process, you must make sure that you call validate() only once, either at the end of the input process, or + * you store the result till the end of the processing. + * + * The following template shows a typical use of TReCaptcha control: + * <code> + * <com:TReCaptcha2 ID="Captcha" + * SiteKey="..." + * SecretKey="..." + * /> + * <com:TReCaptcha2Validator ControlToValidate="Captcha" + * ErrorMessage="You are challenged!" /> + * </code> + * + * @author Cristian Camilo Naranjo Valencia + * @package System.Web.UI.WebControls + * @since 3.3.1 + */ + +class TReCaptcha2 extends TActivePanel implements ICallbackEventHandler, IValidatable +{ + const ChallengeFieldName = 'g-recaptcha-response'; + private $_widgetId=0; + private $_isValid=true; + + public function __construct() + { + parent::__construct(); + $this->setAdapter(new TActiveControlAdapter($this)); + } + public function getActiveControl() + { + return $this->getAdapter()->getBaseActiveControl(); + } + public function getClientSide() + { + return $this->getAdapter()->getBaseActiveControl()->getClientSide(); + } + public function getClientClassName() + { + return 'Prado.WebUI.TReCaptcha2'; + } + public function getTagName() + { + return 'div'; + } + /** + * Returns true if this control validated successfully. + * Defaults to true. + * @return bool wether this control validated successfully. + */ + public function getIsValid() + { + return $this->_isValid; + } + /** + * @param bool wether this control is valid. + */ + public function setIsValid($value) + { + $this->_isValid=TPropertyValue::ensureBoolean($value); + } + public function getValidationPropertyValue() + { + return $this->Request[$this->getResponseFieldName()]; + } + public function getResponseFieldName() + { + $captchas = $this->Page->findControlsByType('TReCaptcha2'); + $cont = 0; + $responseFieldName = self::ChallengeFieldName; + foreach ($captchas as $captcha) + { + if ($this->getClientID() == $captcha->ClientID) + { + $responseFieldName .= ($cont > 0) ? '-'.$cont : ''; + } + $cont++; + } + return $responseFieldName; + } + /** + * Returns your site key. + * @return string. + */ + public function getSiteKey() + { + return $this->getViewState('SiteKey'); + } + /** + * @param string your site key. + */ + public function setSiteKey($value) + { + $this->setViewState('SiteKey', TPropertyValue::ensureString($value)); + } + /** + * Returns your secret key. + * @return string. + */ + public function getSecretKey() + { + return $this->getViewState('SecretKey'); + } + /** + * @param string your secret key. + */ + public function setSecretKey($value) + { + $this->setViewState('SecretKey', TPropertyValue::ensureString($value)); + } + /** + * Returns your language. + * @return string. + */ + public function getLanguage() + { + return $this->getViewState('Language', 'en'); + } + /** + * @param string your language. + */ + public function setLanguage($value) + { + $this->setViewState('Language', TPropertyValue::ensureString($value), 'en'); + } + /** + * Returns the color theme of the widget. + * @return string. + */ + public function getTheme() + { + return $this->getViewState('Theme', 'light'); + } + /** + * The color theme of the widget. + * Default: light + * @param string the color theme of the widget. + */ + public function setTheme($value) + { + $this->setViewState('Theme', TPropertyValue::ensureString($value), 'light'); + } + /** + * Returns the type of CAPTCHA to serve. + * @return string. + */ + public function getType() + { + return $this->getViewState('Type', 'image'); + } + /** + * The type of CAPTCHA to serve. + * Default: image + * @param string the type of CAPTCHA to serve. + */ + public function setType($value) + { + $this->setViewState('Type', TPropertyValue::ensureString($value), 'image'); + } + /** + * Returns the size of the widget. + * @return string. + */ + public function getSize() + { + return $this->getViewState('Size', 'normal'); + } + /** + * The size of the widget. + * Default: normal + * @param string the size of the widget. + */ + public function setSize($value) + { + $this->setViewState('Size', TPropertyValue::ensureString($value), 'normal'); + } + /** + * Returns the tabindex of the widget and challenge. + * If other elements in your page use tabindex, it should be set to make user navigation easier. + * @return string. + */ + public function getTabIndex() + { + return $this->getViewState('TabIndex', 0); + } + /** + * The tabindex of the widget and challenge. + * If other elements in your page use tabindex, it should be set to make user navigation easier. + * Default: 0 + * @param string the tabindex of the widget and challenge. + */ + public function setTabIndex($value) + { + $this->setViewState('TabIndex', TPropertyValue::ensureInteger($value), 0); + } + /** + * Resets the reCAPTCHA widget. + * Optional widget ID, defaults to the first widget created if unspecified. + */ + public function reset() + { + $this->Page->CallbackClient->callClientFunction('grecaptcha.reset',array(array($this->WidgetId))); + } + /** + * Gets the response for the reCAPTCHA widget. + */ + public function getResponse() + { + return $this->getViewState('Response', ''); + } + public function setResponse($value) + { + $this->setViewState('Response', TPropertyValue::ensureString($value), ''); + } + public function getWidgetId() + { + return $this->getViewState('WidgetId', 0); + } + public function setWidgetId($value) + { + $this->setViewState('WidgetId', TPropertyValue::ensureInteger($value), 0); + } + protected function getClientOptions() + { + $options['ID'] = $this->getClientID(); + $options['EventTarget'] = $this->getUniqueID(); + $options['FormID'] = $this->Page->getForm()->getClientID(); + $options['onCallback'] = $this->hasEventHandler('OnCallback'); + $options['onCallbackExpired'] = $this->hasEventHandler('OnCallbackExpired'); + $options['options']['sitekey'] = $this->getSiteKey(); + if ($theme = $this->getTheme()) $options['options']['theme'] = $theme; + if ($type = $this->getType()) $options['options']['type'] = $type; + if ($size = $this->getSize()) $options['options']['size'] = $size; + if ($tabIndex = $this->getTabIndex()) $options['options']['tabindex'] = $tabIndex; + + return $options; + } + protected function registerClientScript() + { + $id = $this->getClientID(); + $options = TJavaScript::encode($this->getClientOptions()); + $className = $this->getClientClassName(); + $cs = $this->Page->ClientScript; + $code = "new $className($options);"; + + $cs->registerPradoScript('ajax'); + $cs->registerEndScript("grecaptcha:$id", $code); + } + public function validate() + { + $value = $this->getValidationPropertyValue(); + if($value === null || empty($value)) + return false; + + return true; + } + /** + * Checks for API keys + * @param mixed event parameter + */ + public function onPreRender($param) + { + parent::onPreRender($param); + + if("" == $this->getSiteKey()) + throw new TConfigurationException('recaptcha_publickey_unknown'); + if("" == $this->getSecretKey()) + throw new TConfigurationException('recaptcha_privatekey_unknown'); + + // need to register captcha fields so they will be sent postback + $this->Page->registerRequiresPostData($this->getResponseFieldName()); + $this->Page->ClientScript->registerHeadScriptFile('grecaptcha2', 'https://www.google.com/recaptcha/api.js?onload=TReCaptcha2_onloadCallback&render=explicit&hl=' . $this->getLanguage()); + } + protected function addAttributesToRender($writer) + { + $writer->addAttribute('id',$this->getClientID()); + parent::addAttributesToRender($writer); + } + public function raiseCallbackEvent($param) + { + $params = $param->getCallbackParameter(); + if ($params instanceof stdClass) + { + $callback = property_exists($params, 'onCallback'); + $callbackExpired = property_exists($params, 'onCallbackExpired'); + + if ($callback) + { + $this->WidgetId = $params->widgetId; + $this->Response = $params->response; + $this->Page->CallbackClient->jQuery($params->responseField, 'text',array($params->response)); + + if ($params->onCallback) + { + $this->onCallback($param); + } + } + + if ($callbackExpired) + { + $this->Response = ''; + $this->reset(); + + if ($params->onCallbackExpired) + { + $this->onCallbackExpired($param); + } + } + } + } + + public function onCallback($param) + { + $this->raiseEvent('OnCallback', $this, $param); + } + + public function onCallbackExpired($param) + { + $this->raiseEvent('OnCallbackExpired', $this, $param); + } + + public function render($writer) + { + $this->registerClientScript(); + parent::render($writer); + } +} diff --git a/lib/prado/framework/Web/UI/WebControls/TReCaptcha2Validator.php b/lib/prado/framework/Web/UI/WebControls/TReCaptcha2Validator.php new file mode 100644 index 0000000..2cd4b6d --- /dev/null +++ b/lib/prado/framework/Web/UI/WebControls/TReCaptcha2Validator.php @@ -0,0 +1,110 @@ +<?php + +/** + * TReCaptcha2Validator class file + * + * @author Cristian Camilo Naranjo Valencia + * @link http://icolectiva.co + * @copyright Copyright © 2005-2016 The PRADO Group + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT + * @package System.Web.UI.WebControls + */ + +Prado::using('System.Web.UI.WebControls.TBaseValidator'); +Prado::using('System.Web.UI.WebControls.TReCaptcha2'); + +/** + * TReCaptcha2Validator class + * + * TReCaptcha2Validator validates a reCAPTCHA represented by a {@link TReCaptcha} control. + * The input control fails validation if th user did not pass the humanity test. + * + * To use TReCaptcha2Validator, specify the {@link setCaptchaControl CaptchaControl} + * to be the ID path of the {@link TReCaptcha} control. + * + * @author Cristian Camilo Naranjo Valencia + * @package System.Web.UI.WebControls + * @since 3.3.1 + */ + +class TReCaptcha2Validator extends TBaseValidator +{ + protected $_isvalid = null; + + protected function getClientClassName() + { + return 'Prado.WebUI.TReCaptcha2Validator'; + } + public function getEnableClientScript() + { + return true; + } + protected function getCaptchaControl() + { + $control = $this->getValidationTarget(); + if (!$control) + throw new Exception('No target control specified for TReCaptcha2Validator'); + if (!($control instanceof TReCaptcha2)) + throw new Exception('TReCaptcha2Validator only works with TReCaptcha2 controls'); + return $control; + } + public function getClientScriptOptions() + { + $options = parent::getClientScriptOptions(); + $options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName(); + return $options; + } + /** + * This method overrides the parent's implementation. + * The validation succeeds if the input control has the same value + * as the one displayed in the corresponding RECAPTCHA control. + * + * @return boolean whether the validation succeeds + */ + protected function evaluateIsValid() + { + // check validity only once (if trying to evaulate multiple times, all redundant checks would fail) + if (is_null($this->_isvalid)) + { + $control = $this->getCaptchaControl(); + $this->_isvalid = $control->validate(); + } + return ($this->_isvalid==true); + } + public function onPreRender($param) + { + parent::onPreRender($param); + + $cs = $this->Page->getClientScript(); + $cs->registerPradoScript('validator'); + + // communicate validation status to the client side + $value = $this->_isvalid===false ? '0' : '1'; + $cs->registerHiddenField($this->getClientID().'_1',$value); + + // update validator display + if ($control = $this->getValidationTarget()) + { + $fn = 'captchaUpdateValidatorStatus_'.$this->getClientID(); + + $cs->registerEndScript($this->getClientID().'::validate', implode(' ',array( + // this function will be used to update the validator + 'function '.$fn.'(valid)', + '{', + ' jQuery('.TJavaScript::quoteString('#'.$this->getClientID().'_1').').val(valid);', + ' Prado.Validation.validateControl('.TJavaScript::quoteString($control->ClientID).'); ', + '}', + '', + // update the validator to the result if we're in a callback + // (if we're in initial rendering or a postback then the result will be rendered directly to the page html anyway) + $this->Page->IsCallback ? $fn.'('.$value.');' : '', + '', + // install event handler that clears the validation error when user changes the captcha response field + 'jQuery("#'.$control->getClientID().'").on("change", '.TJavaScript::quoteString('#'.$control->getResponseFieldName()).', function() { ', + $fn.'("1");', + '});', + ))); + } + } +} + diff --git a/lib/prado/framework/Web/UI/WebControls/TReCaptchaValidator.php b/lib/prado/framework/Web/UI/WebControls/TReCaptchaValidator.php index de3b42a..9078354 100644 --- a/lib/prado/framework/Web/UI/WebControls/TReCaptchaValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TReCaptchaValidator.php @@ -21,7 +21,7 @@ Prado::using('System.Web.UI.WebControls.TReCaptcha'); * is not the same as the token displayed in reCAPTCHA. Note, if the user does * not enter any thing, it is still considered as failing the validation. * - * To use TReCaptchaValidator, specify the {@link setControlToValidate ControlToValidate} + * To use TReCaptchaValidator, specify the {@link setCaptchaControl CaptchaControl} * to be the ID path of the {@link TReCaptcha} control. * * @author Bérczi Gábor <gabor.berczi@devworx.hu> diff --git a/lib/prado/framework/Web/UI/WebControls/TRegularExpressionValidator.php b/lib/prado/framework/Web/UI/WebControls/TRegularExpressionValidator.php index 1cdff8b..426dc83 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRegularExpressionValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TRegularExpressionValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRepeatInfo.php b/lib/prado/framework/Web/UI/WebControls/TRepeatInfo.php index f5823d7..acafe3a 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRepeatInfo.php +++ b/lib/prado/framework/Web/UI/WebControls/TRepeatInfo.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRepeater.php b/lib/prado/framework/Web/UI/WebControls/TRepeater.php index 3d295a2..132a436 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRepeater.php +++ b/lib/prado/framework/Web/UI/WebControls/TRepeater.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRepeaterItemRenderer.php b/lib/prado/framework/Web/UI/WebControls/TRepeaterItemRenderer.php index 1ea799c..35e659b 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRepeaterItemRenderer.php +++ b/lib/prado/framework/Web/UI/WebControls/TRepeaterItemRenderer.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TRequiredFieldValidator.php b/lib/prado/framework/Web/UI/WebControls/TRequiredFieldValidator.php index 4587db8..7cb439b 100644 --- a/lib/prado/framework/Web/UI/WebControls/TRequiredFieldValidator.php +++ b/lib/prado/framework/Web/UI/WebControls/TRequiredFieldValidator.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TSafeHtml.php b/lib/prado/framework/Web/UI/WebControls/TSafeHtml.php index 16743f9..9fb44f5 100644 --- a/lib/prado/framework/Web/UI/WebControls/TSafeHtml.php +++ b/lib/prado/framework/Web/UI/WebControls/TSafeHtml.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TSlider.php b/lib/prado/framework/Web/UI/WebControls/TSlider.php index 593cd2c..db1044f 100644 --- a/lib/prado/framework/Web/UI/WebControls/TSlider.php +++ b/lib/prado/framework/Web/UI/WebControls/TSlider.php @@ -4,7 +4,7 @@ * * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.1.1 diff --git a/lib/prado/framework/Web/UI/WebControls/TStatements.php b/lib/prado/framework/Web/UI/WebControls/TStatements.php index e9cbeb3..b84b5bb 100644 --- a/lib/prado/framework/Web/UI/WebControls/TStatements.php +++ b/lib/prado/framework/Web/UI/WebControls/TStatements.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TStyle.php b/lib/prado/framework/Web/UI/WebControls/TStyle.php index eb47f2f..f6d91e9 100644 --- a/lib/prado/framework/Web/UI/WebControls/TStyle.php +++ b/lib/prado/framework/Web/UI/WebControls/TStyle.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -47,6 +47,27 @@ class TStyle extends TComponent private $_displayStyle='Fixed'; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_fields===array()) + $exprops[] = "\0TStyle\0_fields"; + if($this->_font===null) + $exprops[] = "\0TStyle\0_font"; + if($this->_class===null) + $exprops[] = "\0TStyle\0_class"; + if ($this->_customStyle===null) + $exprops[] = "\0TStyle\0_customStyle"; + if ($this->_displayStyle==='Fixed') + $exprops[] = "\0TStyle\0_displayStyle"; + } + + /** * Constructor. * @param TStyle style to copy from */ @@ -463,6 +484,29 @@ class TTableStyle extends TStyle private $_borderCollapse=null; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_backImageUrl===null) + $exprops[] = "\0TTableStyle\0_backImageUrl"; + if ($this->_horizontalAlign===null) + $exprops[] = "\0TTableStyle\0_horizontalAlign"; + if ($this->_cellPadding===null) + $exprops[] = "\0TTableStyle\0_cellPadding"; + if ($this->_cellSpacing===null) + $exprops[] = "\0TTableStyle\0_cellSpacing"; + if ($this->_gridLines===null) + $exprops[] = "\0TTableStyle\0_gridLines"; + if ($this->_borderCollapse===null) + $exprops[] = "\0TTableStyle\0_borderCollapse"; + } + + /** * Sets the style attributes to default values. * This method overrides the parent implementation by * resetting additional TTableStyle specific attributes. @@ -691,6 +735,23 @@ class TTableItemStyle extends TStyle private $_wrap=null; /** + * Returns an array with the names of all variables of this object that should NOT be serialized + * because their value is the default one or useless to be cached for the next page loads. + * Reimplement in derived classes to add new variables, but remember to also to call the parent + * implementation first. + */ + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_horizontalAlign===null) + $exprops[] = "\0TTableItemStyle\0_horizontalAlign"; + if ($this->_verticalAlign===null) + $exprops[] = "\0TTableItemStyle\0_verticalAlign"; + if ($this->_wrap===null) + $exprops[] = "\0TTableItemStyle\0_wrap"; + } + + /** * Sets the style attributes to default values. * This method overrides the parent implementation by * resetting additional TTableItemStyle specific attributes. diff --git a/lib/prado/framework/Web/UI/WebControls/TStyleSheet.php b/lib/prado/framework/Web/UI/WebControls/TStyleSheet.php index ae5692d..021b911 100644 --- a/lib/prado/framework/Web/UI/WebControls/TStyleSheet.php +++ b/lib/prado/framework/Web/UI/WebControls/TStyleSheet.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -13,7 +13,17 @@ * TStyleSheet class. * * TStyleSheet represents the link to a stylesheet file and/or a piece of - * stylesheet code. To specify the link to a CSS file, set {@link setStyleSheetUrl StyleSheetUrl}. + * stylesheet code. To specify the link to a CSS file, set {@link setStyleSheetUrl + * StyleSheetUrl}. + * Since Prado 3.3.1, it' possible to import css libraries bundled with + * Prado from template via the {@link setPradoStyles PradoStyles} property. + * Multiple Prado libraries can be specified using comma delimited string of the + * css library to include on the page. For example, + * + * <code> + * <com:TStyleSheet PradoStyles="bootstrap, jquery.ui.progressbar" /> + * </code> + * * The child rendering result of TStyleSheet is treated as CSS code and * is rendered within an appropriate style HTML element. * Therefore, if the child content is not empty, you should place the TStyleSheet @@ -29,6 +39,29 @@ class TStyleSheet extends TControl { /** + * @return string comma delimited list of css libraries to include + * on the page. + * @since 3.3.1 + */ + public function getPradoStyles() + { + return $this->getViewState('PradoStyles', ''); + } + + /** + * Include css library to the current page. The current supported + * libraries are: "jquery-ui", "bootstrap" and all the split + * jquery.ui.componentname libraries. + * + * @param string comma delimited list of css libraries to include. + * @since 3.3.1 + */ + public function setPradoStyles($value) + { + $this->setViewState('PradoStyles', $value, ''); + } + + /** * @param string URL to the stylesheet file */ public function setStyleSheetUrl($value) @@ -67,8 +100,17 @@ class TStyleSheet extends TControl */ public function onPreRender($param) { + $cs = $this->getPage()->getClientScript(); + + $styles = preg_split('/,|\s+/', $this->getPradoStyles()); + foreach($styles as $style) + { + if(($style = trim($style))!=='') + $cs->registerPradoStyle($style); + } + if(($url=$this->getStyleSheetUrl())!=='') - $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url,$this->getMediaType()); + $cs->registerStyleSheetFile($url,$url,$this->getMediaType()); } /** diff --git a/lib/prado/framework/Web/UI/WebControls/TTabPanel.php b/lib/prado/framework/Web/UI/WebControls/TTabPanel.php index 29baefd..5a84cfb 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTabPanel.php +++ b/lib/prado/framework/Web/UI/WebControls/TTabPanel.php @@ -4,7 +4,7 @@ * * @author Tomasz Wolny <tomasz.wolny@polecam.to.pl> and Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls * @since 3.1.1 diff --git a/lib/prado/framework/Web/UI/WebControls/TTable.php b/lib/prado/framework/Web/UI/WebControls/TTable.php index 98dc74e..42f41c3 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTable.php +++ b/lib/prado/framework/Web/UI/WebControls/TTable.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTableCell.php b/lib/prado/framework/Web/UI/WebControls/TTableCell.php index b0398d2..2642e29 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTableCell.php +++ b/lib/prado/framework/Web/UI/WebControls/TTableCell.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTableFooterRow.php b/lib/prado/framework/Web/UI/WebControls/TTableFooterRow.php index c3e8fe9..15d51d3 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTableFooterRow.php +++ b/lib/prado/framework/Web/UI/WebControls/TTableFooterRow.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTableHeaderCell.php b/lib/prado/framework/Web/UI/WebControls/TTableHeaderCell.php index bb2953b..ec42fbc 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTableHeaderCell.php +++ b/lib/prado/framework/Web/UI/WebControls/TTableHeaderCell.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTableHeaderRow.php b/lib/prado/framework/Web/UI/WebControls/TTableHeaderRow.php index 7eaedc3..c2731b5 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTableHeaderRow.php +++ b/lib/prado/framework/Web/UI/WebControls/TTableHeaderRow.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTableRow.php b/lib/prado/framework/Web/UI/WebControls/TTableRow.php index ebbe9df..740dbca 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTableRow.php +++ b/lib/prado/framework/Web/UI/WebControls/TTableRow.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTemplateColumn.php b/lib/prado/framework/Web/UI/WebControls/TTemplateColumn.php index b97b61f..283fc92 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTemplateColumn.php +++ b/lib/prado/framework/Web/UI/WebControls/TTemplateColumn.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTextBox.php b/lib/prado/framework/Web/UI/WebControls/TTextBox.php index f3a0c16..2f3ea3e 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTextBox.php +++ b/lib/prado/framework/Web/UI/WebControls/TTextBox.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ @@ -478,7 +478,7 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable */ public function setText($value) { - $this->setViewState('Text',$value,''); + $this->setViewState('Text',TPropertyValue::ensureString($value),''); $this->_safeText = null; } diff --git a/lib/prado/framework/Web/UI/WebControls/TTextHighlighter.php b/lib/prado/framework/Web/UI/WebControls/TTextHighlighter.php index 6183851..d272549 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/lib/prado/framework/Web/UI/WebControls/TTextHighlighter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo<weizhuo[at]gmail[dot]com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TTextProcessor.php b/lib/prado/framework/Web/UI/WebControls/TTextProcessor.php index c213a96..1962c51 100644 --- a/lib/prado/framework/Web/UI/WebControls/TTextProcessor.php +++ b/lib/prado/framework/Web/UI/WebControls/TTextProcessor.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TValidationSummary.php b/lib/prado/framework/Web/UI/WebControls/TValidationSummary.php index 2fbdba7..aa9d08e 100644 --- a/lib/prado/framework/Web/UI/WebControls/TValidationSummary.php +++ b/lib/prado/framework/Web/UI/WebControls/TValidationSummary.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TWebControl.php b/lib/prado/framework/Web/UI/WebControls/TWebControl.php index 619cdd9..9ee6b72 100644 --- a/lib/prado/framework/Web/UI/WebControls/TWebControl.php +++ b/lib/prado/framework/Web/UI/WebControls/TWebControl.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TWebControlAdapter.php b/lib/prado/framework/Web/UI/WebControls/TWebControlAdapter.php index 50da857..2ec976b 100644 --- a/lib/prado/framework/Web/UI/WebControls/TWebControlAdapter.php +++ b/lib/prado/framework/Web/UI/WebControls/TWebControlAdapter.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TWebControlDecorator.php b/lib/prado/framework/Web/UI/WebControls/TWebControlDecorator.php index 07c7836..db918b3 100644 --- a/lib/prado/framework/Web/UI/WebControls/TWebControlDecorator.php +++ b/lib/prado/framework/Web/UI/WebControls/TWebControlDecorator.php @@ -4,7 +4,7 @@ * * @author Brad Anderson <javalizard@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TWizard.php b/lib/prado/framework/Web/UI/WebControls/TWizard.php index bacb637..d9de183 100644 --- a/lib/prado/framework/Web/UI/WebControls/TWizard.php +++ b/lib/prado/framework/Web/UI/WebControls/TWizard.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php b/lib/prado/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php index de94fc5..9292276 100644 --- a/lib/prado/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php +++ b/lib/prado/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id $ * @package System.Web.UI.WebControls diff --git a/lib/prado/framework/Web/UI/WebControls/TXmlTransform.php b/lib/prado/framework/Web/UI/WebControls/TXmlTransform.php index e3c206f..b92efff 100644 --- a/lib/prado/framework/Web/UI/WebControls/TXmlTransform.php +++ b/lib/prado/framework/Web/UI/WebControls/TXmlTransform.php @@ -5,7 +5,7 @@ * @author Knut Urdalen <knut.urdalen@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls */ diff --git a/lib/prado/framework/Web/UI/WebControls/assets/captcha.php b/lib/prado/framework/Web/UI/WebControls/assets/captcha.php index bc20a57..7c064d9 100644 --- a/lib/prado/framework/Web/UI/WebControls/assets/captcha.php +++ b/lib/prado/framework/Web/UI/WebControls/assets/captcha.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Web.UI.WebControls.assets */ diff --git a/lib/prado/framework/Wsat/TWsatARGenerator.php b/lib/prado/framework/Wsat/TWsatARGenerator.php index a576b21..5976352 100644 --- a/lib/prado/framework/Wsat/TWsatARGenerator.php +++ b/lib/prado/framework/Wsat/TWsatARGenerator.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/TWsatBaseGenerator.php b/lib/prado/framework/Wsat/TWsatBaseGenerator.php index a87ea37..673031c 100644 --- a/lib/prado/framework/Wsat/TWsatBaseGenerator.php +++ b/lib/prado/framework/Wsat/TWsatBaseGenerator.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/TWsatScaffoldingGenerator.php b/lib/prado/framework/Wsat/TWsatScaffoldingGenerator.php index 1490f23..77df216 100644 --- a/lib/prado/framework/Wsat/TWsatScaffoldingGenerator.php +++ b/lib/prado/framework/Wsat/TWsatScaffoldingGenerator.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 4.0 diff --git a/lib/prado/framework/Wsat/TWsatService.php b/lib/prado/framework/Wsat/TWsatService.php index 0c33a49..5c9c561 100644 --- a/lib/prado/framework/Wsat/TWsatService.php +++ b/lib/prado/framework/Wsat/TWsatService.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/pages/TWsatGenerateAR.php b/lib/prado/framework/Wsat/pages/TWsatGenerateAR.php index 1677a8e..b5ccf47 100644 --- a/lib/prado/framework/Wsat/pages/TWsatGenerateAR.php +++ b/lib/prado/framework/Wsat/pages/TWsatGenerateAR.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/pages/TWsatHome.php b/lib/prado/framework/Wsat/pages/TWsatHome.php index 6e1b72d..cb1d266 100644 --- a/lib/prado/framework/Wsat/pages/TWsatHome.php +++ b/lib/prado/framework/Wsat/pages/TWsatHome.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/pages/TWsatLogin.php b/lib/prado/framework/Wsat/pages/TWsatLogin.php index cfd4d56..bdf2b17 100644 --- a/lib/prado/framework/Wsat/pages/TWsatLogin.php +++ b/lib/prado/framework/Wsat/pages/TWsatLogin.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Wsat/pages/TWsatScaffolding.php b/lib/prado/framework/Wsat/pages/TWsatScaffolding.php index b480174..4d7eff5 100644 --- a/lib/prado/framework/Wsat/pages/TWsatScaffolding.php +++ b/lib/prado/framework/Wsat/pages/TWsatScaffolding.php @@ -3,7 +3,7 @@ /** * @author Daniel Sampedro Bello <darthdaniel85@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @version $Id$ * @since 3.3 diff --git a/lib/prado/framework/Xml/TXmlDocument.php b/lib/prado/framework/Xml/TXmlDocument.php index 12f480d..92d8961 100644 --- a/lib/prado/framework/Xml/TXmlDocument.php +++ b/lib/prado/framework/Xml/TXmlDocument.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Xml */ @@ -384,7 +384,7 @@ class TXmlDocument extends TXmlElement return false; $this->setEncoding($doc->encoding); - $this->setVersion($doc->version); + $this->setVersion($doc->xmlVersion); $element=$doc->documentElement; $this->setTagName($element->tagName); diff --git a/lib/prado/framework/interfaces.php b/lib/prado/framework/interfaces.php index 0f0257d..f93e049 100644 --- a/lib/prado/framework/interfaces.php +++ b/lib/prado/framework/interfaces.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/prado.php b/lib/prado/framework/prado.php index e91b26c..343ab95 100644 --- a/lib/prado/framework/prado.php +++ b/lib/prado/framework/prado.php @@ -12,7 +12,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System */ diff --git a/lib/prado/framework/pradolite.php b/lib/prado/framework/pradolite.php index bdbf113..4a6de98 100644 --- a/lib/prado/framework/pradolite.php +++ b/lib/prado/framework/pradolite.php @@ -1,7 +1,7 @@ <?php /** * File Name: pradolite.php - * Last Update: 2015/12/07 15:35:09 + * Last Update: 2016/03/09 11:34:32 * Generated By: buildscripts/phpbuilder/build.php * * This file is used in lieu of prado.php to boost PRADO application performance. @@ -30,6 +30,7 @@ class PradoBase public static function initErrorHandlers() { set_error_handler(array('PradoBase','phpErrorHandler')); + register_shutdown_function(array('PradoBase','phpFatalErrorHandler')); set_exception_handler(array('PradoBase','exceptionHandler')); } public static function autoload($className) @@ -55,6 +56,16 @@ class PradoBase if(error_reporting() & $errno) throw new TPhpErrorException($errno,$errstr,$errfile,$errline); } + public static function phpFatalErrorHandler() + { + $error = error_get_last(); + if($error && + TPhpErrorException::isFatalError($error) && + error_reporting() & $error['type']) + { + self::exceptionHandler(new TPhpErrorException($error['type'],$error['message'],$error['file'],$error['line'])); + } + } public static function exceptionHandler($exception) { if(self::$_application!==null && ($errorHandler=self::$_application->getErrorHandler())!==null) @@ -696,7 +707,12 @@ class TErrorHandler extends TModule $trace=$exception->getTrace(); $result=null; if($exception instanceof TPhpErrorException) - $result=isset($trace[0]['file'])?$trace[0]:$trace[1]; + { + if(isset($trace[0]['file'])) + $result=$trace[0]; + elseif(isset($trace[1])) + $result=$trace[1]; + } else if($exception instanceof TInvalidOperationException) { if(($result=$this->getPropertyAccessTrace($trace,'__get'))===null) @@ -738,7 +754,7 @@ class TErrorHandler extends TModule private function addLink($message) { $baseUrl='http://pradosoft.github.io/docs/manual/class-'; - return preg_replace('/\b(T[A-Z]\w+)\b/',"<a href=\"$baseUrl/\${1}\" target=\"_blank\">\${1}</a>",$message); + return preg_replace('/\b(T[A-Z]\w+)\b/',"<a href=\"$baseUrl\${1}\" target=\"_blank\">\${1}</a>",$message); } } class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countable @@ -927,37 +943,8 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countabl $this->removeAt($offset); } } -class TListIterator implements Iterator +class TListIterator extends ArrayIterator { - private $_d; - private $_i; - private $_c; - public function __construct(&$data) - { - $this->_d=&$data; - $this->_i=0; - $this->_c=count($this->_d); - } - public function rewind() - { - $this->_i=0; - } - public function key() - { - return $this->_i; - } - public function current() - { - return $this->_d[$this->_i]; - } - public function next() - { - $this->_i++; - } - public function valid() - { - return $this->_i<$this->_c; - } } abstract class TCache extends TModule implements ICache, ArrayAccess { @@ -1604,6 +1591,14 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable { private $_d=array(); private $_r=false; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_d===array()) + $exprops[] = "\0TMap\0_d"; + if ($this->_r===false) + $exprops[] = "\0TMap\0_r"; + } public function __construct($data=null,$readOnly=false) { if($data!==null) @@ -1713,36 +1708,8 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable $this->remove($offset); } } -class TMapIterator implements Iterator +class TMapIterator extends ArrayIterator { - private $_d; - private $_keys; - private $_key; - public function __construct(&$data) - { - $this->_d=&$data; - $this->_keys=array_keys($data); - } - public function rewind() - { - $this->_key=reset($this->_keys); - } - public function key() - { - return $this->_key; - } - public function current() - { - return $this->_d[$this->_key]; - } - public function next() - { - $this->_key=next($this->_keys); - } - public function valid() - { - return $this->_key!==false; - } } class TPriorityMap extends TMap { @@ -2321,7 +2288,7 @@ class TXmlDocument extends TXmlElement if($doc->loadXML($string)===false) return false; $this->setEncoding($doc->encoding); - $this->setVersion($doc->version); + $this->setVersion($doc->xmlVersion); $element=$doc->documentElement; $this->setTagName($element->tagName); $this->setValue($element->nodeValue); @@ -3424,7 +3391,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar } public function getIterator() { - return new TMapIterator($this->_items); + return new ArrayIterator($this->_items); } public function getCount() { @@ -4410,6 +4377,12 @@ Prado::using('System.Web.UI.WebControls.*'); class TAttributeCollection extends TMap { private $_caseSensitive=false; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_caseSensitive===false) + $exprops[] = "\0TAttributeCollection\0_caseSensitive"; + } public function __get($name) { return $this->contains($name)?$this->itemAt($name):parent::__get($name); @@ -4845,13 +4818,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable { if($this->_trackViewState) { - $this->_viewState[$key]=$value; unset($this->_tempState[$key]); + if($value===$defaultValue) + unset($this->_viewState[$key]); + else + $this->_viewState[$key]=$value; } else { unset($this->_viewState[$key]); - $this->_tempState[$key]=$value; + if($value===$defaultValue) + unset($this->_tempState[$key]); + else + $this->_tempState[$key]=$value; } } public function clearViewState($key) @@ -5369,7 +5348,10 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable foreach($this->_rf[self::RF_CONTROLS] as $control) { if($control instanceof TControl) - $state[$control->_id]=&$control->saveStateRecursive($needViewState); + { + if(count($tmp = &$control->saveStateRecursive($needViewState))) + $state[$control->_id]=$tmp; + } } } if($needViewState && !empty($this->_viewState)) @@ -5658,6 +5640,16 @@ class TFont extends TComponent private $_flags=0; private $_name=''; private $_size=''; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_flags===0) + $exprops[] = "\0TFont\0_flags"; + if ($this->_name==='') + $exprops[] = "\0TFont\0_name"; + if ($this->_size==='') + $exprops[] = "\0TFont\0_size"; + } public function getBold() { return ($this->_flags & self::IS_BOLD)!==0; @@ -5840,6 +5832,20 @@ class TStyle extends TComponent private $_class=null; private $_customStyle=null; private $_displayStyle='Fixed'; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_fields===array()) + $exprops[] = "\0TStyle\0_fields"; + if($this->_font===null) + $exprops[] = "\0TStyle\0_font"; + if($this->_class===null) + $exprops[] = "\0TStyle\0_class"; + if ($this->_customStyle===null) + $exprops[] = "\0TStyle\0_customStyle"; + if ($this->_displayStyle==='Fixed') + $exprops[] = "\0TStyle\0_displayStyle"; + } public function __construct($style=null) { if($style!==null) @@ -6062,6 +6068,22 @@ class TTableStyle extends TStyle private $_cellSpacing=null; private $_gridLines=null; private $_borderCollapse=null; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_backImageUrl===null) + $exprops[] = "\0TTableStyle\0_backImageUrl"; + if ($this->_horizontalAlign===null) + $exprops[] = "\0TTableStyle\0_horizontalAlign"; + if ($this->_cellPadding===null) + $exprops[] = "\0TTableStyle\0_cellPadding"; + if ($this->_cellSpacing===null) + $exprops[] = "\0TTableStyle\0_cellSpacing"; + if ($this->_gridLines===null) + $exprops[] = "\0TTableStyle\0_gridLines"; + if ($this->_borderCollapse===null) + $exprops[] = "\0TTableStyle\0_borderCollapse"; + } public function reset() { $this->_backImageUrl=null; @@ -6185,6 +6207,16 @@ class TTableItemStyle extends TStyle private $_horizontalAlign=null; private $_verticalAlign=null; private $_wrap=null; + protected function _getZappableSleepProps(&$exprops) + { + parent::_getZappableSleepProps($exprops); + if ($this->_horizontalAlign===null) + $exprops[] = "\0TTableItemStyle\0_horizontalAlign"; + if ($this->_verticalAlign===null) + $exprops[] = "\0TTableItemStyle\0_verticalAlign"; + if ($this->_wrap===null) + $exprops[] = "\0TTableItemStyle\0_wrap"; + } public function reset() { parent::reset(); @@ -7172,9 +7204,9 @@ class TClientScriptManager extends TApplicationComponent public function getStyleSheetUrls() { $stylesheets = array_values( - array_map( - create_function('$e', 'return is_array($e) ? $e[0] : $e;'), - $this->_styleSheetFiles) + array_map(function($e) { + return is_array($e) ? $e[0] : $e; + }, $this->_styleSheetFiles) ); foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path=>$url) if (substr($url,strlen($url)-4)=='.css') @@ -7535,6 +7567,7 @@ class TPage extends TTemplateControl protected function processCallbackRequest($writer) { Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter'); + Prado::using('System.Web.UI.JuiControls.TJuiControlOptions'); $this->setAdapter(new TActivePageAdapter($this)); $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); if(strlen($callbackEventParameter) > 0) |