diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/3rdParty/readme.html | 69 | ||||
-rw-r--r-- | framework/I18N/core/data/license.txt | 35 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/prado.js | 4 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/element.js | 4 | ||||
-rw-r--r-- | framework/Web/THttpRequest.php | 34 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 11 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TValidationSummary.php | 6 |
8 files changed, 143 insertions, 22 deletions
diff --git a/framework/3rdParty/readme.html b/framework/3rdParty/readme.html index c81d263e..b48f5b74 100644 --- a/framework/3rdParty/readme.html +++ b/framework/3rdParty/readme.html @@ -45,10 +45,77 @@ projects. <tr>
<td>N.A.</td>
<td>Tar.php</td>
- <td><a href="http://www.php.net/license/3_0.txt">Version 3.0 of the PHP license</a></td>
+ <td><a href="http://www.php.net/license/3_0.txt">PHP License 3.0</a></td>
<td>System.IO.TTarFileExtractor</td>
<td>TTarFileExtractor is based on Tar.php whose author is Vincent Blavet.</td>
</tr>
+<tr>
+ <td><a href="../I18N/core/data">../I18N/core/data</a></td>
+ <td><a href="http://icu.sourceforge.net/">International Components for Unicode (Locale Data)</a></td>
+ <td><a href="http://dev.icu-project.org/cgi-bin/viewcvs.cgi/*checkout*/icu/license.html">BSD???</a></td>
+ <td>System.I18N.core.*</td>
+ <td>The ICU data http://dev.icu-project.org/cgi-bin/viewcvs.cgi/icu/source/data/locales/ are PHP serialized.</td>
+</tr>
+<tr>
+ <td><a href="../I18N/core/util.php">../I18N/core/util.php</a></td>
+ <td><a href="http://pear.php.net/package/DB">PEAR :: Package :: DB</a></td>
+ <td><a href="http://www.php.net/license/3_0.txt">PHP License 3.0</a></td>
+ <td>N.A.</td>
+ <td>The parseDSN() function from DB.php file.</td>
+</tr>
+<tr>
+ <td><a href="../I18N/core/TCache_Lite.php">../I18N/core/TCache_Lite.php</a></td>
+ <td><a href="http://pear.php.net/package/Cache_Lite">PEAR :: Package :: Cache_Lite</a></td>
+ <td><a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></td>
+ <td>N.A.</td>
+ <td>Cache_Lite class was renamed as TCache_Lite for packaging purposes.</td>
+</tr>
+<tr>
+ <td><a href="../I18N/core/Gettext">../I18N/core/Gettext</a></td>
+ <td><a href="http://pear.php.net/package/File_Gettext">PEAR :: Package :: File_Gettext</a></td>
+ <td><a href="http://www.php.net/license/3_0.txt">PHP License 3.0</a></td>
+ <td>N.A.</td>
+ <td>File_Gettext, File::Gettext::MO, and File::Gettext::PO</td>
+</tr>
+
+<tr>
+ <td><a href="../Web/Javascripts/TJSON.php">../Web/Javascripts/TJSON.php</a></td>
+ <td><a href="http://pear.php.net/pepr/pepr-proposal-show.php?id=198">Service_JSON proposal</a></td>
+ <td><a href="http://www.opensource.org/licenses/bsd-license.php">BSD</a></td>
+ <td>N.A.</td>
+ <td>JSON encoder/decoder by Michal Migurski, Matt Knapp and Brett Stimmerman</td>
+</tr>
+
+<tr>
+ <td><a href="../Web/Javascripts/effects/rico.js">../Web/Javascripts/effects/rico.js</a></td>
+ <td><a href="http://openrico.org/">Rico</a></td>
+ <td><a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License v2</a></td>
+ <td>N.A.</td>
+ <td>Rico Javascript Library (not yet utilized in Prado)</td>
+</tr>
+<tr>
+ <td><a href="../Web/Javascripts/prototype/">../Web/Javascripts/prototype</a></td>
+ <td><a href="http://dev.rubyonrails.org/browser/spinoffs/prototype">Prototype javascript library</a></td>
+ <td><a href="../Web/Javascripts/prototype/LICENSE">The Prototype License (MIT based)</a></td>
+ <td>N.A.</td>
+ <td>Core of Prado javascript library.</td>
+</tr>
+<tr>
+ <td><a href="../Web/Javascripts/extra/logger.js">../Web/Javascripts/extra/logger.js</a></td>
+ <td><a href="http://gleepglop.com/javascripts/logger/">http://gleepglop.com/javascripts/logger/</a> <a href="http://slayeroffice.com">http://slayeroffice.com</a></td>
+ <td>None</td>
+ <td>TJavascriptLogger</td>
+ <td>Javascript logger by Corey Johnson. Object Tree by S.G. Chipman.</td>
+</tr>
+
+<tr>
+ <td><a href="../Web/Javascripts/extra/json.js">../Web/Javascripts/extra/json.js</a></td>
+ <td><a href="http://www.JSON.org">http://www.JSON.org</a></td>
+ <td><a href="http://www.json.org/license.html">MIT based</a></td>
+ <td>N.A.</td>
+ <td>Has "The Software shall be used for Good, not Evil." clause.</td>
+</tr>
+
</table>
</p>
</body>
diff --git a/framework/I18N/core/data/license.txt b/framework/I18N/core/data/license.txt new file mode 100644 index 00000000..ccbd57fe --- /dev/null +++ b/framework/I18N/core/data/license.txt @@ -0,0 +1,35 @@ +ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2005 International Business Machines Corporation and others
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+--------------------------------------------------------------------------------
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index d80f984d..498a6cf7 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -256,7 +256,7 @@ selection[method](isList?element:el,value);},click:function(element) {var el=$(element);if(!el)return;if(document.createEvent) {var evt=document.createEvent('HTMLEvents');evt.initEvent('click',true,true);el.dispatchEvent(evt);} else if(el.fireEvent) -{el.fireEvent('onclick');if(isFunction(el.onclick)) +{el.fireEvent('onclick');if(typeof(el.onclick)=="function") el.onclick();}},setAttribute:function(element,attribute,value) {var el=$(element);if(attribute=="disabled"&&value==false) el.removeAttribute(attribute);else @@ -265,7 +265,7 @@ el.setAttribute(attribute,value);},setOptions:function(element,options) {while(el.length>0) el.remove(0);for(var i=0;i<options.length;i++) el.options[el.options.length]=new Option(options[i][0],options[i][1]);}},focus:function(element) -{var obj=$(element);if(isObject(obj)&&isdef(obj.focus)) +{var obj=$(element);if(typeof(obj)!="undefined"&&typeof(obj.focus)!="undefined") setTimeout(function(){obj.focus();},100);return false;}} Prado.Element.Selection={inputValue:function(el,value) {switch(el.type.toLowerCase()) diff --git a/framework/Web/Javascripts/prado/element.js b/framework/Web/Javascripts/prado/element.js index fc84e4b1..06937253 100644 --- a/framework/Web/Javascripts/prado/element.js +++ b/framework/Web/Javascripts/prado/element.js @@ -38,7 +38,7 @@ Prado.Element = else if(el.fireEvent)
{
el.fireEvent('onclick');
- if(isFunction(el.onclick))
+ if(typeof(el.onclick) == "function")
el.onclick();
}
},
@@ -71,7 +71,7 @@ Prado.Element = focus : function(element)
{
var obj = $(element);
- if(isObject(obj) && isdef(obj.focus))
+ if(typeof(obj) != "undefined" && typeof(obj.focus) != "undefined")
setTimeout(function(){ obj.focus(); }, 100);
return false;
}
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 5ec09fc9..71237fa1 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -161,10 +161,13 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar $paths=explode('/',$pathInfo);
$n=count($paths);
$getVariables=array();
- for($i=0;$i<$n;++$i)
+ for($i=0;$i<$n-1;++$i)
{
- if($i+1<$n)
- $getVariables[$paths[$i]]=$paths[++$i];
+ $name=$paths[$i];
+ if(($pos=strpos($name,'[]'))!==false)
+ $getVariables[substr($name,0,$pos)][]=$paths[++$i];
+ else
+ $getVariables[$name]=$paths[++$i];
}
$this->_items=array_merge($getVariables,array_merge($_GET,$_POST));
}
@@ -452,24 +455,41 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar if($encodeGetItems)
{
foreach($getItems as $name=>$value)
- $url.=$amp.urlencode($name).'='.urlencode($value);
+ {
+ if(is_array($value))
+ {
+ $name=urlencode($name.'[]');
+ foreach($value as $v)
+ $url.=$amp.$name.'='.$v;
+ }
+ else
+ $url.=$amp.urlencode($name).'='.urlencode($value);
+ }
}
else
{
foreach($getItems as $name=>$value)
- $url.=$amp.$name.'='.$value;
+ {
+ if(is_array($value))
+ {
+ foreach($value as $v)
+ $url.=$amp.$name.'[]='.$v;
+ }
+ else
+ $url.=$amp.$name.'='.$value;
+ }
}
}
if($this->getUrlFormat()==='Path')
{
$url=strtr($url,array($amp=>'/','?'=>'/','='=>'/'));
- if(defined('SID') && SID != '')
+ if(defined('SID') && SID != '' && !((int)ini_get('session.use_cookies')===1 && ((int)ini_get('session.use_only_cookies')===1)))
$url.='?'.SID;
return $this->getApplicationUrl().'/'.$url;
}
else
{
- if(defined('SID') && SID != '')
+ if(defined('SID') && SID != '' && !((int)ini_get('session.use_cookies')===1 && ((int)ini_get('session.use_only_cookies')===1)))
$url.=$amp.SID;
return $this->getApplicationUrl().'?'.$url;
}
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 5f75caf3..eac7c157 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -158,7 +158,7 @@ class TTemplate extends TApplicationComponent implements ITemplate * '<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>' - directives
* '<%[%#~\\$=\\[](.*?)%>' - expressions
*/
- const REGEX_RULES='/<!.*?!>|<!--.*?-->|<\/?com:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\s*\/?>|<\/?prop:([\w\.]+)\s*>|<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>|<%[%#~\\$=\\[](.*?)%>/msS';
+ const REGEX_RULES='/<!--.*?--!>|<!--.*?-->|<\/?com:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\s*\/?>|<\/?prop:([\w\.]+)\s*>|<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>|<%[%#~\\$=\\[](.*?)%>/msS';
/**
* Different configurations of component property/event/attribute
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index a63941db..ea1a5836 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -42,7 +42,7 @@ * be displayed. Error display is controlled by {@link setDisplay Display} property. * * You can also customized the client-side behaviour by adding javascript - * code to the subproperties of the {@link getClientValidation ClientValidation} + * code to the subproperties of the {@link getClientSide ClientSide} * property. See quickstart documentation for further details. * * You can also place a {@link TValidationSummary} control on a page to display error messages @@ -176,7 +176,7 @@ abstract class TBaseValidator extends TLabel implements IValidator * * @return TValidatorClientScript javascript validator event options. */ - public function getClientValidation() + public function getClientSide() { if(is_null($this->_clientScript)) $this->_clientScript = $this->createClientScript(); @@ -494,10 +494,9 @@ abstract class TBaseValidator extends TLabel implements IValidator * TValidatorClientScript class. * * Client-side validator events can be modified through the {@link - * TBaseValidator::getClientValidation ClientValidation} property of a - * validator. The subproperties of ClientValidation are those of the - * TValidatorClientScript properties. The client-side validator supports the - * following events. + * TBaseValidator::getClientSide ClientSide} property of a validator. The + * subproperties of ClientSide are those of the TValidatorClientScript + * properties. The client-side validator supports the following events. * * The <tt>OnValidate</tt> event is raise before the validator validation * functions are called. diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index aa46142b..87821292 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -258,7 +258,7 @@ class TValidationSummary extends TWebControl * @return TValidationSummaryClientScript client-side validation summary
* event options.
*/
- public function getClientValidation()
+ public function getClientSide()
{
if(is_null($this->_clientScript))
$this->_clientScript = $this->createClientScript();
@@ -376,8 +376,8 @@ class TValidationSummary extends TWebControl *
* Client-side validation summary events such as {@link setOnHideSummary
* OnHideSummary} and {@link setOnShowSummary OnShowSummary} can be modified
- * through the {@link TBaseValidator:: getClientValidation ClientValidation}
- * property of a validation summary.
+ * through the {@link TBaseValidator:: getClientSide ClientSide} property of a
+ * validation summary.
*
* The <tt>OnHideSummary</tt> event is raise when the validation summary
* requests to hide the messages.
|