- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -52,7 +52,7 @@
* // optional, a PHP expression whose value indicates whether this rule applies
* // The PHP expression will be evaluated using {@link evaluateExpression}.
* // A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
- * // please refer to the {@link http://www.php.net/manual/en/language.expressions.php php manual}.
+ * // please refer to the {@link https://www.php.net/manual/en/language.expressions.php php manual}.
* 'expression'=>'!$user->isGuest && $user->level==2',
*
* // optional, the customized error message to be displayed
@@ -173,6 +173,7 @@ protected function resolveErrorMessage($rule)
* This method is invoked when access check fails.
* @param IWebUser $user the current user
* @param string $message the error message to be displayed
+ * @throws CHttpException
*/
protected function accessDenied($user,$message)
{
@@ -242,7 +243,7 @@ class CAccessRule extends CComponent
* The PHP expression will be evaluated using {@link evaluateExpression}.
*
* A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
- * please refer to the {@link http://www.php.net/manual/en/language.expressions.php php manual}.
+ * please refer to the {@link https://www.php.net/manual/en/language.expressions.php php manual}.
*/
public $expression;
/**
@@ -256,7 +257,7 @@ class CAccessRule extends CComponent
* access is denied. It replaces the behavior that shows an error message.
* It can be a valid PHP callback including class method name (array(ClassName/Object, MethodName)),
* or anonymous function (PHP 5.3.0+). For more information, on different options, check
- * @link http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback
+ * @link https://www.php.net/manual/en/language.pseudo-types.php#language.types.callback
* The function/method signature should be as follows:
*
* function foo($rule) { ... }
diff --git a/yii/framework/web/auth/CAuthAssignment.php b/yii/framework/web/auth/CAuthAssignment.php
index edf06bb8..9779f58e 100644
--- a/yii/framework/web/auth/CAuthAssignment.php
+++ b/yii/framework/web/auth/CAuthAssignment.php
@@ -3,9 +3,9 @@
* CAuthAssignment class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/auth/CAuthItem.php b/yii/framework/web/auth/CAuthItem.php
index fa0223a8..aa79ed14 100644
--- a/yii/framework/web/auth/CAuthItem.php
+++ b/yii/framework/web/auth/CAuthItem.php
@@ -3,9 +3,9 @@
* CAuthItem class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/auth/CAuthManager.php b/yii/framework/web/auth/CAuthManager.php
index 7c703757..7ef18cfb 100644
--- a/yii/framework/web/auth/CAuthManager.php
+++ b/yii/framework/web/auth/CAuthManager.php
@@ -3,9 +3,9 @@
* CAuthManager class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -146,7 +146,21 @@ public function getOperations($userId=null)
*/
public function executeBizRule($bizRule,$params,$data)
{
- return $bizRule==='' || $bizRule===null || ($this->showErrors ? eval($bizRule)!=0 : @eval($bizRule)!=0);
+ if($bizRule==='' || $bizRule===null)
+ return true;
+ if ($this->showErrors)
+ return eval($bizRule)!=0;
+ else
+ {
+ try
+ {
+ return @eval($bizRule)!=0;
+ }
+ catch (ParseError $e)
+ {
+ return false;
+ }
+ }
}
/**
diff --git a/yii/framework/web/auth/CBaseUserIdentity.php b/yii/framework/web/auth/CBaseUserIdentity.php
index c58ab602..e222daad 100644
--- a/yii/framework/web/auth/CBaseUserIdentity.php
+++ b/yii/framework/web/auth/CBaseUserIdentity.php
@@ -3,9 +3,9 @@
* CBaseUserIdentity class file
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/auth/CDbAuthManager.php b/yii/framework/web/auth/CDbAuthManager.php
index 0a254c41..56fda808 100644
--- a/yii/framework/web/auth/CDbAuthManager.php
+++ b/yii/framework/web/auth/CDbAuthManager.php
@@ -3,9 +3,9 @@
* CDbAuthManager class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -94,7 +94,7 @@ protected function checkAccessRecursive($itemName,$userId,$params,$assignments)
return false;
Yii::trace('Checking permission "'.$item->getName().'"','system.web.auth.CDbAuthManager');
if(!isset($params['userId']))
- $params['userId'] = $userId;
+ $params['userId'] = $userId;
if($this->executeBizRule($item->getBizRule(),$params,$item->getData()))
{
if(in_array($itemName,$this->defaultRoles))
diff --git a/yii/framework/web/auth/CPhpAuthManager.php b/yii/framework/web/auth/CPhpAuthManager.php
index 3584f1dd..e8e4277c 100644
--- a/yii/framework/web/auth/CPhpAuthManager.php
+++ b/yii/framework/web/auth/CPhpAuthManager.php
@@ -3,9 +3,9 @@
* CPhpAuthManager class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -70,7 +70,7 @@ public function checkAccess($itemName,$userId,$params=array())
$item=$this->_items[$itemName];
Yii::trace('Checking permission "'.$item->getName().'"','system.web.auth.CPhpAuthManager');
if(!isset($params['userId']))
- $params['userId'] = $userId;
+ $params['userId'] = $userId;
if($this->executeBizRule($item->getBizRule(),$params,$item->getData()))
{
if(in_array($itemName,$this->defaultRoles))
@@ -324,6 +324,7 @@ public function getAuthItem($name)
* Saves an authorization item to persistent storage.
* @param CAuthItem $item the item to be saved.
* @param string $oldName the old item name. If null, it means the item name is not changed.
+ * @throws CException
*/
public function saveAuthItem($item,$oldName=null)
{
diff --git a/yii/framework/web/auth/CUserIdentity.php b/yii/framework/web/auth/CUserIdentity.php
index e616e930..217e1aaa 100644
--- a/yii/framework/web/auth/CUserIdentity.php
+++ b/yii/framework/web/auth/CUserIdentity.php
@@ -3,9 +3,9 @@
* CUserIdentity class file
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -51,6 +51,7 @@ public function __construct($username,$password)
* Derived classes should override this method, or an exception will be thrown.
* This method is required by {@link IUserIdentity}.
* @return boolean whether authentication succeeds.
+ * @throws CException
*/
public function authenticate()
{
diff --git a/yii/framework/web/auth/CWebUser.php b/yii/framework/web/auth/CWebUser.php
index 585e2e67..e7f94c46 100644
--- a/yii/framework/web/auth/CWebUser.php
+++ b/yii/framework/web/auth/CWebUser.php
@@ -3,9 +3,9 @@
* CWebUser class file
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -134,7 +134,7 @@ class CWebUser extends CApplicationComponent implements IWebUser
/**
* PHP magic method.
- * This method is overriden so that persistent states can be accessed like properties.
+ * This method is overridden so that persistent states can be accessed like properties.
* @param string $name property name
* @return mixed property value
*/
@@ -148,9 +148,10 @@ public function __get($name)
/**
* PHP magic method.
- * This method is overriden so that persistent states can be set like properties.
+ * This method is overridden so that persistent states can be set like properties.
* @param string $name property name
* @param mixed $value property value
+ * @throws CException
*/
public function __set($name,$value)
{
@@ -162,7 +163,7 @@ public function __set($name,$value)
/**
* PHP magic method.
- * This method is overriden so that persistent states can also be checked for null value.
+ * This method is overridden so that persistent states can also be checked for null value.
* @param string $name property name
* @return boolean
*/
@@ -176,7 +177,7 @@ public function __isset($name)
/**
* PHP magic method.
- * This method is overriden so that persistent states can also be unset.
+ * This method is overridden so that persistent states can also be unset.
* @param string $name property name
* @throws CException if the property is read only.
*/
@@ -223,6 +224,7 @@ public function init()
* If greater than 0, cookie-based login will be used. In this case, {@link allowAutoLogin}
* must be set true, otherwise an exception will be thrown.
* @return boolean whether the user is logged in
+ * @throws CException
*/
public function login($identity,$duration=0)
{
@@ -265,7 +267,7 @@ public function logout($destroySession=true)
if($this->identityCookie!==null)
{
$cookie=$this->createIdentityCookie($this->getStateKeyPrefix());
- $cookie->value=null;
+ $cookie->value='';
$cookie->expire=0;
Yii::app()->getRequest()->getCookies()->add($cookie->name,$cookie);
}
diff --git a/yii/framework/web/auth/schema-cubrid.sql b/yii/framework/web/auth/schema-cubrid.sql
index 2585acac..4eeff135 100644
--- a/yii/framework/web/auth/schema-cubrid.sql
+++ b/yii/framework/web/auth/schema-cubrid.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Esen Sagynov
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.1.14
*/
diff --git a/yii/framework/web/auth/schema-mssql.sql b/yii/framework/web/auth/schema-mssql.sql
index c2887350..dc4542ad 100644
--- a/yii/framework/web/auth/schema-mssql.sql
+++ b/yii/framework/web/auth/schema-mssql.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.0
*/
diff --git a/yii/framework/web/auth/schema-mysql.sql b/yii/framework/web/auth/schema-mysql.sql
index eb9f857b..01ba4ff2 100644
--- a/yii/framework/web/auth/schema-mysql.sql
+++ b/yii/framework/web/auth/schema-mysql.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.0
*/
diff --git a/yii/framework/web/auth/schema-oci.sql b/yii/framework/web/auth/schema-oci.sql
index 0198dafb..1cd371d3 100644
--- a/yii/framework/web/auth/schema-oci.sql
+++ b/yii/framework/web/auth/schema-oci.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.0
*/
diff --git a/yii/framework/web/auth/schema-pgsql.sql b/yii/framework/web/auth/schema-pgsql.sql
index 0198dafb..1cd371d3 100644
--- a/yii/framework/web/auth/schema-pgsql.sql
+++ b/yii/framework/web/auth/schema-pgsql.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.0
*/
diff --git a/yii/framework/web/auth/schema-sqlite.sql b/yii/framework/web/auth/schema-sqlite.sql
index 7daa7c9c..6b145e5e 100644
--- a/yii/framework/web/auth/schema-sqlite.sql
+++ b/yii/framework/web/auth/schema-sqlite.sql
@@ -2,9 +2,9 @@
* Database schema required by CDbAuthManager.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
* @since 1.0
*/
diff --git a/yii/framework/web/filters/CFilter.php b/yii/framework/web/filters/CFilter.php
index 6a4fe05f..de4c8966 100644
--- a/yii/framework/web/filters/CFilter.php
+++ b/yii/framework/web/filters/CFilter.php
@@ -3,9 +3,9 @@
* CFilter class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/filters/CFilterChain.php b/yii/framework/web/filters/CFilterChain.php
index 70756c6f..b40d93e5 100644
--- a/yii/framework/web/filters/CFilterChain.php
+++ b/yii/framework/web/filters/CFilterChain.php
@@ -3,9 +3,9 @@
* CFilterChain class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
@@ -52,6 +52,7 @@ public function __construct($controller,$action)
* @param CAction $action the action being filtered by this chain.
* @param array $filters list of filters to be applied to the action.
* @return CFilterChain
+ * @throws CException
*/
public static function create($controller,$action,$filters)
{
diff --git a/yii/framework/web/filters/CHttpCacheFilter.php b/yii/framework/web/filters/CHttpCacheFilter.php
index 2f1f5cf0..7f7bd2d2 100644
--- a/yii/framework/web/filters/CHttpCacheFilter.php
+++ b/yii/framework/web/filters/CHttpCacheFilter.php
@@ -3,9 +3,9 @@
* CHttpCacheFilter class file.
*
* @author Da:Sourcerer
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -20,7 +20,7 @@ class CHttpCacheFilter extends CFilter
{
/**
* @var string|integer Timestamp for the last modification date.
- * Must be either a string parsable by {@link http://php.net/strtotime strtotime()}
+ * Must be either a string parsable by {@link https://php.net/strtotime strtotime()}
* or an integer representing a unix timestamp.
*/
public $lastModified;
@@ -31,12 +31,12 @@ class CHttpCacheFilter extends CFilter
* The PHP expression will be evaluated using {@link evaluateExpression}.
*
* A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
- * please refer to the {@link http://www.php.net/manual/en/language.expressions.php php manual}.
+ * please refer to the {@link https://www.php.net/manual/en/language.expressions.php php manual}.
*/
public $lastModifiedExpression;
/**
* @var mixed Seed for the ETag.
- * Can be anything that passes through {@link http://php.net/serialize serialize()}.
+ * Can be anything that passes through {@link https://php.net/serialize serialize()}.
*/
public $etagSeed;
/**
@@ -46,7 +46,7 @@ class CHttpCacheFilter extends CFilter
* The PHP expression will be evaluated using {@link evaluateExpression}.
*
* A PHP expression can be any PHP code that has a value. To learn more about what an expression is,
- * please refer to the {@link http://www.php.net/manual/en/language.expressions.php php manual}.
+ * please refer to the {@link https://www.php.net/manual/en/language.expressions.php php manual}.
*/
public $etagSeedExpression;
/**
@@ -75,39 +75,39 @@ public function preFilter($filterChain)
if($etag)
header('ETag: '.$etag);
+ $this->sendCacheControlHeader();
+
+ $cacheValid = false;
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])&&isset($_SERVER['HTTP_IF_NONE_MATCH']))
{
if($this->checkLastModified($lastModified)&&$this->checkEtag($etag))
{
- $this->send304Header();
- $this->sendCacheControlHeader();
- return false;
+ $cacheValid=true;
}
}
elseif(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
{
if($this->checkLastModified($lastModified))
{
- $this->send304Header();
- $this->sendCacheControlHeader();
- return false;
+ $cacheValid=true;
}
}
elseif(isset($_SERVER['HTTP_IF_NONE_MATCH']))
{
if($this->checkEtag($etag))
{
- $this->send304Header();
- $this->sendCacheControlHeader();
- return false;
+ $cacheValid=true;
}
-
}
if($lastModified)
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $lastModified).' GMT');
- $this->sendCacheControlHeader();
+ if ($cacheValid) {
+ $this->send304Header();
+ return false;
+ }
+
return true;
}
@@ -193,7 +193,7 @@ protected function sendCacheControlHeader()
{
if(Yii::app()->session->isStarted)
{
- session_cache_limiter('public');
+ Yii::app()->session->setCacheLimiter('public');
header('Pragma:',true);
}
header('Cache-Control: '.$this->cacheControl,true);
@@ -202,6 +202,7 @@ protected function sendCacheControlHeader()
/**
* Generates a quoted string out of the seed
* @param mixed $seed Seed for the ETag
+ * @return string Quoted string serving as ETag
*/
protected function generateEtag($seed)
{
diff --git a/yii/framework/web/filters/CInlineFilter.php b/yii/framework/web/filters/CInlineFilter.php
index 7af8e9ce..234eca05 100644
--- a/yii/framework/web/filters/CInlineFilter.php
+++ b/yii/framework/web/filters/CInlineFilter.php
@@ -3,9 +3,9 @@
* CInlineFilter class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/form/CForm.php b/yii/framework/web/form/CForm.php
index 29372a93..fd6db987 100644
--- a/yii/framework/web/form/CForm.php
+++ b/yii/framework/web/form/CForm.php
@@ -3,9 +3,9 @@
* CForm class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -435,7 +435,7 @@ public function renderBegin()
$options['htmlOptions']=$this->attributes;
ob_start();
$this->_activeForm=$this->getOwner()->beginWidget($class, $options);
- return ob_get_clean() . "".CHtml::hiddenField($this->getUniqueID(),1)."
\n";
+ return ob_get_clean() . "".CHtml::hiddenField($this->getUniqueID(),1)."
\n";
}
}
@@ -538,7 +538,7 @@ public function renderElement($element)
if($element instanceof CFormInputElement)
{
if($element->type==='hidden')
- return "\n".$element->render()."
\n";
+ return "\n".$element->render()."
\n";
else
return "name}\">\n".$element->render()."
\n";
}
@@ -604,6 +604,7 @@ protected function getUniqueId()
* @param mixed $offset the offset to check on
* @return boolean
*/
+ #[ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->getElements()->contains($offset);
@@ -612,9 +613,10 @@ public function offsetExists($offset)
/**
* Returns the element at the specified offset.
* This method is required by the interface ArrayAccess.
- * @param integer $offset the offset to retrieve element.
+ * @param mixed $offset the offset to retrieve element.
* @return mixed the element at the offset, null if no element is found at the offset
*/
+ #[ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->getElements()->itemAt($offset);
@@ -623,9 +625,10 @@ public function offsetGet($offset)
/**
* Sets the element at the specified offset.
* This method is required by the interface ArrayAccess.
- * @param integer $offset the offset to set element
+ * @param mixed $offset the offset to set element
* @param mixed $item the element value
*/
+ #[ReturnTypeWillChange]
public function offsetSet($offset,$item)
{
$this->getElements()->add($offset,$item);
@@ -636,6 +639,7 @@ public function offsetSet($offset,$item)
* This method is required by the interface ArrayAccess.
* @param mixed $offset the offset to unset element
*/
+ #[ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->getElements()->remove($offset);
diff --git a/yii/framework/web/form/CFormButtonElement.php b/yii/framework/web/form/CFormButtonElement.php
index 4e0a9633..82562060 100644
--- a/yii/framework/web/form/CFormButtonElement.php
+++ b/yii/framework/web/form/CFormButtonElement.php
@@ -3,9 +3,9 @@
* CFormButtonElement class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/form/CFormElement.php b/yii/framework/web/form/CFormElement.php
index 841a2c10..536dd7c3 100644
--- a/yii/framework/web/form/CFormElement.php
+++ b/yii/framework/web/form/CFormElement.php
@@ -3,9 +3,9 @@
* CFormElement class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/form/CFormElementCollection.php b/yii/framework/web/form/CFormElementCollection.php
index b46c9d7c..0dc7d6fd 100644
--- a/yii/framework/web/form/CFormElementCollection.php
+++ b/yii/framework/web/form/CFormElementCollection.php
@@ -3,9 +3,9 @@
* CFormElementCollection class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -102,6 +102,7 @@ public function add($key,$value)
/**
* Removes the specified element by key.
* @param string $key the name of the element to be removed from the collection
+ * @throws CException
*/
public function remove($key)
{
diff --git a/yii/framework/web/form/CFormInputElement.php b/yii/framework/web/form/CFormInputElement.php
index 3eb73909..56b8ab6c 100644
--- a/yii/framework/web/form/CFormInputElement.php
+++ b/yii/framework/web/form/CFormInputElement.php
@@ -3,9 +3,9 @@
* CFormInputElement class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/form/CFormStringElement.php b/yii/framework/web/form/CFormStringElement.php
index c40f3103..4acf3371 100644
--- a/yii/framework/web/form/CFormStringElement.php
+++ b/yii/framework/web/form/CFormStringElement.php
@@ -3,9 +3,9 @@
* CFormStringElement class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/helpers/CGoogleApi.php b/yii/framework/web/helpers/CGoogleApi.php
index e005097a..6210e7fa 100644
--- a/yii/framework/web/helpers/CGoogleApi.php
+++ b/yii/framework/web/helpers/CGoogleApi.php
@@ -3,9 +3,9 @@
* CGoogleApi class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/helpers/CHtml.php b/yii/framework/web/helpers/CHtml.php
index c8e55853..927b23b2 100644
--- a/yii/framework/web/helpers/CHtml.php
+++ b/yii/framework/web/helpers/CHtml.php
@@ -3,9 +3,9 @@
* CHtml class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
@@ -75,7 +75,7 @@ class CHtml
* You can override this setting for a particular element by setting the htmlOptions delegate attribute
* (see {@link clientChange}).
*
- * For more information about attaching jQuery event handler see {@link http://api.jquery.com/on/}
+ * For more information about attaching jQuery event handler see {@link https://api.jquery.com/on/}
* @since 1.1.9
* @see clientChange
*/
@@ -85,13 +85,23 @@ class CHtml
* @since 1.1.13
*/
public static $closeSingleTags=true;
+ /**
+ * @var boolean whether to add type="javascript"
to <script>
tags. Defaults to true. Can be set to false for HTML5.
+ * @since 1.1.24
+ */
+ public static $setScriptType=true;
+ /**
+ * @var boolean whether to add a CDATA wrapper around <script>
and <style>
contents. Defaults to true. Can be set to false for HTML5.
+ * @since 1.1.24
+ */
+ public static $cdataScriptAndStyleContents=true;
/**
* @var boolean whether to render special attributes value. Defaults to true. Can be set to false for HTML5.
* @since 1.1.13
*/
public static $renderSpecialAttributesValue=true;
/**
- * @var callback the generator used in the {@link CHtml::modelName()} method.
+ * @var callable the generator used in the {@link CHtml::modelName()} method.
* @since 1.1.14
*/
private static $_modelNameConverter;
@@ -101,11 +111,11 @@ class CHtml
* The {@link CApplication::charset application charset} will be used for encoding.
* @param string $text data to be encoded
* @return string the encoded data
- * @see http://www.php.net/manual/en/function.htmlspecialchars.php
+ * @see https://www.php.net/manual/en/function.htmlspecialchars.php
*/
public static function encode($text)
{
- return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);
+ return htmlspecialchars((string)$text,ENT_QUOTES,Yii::app()->charset);
}
/**
@@ -113,7 +123,7 @@ public static function encode($text)
* This is the opposite of {@link encode()}.
* @param string $text data to be decoded
* @return string the decoded data
- * @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php
+ * @see https://www.php.net/manual/en/function.htmlspecialchars-decode.php
* @since 1.1.8
*/
public static function decode($text)
@@ -128,7 +138,7 @@ public static function decode($text)
* The {@link CApplication::charset application charset} will be used for encoding.
* @param array $data data to be encoded
* @return array the encoded data
- * @see http://www.php.net/manual/en/function.htmlspecialchars.php
+ * @see https://www.php.net/manual/en/function.htmlspecialchars.php
*/
public static function encodeArray($data)
{
@@ -252,7 +262,9 @@ public static function css($text,$media='')
{
if($media!=='')
$media=' media="'.$media.'"';
- return "";
+ if(self::$cdataScriptAndStyleContents)
+ $text="/**/";
+ return "";
}
/**
@@ -291,11 +303,13 @@ public static function cssFile($url,$media='')
*/
public static function script($text,array $htmlOptions=array())
{
- $defaultHtmlOptions=array(
- 'type'=>'text/javascript',
- );
+ $defaultHtmlOptions=array();
+ if(self::$setScriptType)
+ $defaultHtmlOptions['type']='text/javascript';
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
- return self::tag('script',$htmlOptions,"\n/**/\n");
+ if(self::$cdataScriptAndStyleContents)
+ $text="/**/";
+ return self::tag('script',$htmlOptions,"\n{$text}\n");
}
/**
@@ -306,10 +320,10 @@ public static function script($text,array $htmlOptions=array())
*/
public static function scriptFile($url,array $htmlOptions=array())
{
- $defaultHtmlOptions=array(
- 'type'=>'text/javascript',
- 'src'=>$url
- );
+ $defaultHtmlOptions=array();
+ if(self::$setScriptType)
+ $defaultHtmlOptions['type']='text/javascript';
+ $defaultHtmlOptions['src']=$url;
$htmlOptions=array_merge($defaultHtmlOptions,$htmlOptions);
return self::tag('script',$htmlOptions,'');
}
@@ -353,7 +367,7 @@ public static function beginForm($action='',$method='post',$htmlOptions=array())
$hiddens=array();
if(!strcasecmp($method,'get') && ($pos=strpos($url,'?'))!==false)
{
- foreach(explode('&',substr($url,$pos+1)) as $pair)
+ foreach(explode('&',substr(preg_replace('/#.+$/','',$url),$pos+1)) as $pair)
{
if(($pos=strpos($pair,'='))!==false)
$hiddens[]=self::hiddenField(urldecode(substr($pair,0,$pos)),urldecode(substr($pair,$pos+1)),array('id'=>false));
@@ -918,6 +932,8 @@ public static function radioButton($name,$checked=false,$htmlOptions=array())
$uncheckOptions=array('id'=>self::ID_PREFIX.$htmlOptions['id']);
else
$uncheckOptions=array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $uncheckOptions['disabled']=$htmlOptions['disabled'];
$hidden=self::hiddenField($name,$uncheck,$uncheckOptions);
}
else
@@ -965,6 +981,8 @@ public static function checkBox($name,$checked=false,$htmlOptions=array())
$uncheckOptions=array('id'=>self::ID_PREFIX.$htmlOptions['id']);
else
$uncheckOptions=array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $uncheckOptions['disabled']=$htmlOptions['disabled'];
$hidden=self::hiddenField($name,$uncheck,$uncheckOptions);
}
else
@@ -992,13 +1010,13 @@ public static function checkBox($name,$checked=false,$htmlOptions=array())
* The 'empty' option can also be an array of value-label pairs.
* Each pair will be used to render a list option at the beginning. Note, the text label will NOT be HTML-encoded.
* options: array, specifies additional attributes for each OPTION tag.
- * The array keys must be the option values, and the array values are the extra
- * OPTION tag attributes in the name-value pairs. For example,
+ * The array keys must be the option values, and the array values are the extra
+ * OPTION tag attributes in the name-value pairs. For example,
*
- * array(
- * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
- * 'value2'=>array('label'=>'value 2'),
- * );
+ * array(
+ * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
+ * 'value2'=>array('label'=>'value 2'),
+ * );
*
*
*
@@ -1032,6 +1050,8 @@ public static function dropDownList($name,$select,$data,$htmlOptions=array())
if(isset($htmlOptions['unselectValue']))
{
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=self::hiddenField(substr($htmlOptions['name'],0,-2),$htmlOptions['unselectValue'],$hiddenOptions);
unset($htmlOptions['unselectValue']);
}
@@ -1058,13 +1078,13 @@ public static function dropDownList($name,$select,$data,$htmlOptions=array())
* The 'empty' option can also be an array of value-label pairs.
* Each pair will be used to render a list option at the beginning. Note, the text label will NOT be HTML-encoded.
* options: array, specifies additional attributes for each OPTION tag.
- * The array keys must be the option values, and the array values are the extra
- * OPTION tag attributes in the name-value pairs. For example,
+ * The array keys must be the option values, and the array values are the extra
+ * OPTION tag attributes in the name-value pairs. For example,
*
- * array(
- * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
- * 'value2'=>array('label'=>'value 2'),
- * );
+ * array(
+ * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
+ * 'value2'=>array('label'=>'value 2'),
+ * );
*
*
*
@@ -1148,7 +1168,7 @@ public static function checkBoxList($name,$select,$data,$htmlOptions=array())
foreach($data as $value=>$labelTitle)
{
- $checked=!is_array($select) && !strcmp($value,$select) || is_array($select) && in_array($value,$select);
+ $checked=!is_array($select) && !strcmp($value,(string)$select) || is_array($select) && in_array($value,$select);
$checkAll=$checkAll && $checked;
$htmlOptions['value']=$value;
$htmlOptions['id']=$baseID.'_'.$id++;
@@ -1260,7 +1280,7 @@ public static function radioButtonList($name,$select,$data,$htmlOptions=array())
$id=0;
foreach($data as $value=>$labelTitle)
{
- $checked=!strcmp($value,$select);
+ $checked=!strcmp($value,(string)$select);
$htmlOptions['value']=$value;
$htmlOptions['id']=$baseID.'_'.$id++;
$option=self::radioButton($name,$checked,$htmlOptions);
@@ -1347,7 +1367,7 @@ public static function ajaxSubmitButton($label,$url,$ajaxOptions=array(),$htmlOp
*
* Note, if you specify the 'success' option, the above options will be ignored.
* @return string the generated JavaScript
- * @see http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings
+ * @see https://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings
*/
public static function ajax($options)
{
@@ -1510,7 +1530,8 @@ public static function activeLabelEx($model,$attribute,$htmlOptions=array())
{
$realAttribute=$attribute;
self::resolveName($model,$attribute); // strip off square brackets if any
- $htmlOptions['required']=$model->isAttributeRequired($attribute);
+ if (!isset($htmlOptions['required']))
+ $htmlOptions['required']=$model->isAttributeRequired($attribute);
return self::activeLabel($model,$realAttribute,$htmlOptions);
}
@@ -1851,6 +1872,8 @@ public static function activeFileField($model,$attribute,$htmlOptions=array())
// add a hidden field so that if a model only has a file field, we can
// still use isset($_POST[$modelClass]) to detect if the input is submitted
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
return self::hiddenField($htmlOptions['name'],'',$hiddenOptions)
. self::activeInputField('file',$model,$attribute,$htmlOptions);
}
@@ -1890,6 +1913,8 @@ public static function activeRadioButton($model,$attribute,$htmlOptions=array())
$uncheck='0';
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=$uncheck!==null ? self::hiddenField($htmlOptions['name'],$uncheck,$hiddenOptions) : '';
// add a hidden field so that if the radio button is not selected, it still submits a value
@@ -1932,6 +1957,8 @@ public static function activeCheckBox($model,$attribute,$htmlOptions=array())
$uncheck='0';
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=$uncheck!==null ? self::hiddenField($htmlOptions['name'],$uncheck,$hiddenOptions) : '';
return $hidden . self::activeInputField('checkbox',$model,$attribute,$htmlOptions);
@@ -1957,13 +1984,13 @@ public static function activeCheckBox($model,$attribute,$htmlOptions=array())
* The 'empty' option can also be an array of value-label pairs.
* Each pair will be used to render a list option at the beginning. Note, the text label will NOT be HTML-encoded.
* options: array, specifies additional attributes for each OPTION tag.
- * The array keys must be the option values, and the array values are the extra
- * OPTION tag attributes in the name-value pairs. For example,
+ * The array keys must be the option values, and the array values are the extra
+ * OPTION tag attributes in the name-value pairs. For example,
*
- * array(
- * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
- * 'value2'=>array('label'=>'value 2'),
- * );
+ * array(
+ * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
+ * 'value2'=>array('label'=>'value 2'),
+ * );
*
*
*
@@ -1994,6 +2021,8 @@ public static function activeDropDownList($model,$attribute,$data,$htmlOptions=a
if(isset($htmlOptions['unselectValue']))
{
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=self::hiddenField(substr($htmlOptions['name'],0,-2),$htmlOptions['unselectValue'],$hiddenOptions);
unset($htmlOptions['unselectValue']);
}
@@ -2022,13 +2051,13 @@ public static function activeDropDownList($model,$attribute,$data,$htmlOptions=a
* The 'empty' option can also be an array of value-label pairs.
* Each pair will be used to render a list option at the beginning. Note, the text label will NOT be HTML-encoded.
* options: array, specifies additional attributes for each OPTION tag.
- * The array keys must be the option values, and the array values are the extra
- * OPTION tag attributes in the name-value pairs. For example,
+ * The array keys must be the option values, and the array values are the extra
+ * OPTION tag attributes in the name-value pairs. For example,
*
- * array(
- * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
- * 'value2'=>array('label'=>'value 2'),
- * );
+ * array(
+ * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
+ * 'value2'=>array('label'=>'value 2'),
+ * );
*
*
*
@@ -2102,6 +2131,8 @@ public static function activeCheckBoxList($model,$attribute,$data,$htmlOptions=a
$uncheck='';
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=$uncheck!==null ? self::hiddenField($name,$uncheck,$hiddenOptions) : '';
return $hidden . self::checkBoxList($name,$selection,$data,$htmlOptions);
@@ -2162,6 +2193,8 @@ public static function activeRadioButtonList($model,$attribute,$data,$htmlOption
$uncheck='';
$hiddenOptions=isset($htmlOptions['id']) ? array('id'=>self::ID_PREFIX.$htmlOptions['id']) : array('id'=>false);
+ if(!empty($htmlOptions['disabled']))
+ $hiddenOptions['disabled']=$htmlOptions['disabled'];
$hidden=$uncheck!==null ? self::hiddenField($name,$uncheck,$hiddenOptions) : '';
return $hidden . self::radioButtonList($name,$selection,$data,$htmlOptions);
@@ -2178,6 +2211,10 @@ public static function activeRadioButtonList($model,$attribute,$data,$htmlOption
* make the error summary to show only the first error message of each attribute.
* If this is not set or is false, all error messages will be displayed.
* This option has been available since version 1.1.3.
+ * Another special option named 'encode' is recognized, which when set false, will
+ * disable the CHtml::encode encoding of all error messages.
+ * If this is not set or is true, all error messages will be encoded by CHtml::encode.
+ * This option has been available since version 1.1.23.
* @return string the error summary. Empty if no errors are found.
* @see CModel::getErrors
* @see errorSummaryCss
@@ -2201,7 +2238,11 @@ public static function errorSummary($model,$header=null,$footer=null,$htmlOption
foreach($errors as $error)
{
if($error!='')
- $content.="$error\n";
+ {
+ if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
+ $error=self::encode($error);
+ $content.= ''.$error."\n";
+ }
if($firstError)
break;
}
@@ -2233,6 +2274,8 @@ public static function error($model,$attribute,$htmlOptions=array())
{
self::resolveName($model,$attribute); // turn [a][b]attr into attr
$error=$model->getError($attribute);
+ if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
+ $error=self::encode($error);
if($error!='')
{
if(!isset($htmlOptions['class']))
@@ -2327,10 +2370,23 @@ public static function listData($models,$valueField,$textField,$groupField='')
public static function value($model,$attribute,$defaultValue=null)
{
if(is_scalar($attribute) || $attribute===null)
- foreach(explode('.',$attribute) as $name)
+ foreach(explode('.',(string)$attribute) as $name)
{
- if(is_object($model) && isset($model->$name))
- $model=$model->$name;
+ if(is_object($model))
+ {
+ if ((version_compare(PHP_VERSION, '7.2.0', '>=')
+ && is_numeric($name))
+ || !isset($model->$name)
+ )
+ {
+ return $defaultValue;
+ }
+ else
+ {
+ $model=$model->$name;
+ }
+ }
+
elseif(is_array($model) && isset($model[$name]))
$model=$model[$name];
else
@@ -2354,7 +2410,7 @@ public static function getIdByName($name)
/**
* Generates input field ID for a model attribute.
- * @param CModel $model the data model
+ * @param CModel|string $model the data model
* @param string $attribute the attribute
* @return string the generated input field ID
*/
@@ -2383,7 +2439,7 @@ public static function modelName($model)
* Set generator used in the {@link CHtml::modelName()} method. You can use the `null` value to restore default
* generator.
*
- * @param callback|null $converter the new generator, the model or class name will be passed to the this callback
+ * @param callable|null $converter the new generator, the model or class name will be passed to this callback
* and result must be a valid value for HTML name attribute.
* @throws CException if $converter isn't a valid callback
* @since 1.1.14
@@ -2401,7 +2457,7 @@ public static function setModelNameConverter($converter)
/**
* Generates input field name for a model attribute.
* Unlike {@link resolveName}, this method does NOT modify the attribute name.
- * @param CModel $model the data model
+ * @param CModel|string $model the data model
* @param string $attribute the attribute
* @return string the generated input field name
*/
@@ -2466,13 +2522,13 @@ protected static function activeInputField($type,$model,$attribute,$htmlOptions)
* The 'empty' option can also be an array of value-label pairs.
* Each pair will be used to render a list option at the beginning. Note, the text label will NOT be HTML-encoded.
* options: array, specifies additional attributes for each OPTION tag.
- * The array keys must be the option values, and the array values are the extra
- * OPTION tag attributes in the name-value pairs. For example,
+ * The array keys must be the option values, and the array values are the extra
+ * OPTION tag attributes in the name-value pairs. For example,
*
- * array(
- * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
- * 'value2'=>array('label'=>'value 2'),
- * );
+ * array(
+ * 'value1'=>array('disabled'=>true,'label'=>'value 1'),
+ * 'value2'=>array('label'=>'value 2'),
+ * );
*
*
* key: string, specifies the name of key attribute of the selection object(s).
@@ -2535,7 +2591,7 @@ public static function listOptions($selection,$listData,&$htmlOptions)
else
{
$attributes=array('value'=>(string)$key,'encode'=>!$raw);
- if(!is_array($selection) && !strcmp($key,$selection) || is_array($selection) && in_array($key,$selection))
+ if(!is_array($selection) && !strcmp($key,(string)$selection) || is_array($selection) && in_array($key,$selection))
$attributes['selected']='selected';
if(isset($options[$key]))
$attributes=array_merge($attributes,$options[$key]);
@@ -2647,7 +2703,7 @@ protected static function clientChange($event,&$htmlOptions)
* This method will update the HTML options by setting appropriate 'name' and 'id' attributes.
* This method may also modify the attribute name if the name
* contains square brackets (mainly used in tabular input).
- * @param CModel $model the data model
+ * @param CModel|string $model the data model
* @param string $attribute the attribute
* @param array $htmlOptions the HTML options
*/
@@ -2665,7 +2721,7 @@ public static function resolveNameID($model,&$attribute,&$htmlOptions)
* Generates input name for a model attribute.
* Note, the attribute name may be modified after calling this method if the name
* contains square brackets (mainly used in tabular input) before the real attribute name.
- * @param CModel $model the data model
+ * @param CModel|string $model the data model
* @param string $attribute the attribute
* @return string the input name
*/
@@ -2673,7 +2729,7 @@ public static function resolveName($model,&$attribute)
{
$modelName=self::modelName($model);
- if(($pos=strpos($attribute,'['))!==false)
+ if(($pos=strpos((string)$attribute,'['))!==false)
{
if($pos!==0) // e.g. name[a][b]
return $modelName.'['.substr($attribute,0,$pos).']'.substr($attribute,$pos);
diff --git a/yii/framework/web/helpers/CJSON.php b/yii/framework/web/helpers/CJSON.php
index 1d8f3d65..dd01c472 100644
--- a/yii/framework/web/helpers/CJSON.php
+++ b/yii/framework/web/helpers/CJSON.php
@@ -45,8 +45,8 @@
* @author Matt Knapp
* @author Brett Stimmerman
* @copyright 2005 Michal Migurski
-* @license http://www.opensource.org/licenses/bsd-license.php
-* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
+* @license https://www.opensource.org/licenses/bsd-license.php
+* @link https://pear.php.net/pepr/pepr-proposal-show.php?id=198
*/
/**
@@ -125,7 +125,7 @@ public static function encode($var)
*/
for ($c = 0; $c < $strlen_var; ++$c) {
- $ord_var_c = ord($var{$c});
+ $ord_var_c = ord($var[$c]);
switch (true) {
case $ord_var_c == 0x08:
@@ -148,18 +148,18 @@ public static function encode($var)
case $ord_var_c == 0x2F:
case $ord_var_c == 0x5C:
// double quote, slash, slosh
- $ascii .= '\\'.$var{$c};
+ $ascii .= '\\'.$var[$c];
break;
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
// characters U-00000000 - U-0000007F (same as ASCII)
- $ascii .= $var{$c};
+ $ascii .= $var[$c];
break;
case (($ord_var_c & 0xE0) == 0xC0):
// characters U-00000080 - U-000007FF, mask 110XXXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
- $char = pack('C*', $ord_var_c, ord($var{$c+1}));
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ $char = pack('C*', $ord_var_c, ord($var[$c+1]));
$c+=1;
$utf16 = self::utf8ToUTF16BE($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -167,10 +167,10 @@ public static function encode($var)
case (($ord_var_c & 0xF0) == 0xE0):
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
- ord($var{$c+1}),
- ord($var{$c+2}));
+ ord($var[$c+1]),
+ ord($var[$c+2]));
$c+=2;
$utf16 = self::utf8ToUTF16BE($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -178,11 +178,11 @@ public static function encode($var)
case (($ord_var_c & 0xF8) == 0xF0):
// characters U-00010000 - U-001FFFFF, mask 11110XXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
- ord($var{$c+1}),
- ord($var{$c+2}),
- ord($var{$c+3}));
+ ord($var[$c+1]),
+ ord($var[$c+2]),
+ ord($var[$c+3]));
$c+=3;
$utf16 = self::utf8ToUTF16BE($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -190,12 +190,12 @@ public static function encode($var)
case (($ord_var_c & 0xFC) == 0xF8):
// characters U-00200000 - U-03FFFFFF, mask 111110XX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
- ord($var{$c+1}),
- ord($var{$c+2}),
- ord($var{$c+3}),
- ord($var{$c+4}));
+ ord($var[$c+1]),
+ ord($var[$c+2]),
+ ord($var[$c+3]),
+ ord($var[$c+4]));
$c+=4;
$utf16 = self::utf8ToUTF16BE($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -203,13 +203,13 @@ public static function encode($var)
case (($ord_var_c & 0xFE) == 0xFC):
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$char = pack('C*', $ord_var_c,
- ord($var{$c+1}),
- ord($var{$c+2}),
- ord($var{$c+3}),
- ord($var{$c+4}),
- ord($var{$c+5}));
+ ord($var[$c+1]),
+ ord($var[$c+2]),
+ ord($var[$c+3]),
+ ord($var[$c+4]),
+ ord($var[$c+5]));
$c+=5;
$utf16 = self::utf8ToUTF16BE($char);
$ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -335,7 +335,7 @@ public static function decode($str, $useArray=true)
$json = json_decode($str,$useArray);
// based on investigation, native fails sometimes returning null.
- // see: http://gggeek.altervista.org/sw/article_20070425.html
+ // see: https://gggeek.altervista.org/sw/article_20070425.html
// As of PHP 5.3.6 it still fails on some valid JSON strings
if($json !== null)
return $json;
@@ -376,7 +376,7 @@ public static function decode($str, $useArray=true)
for ($c = 0; $c < $strlen_chrs; ++$c) {
$substr_chrs_c_2 = substr($chrs, $c, 2);
- $ord_chrs_c = ord($chrs{$c});
+ $ord_chrs_c = ord($chrs[$c]);
switch (true) {
case $substr_chrs_c_2 == '\b':
@@ -406,7 +406,7 @@ public static function decode($str, $useArray=true)
case $substr_chrs_c_2 == '\\/':
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
- $utf8 .= $chrs{++$c};
+ $utf8 .= $chrs[++$c];
}
break;
@@ -419,40 +419,40 @@ public static function decode($str, $useArray=true)
break;
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
- $utf8 .= $chrs{$c};
+ $utf8 .= $chrs[$c];
break;
case ($ord_chrs_c & 0xE0) == 0xC0:
// characters U-00000080 - U-000007FF, mask 110XXXXX
- //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ //see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 2);
++$c;
break;
case ($ord_chrs_c & 0xF0) == 0xE0:
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 3);
$c += 2;
break;
case ($ord_chrs_c & 0xF8) == 0xF0:
// characters U-00010000 - U-001FFFFF, mask 11110XXX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 4);
$c += 3;
break;
case ($ord_chrs_c & 0xFC) == 0xF8:
// characters U-00200000 - U-03FFFFFF, mask 111110XX
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 5);
$c += 4;
break;
case ($ord_chrs_c & 0xFE) == 0xFC:
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+ // see https://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
$utf8 .= substr($chrs, $c, 6);
$c += 5;
break;
@@ -466,7 +466,7 @@ public static function decode($str, $useArray=true)
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
// array, or object notation
- if ($str{0} == '[') {
+ if ($str[0] == '[') {
$stk = array(self::JSON_IN_ARR);
$arr = array();
} else {
@@ -503,7 +503,7 @@ public static function decode($str, $useArray=true)
$top = end($stk);
$substr_chrs_c_2 = substr($chrs, $c, 2);
- if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == self::JSON_SLICE))) {
+ if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == self::JSON_SLICE))) {
// found a comma that is not inside a string, array, etc.,
// OR we've reached the end of the character list
$slice = substr($chrs, $top['where'], ($c - $top['where']));
@@ -543,37 +543,37 @@ public static function decode($str, $useArray=true)
}
- } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != self::JSON_IN_STR)) {
+ } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != self::JSON_IN_STR)) {
// found a quote, and we are not inside a string
- $stk[] = array('what' => self::JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c});
+ $stk[] = array('what' => self::JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c]);
//print("Found start of string at {$c}\n");
- } elseif (($chrs{$c} == $top['delim']) &&
+ } elseif (($chrs[$c] == $top['delim']) &&
($top['what'] == self::JSON_IN_STR) &&
- (($chrs{$c - 1} != "\\") ||
- ($chrs{$c - 1} == "\\" && $chrs{$c - 2} == "\\"))) {
+ (($chrs[$c - 1] != "\\") ||
+ ($chrs[$c - 1] == "\\" && $chrs[$c - 2] == "\\"))) {
// found a quote, we're in a string, and it's not escaped
array_pop($stk);
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
- } elseif (($chrs{$c} == '[') &&
+ } elseif (($chrs[$c] == '[') &&
in_array($top['what'], array(self::JSON_SLICE, self::JSON_IN_ARR, self::JSON_IN_OBJ))) {
// found a left-bracket, and we are in an array, object, or slice
$stk[] = array('what' => self::JSON_IN_ARR, 'where' => $c, 'delim' => false);
//print("Found start of array at {$c}\n");
- } elseif (($chrs{$c} == ']') && ($top['what'] == self::JSON_IN_ARR)) {
+ } elseif (($chrs[$c] == ']') && ($top['what'] == self::JSON_IN_ARR)) {
// found a right-bracket, and we're in an array
array_pop($stk);
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
- } elseif (($chrs{$c} == '{') &&
+ } elseif (($chrs[$c] == '{') &&
in_array($top['what'], array(self::JSON_SLICE, self::JSON_IN_ARR, self::JSON_IN_OBJ))) {
// found a left-brace, and we are in an array, object, or slice
$stk[] = array('what' => self::JSON_IN_OBJ, 'where' => $c, 'delim' => false);
//print("Found start of object at {$c}\n");
- } elseif (($chrs{$c} == '}') && ($top['what'] == self::JSON_IN_OBJ)) {
+ } elseif (($chrs[$c] == '}') && ($top['what'] == self::JSON_IN_OBJ)) {
// found a right-brace, and we're in an object
array_pop($stk);
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
diff --git a/yii/framework/web/helpers/CJavaScript.php b/yii/framework/web/helpers/CJavaScript.php
index cf54dbf8..52c180d1 100644
--- a/yii/framework/web/helpers/CJavaScript.php
+++ b/yii/framework/web/helpers/CJavaScript.php
@@ -3,9 +3,9 @@
* CJavaScript helper class file.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
@@ -27,10 +27,14 @@ class CJavaScript
*/
public static function quote($js,$forUrl=false)
{
+ $js = (string)$js;
+
+ Yii::import('system.vendors.zend-escaper.Escaper');
+ $escaper=new Escaper(Yii::app()->charset);
if($forUrl)
- return strtr($js,array('%'=>'%25',"\t"=>'\t',"\n"=>'\n',"\r"=>'\r','"'=>'\"','\''=>'\\\'','\\'=>'\\\\',''=>'<\/'));
+ return $escaper->escapeUrl($js);
else
- return strtr($js,array("\t"=>'\t',"\n"=>'\n',"\r"=>'\r','"'=>'\"','\''=>'\\\'','\\'=>'\\\\',''=>'<\/'));
+ return $escaper->escapeJs($js);
}
/**
diff --git a/yii/framework/web/helpers/CJavaScriptExpression.php b/yii/framework/web/helpers/CJavaScriptExpression.php
index 8757bc94..3f633109 100644
--- a/yii/framework/web/helpers/CJavaScriptExpression.php
+++ b/yii/framework/web/helpers/CJavaScriptExpression.php
@@ -3,9 +3,9 @@
* CJavaScriptExpression class file.
*
* @author Alexander Makarov
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright Copyright © 2012 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
/**
diff --git a/yii/framework/web/js/packages.php b/yii/framework/web/js/packages.php
index 114051f2..baac64e6 100644
--- a/yii/framework/web/js/packages.php
+++ b/yii/framework/web/js/packages.php
@@ -6,9 +6,9 @@
* of the returned array.
*
* @author Qiang Xue
- * @link http://www.yiiframework.com/
+ * @link https://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
- * @license http://www.yiiframework.com/license/
+ * @license https://www.yiiframework.com/license/
*/
return array(
diff --git a/yii/framework/web/js/source/jquery.ajaxqueue.js b/yii/framework/web/js/source/jquery.ajaxqueue.js
index ca42082a..6e47bacc 100644
--- a/yii/framework/web/js/source/jquery.ajaxqueue.js
+++ b/yii/framework/web/js/source/jquery.ajaxqueue.js
@@ -1,8 +1,8 @@
/**
* Ajax Queue Plugin
*
- * Homepage: http://jquery.com/plugins/project/ajaxqueue
- * Documentation: http://docs.jquery.com/AjaxQueue
+ * Homepage: https://jquery.com/plugins/project/ajaxqueue
+ * Documentation: https://docs.jquery.com/AjaxQueue
*/
/**
diff --git a/yii/framework/web/js/source/jquery.autocomplete.js b/yii/framework/web/js/source/jquery.autocomplete.js
index a42a0f9e..1150f036 100644
--- a/yii/framework/web/js/source/jquery.autocomplete.js
+++ b/yii/framework/web/js/source/jquery.autocomplete.js
@@ -9,8 +9,8 @@
* Copyright (c) 2009 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
+ * https://www.opensource.org/licenses/mit-license.php
+ * https://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
*/
diff --git a/yii/framework/web/js/source/jquery.ba-bbq.js b/yii/framework/web/js/source/jquery.ba-bbq.js
index b2e98bc6..ead4ba1b 100644
--- a/yii/framework/web/js/source/jquery.ba-bbq.js
+++ b/yii/framework/web/js/source/jquery.ba-bbq.js
@@ -1,36 +1,36 @@
/*!
* jQuery BBQ: Back Button & Query Library - v1.4pre - 1/15/2013
- * http://benalman.com/projects/jquery-bbq-plugin/
+ * https://benalman.com/projects/jquery-bbq-plugin/
*
* Copyright (c) 2010-2013 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
+ * https://benalman.com/about/license/
*/
// Script: jQuery BBQ: Back Button & Query Library
//
// *Version: 1.4pre, Last updated: 1/15/2013*
//
-// Project Home - http://benalman.com/projects/jquery-bbq-plugin/
-// GitHub - http://github.com/cowboy/jquery-bbq/
-// Source - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js
-// (Minified) - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js (2.2kb gzipped)
+// Project Home - https://benalman.com/projects/jquery-bbq-plugin/
+// GitHub - https://github.com/cowboy/jquery-bbq/
+// Source - https://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js
+// (Minified) - https://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js (2.2kb gzipped)
//
// About: License
//
// Copyright (c) 2010-2013 "Cowboy" Ben Alman,
// Dual licensed under the MIT and GPL licenses.
-// http://benalman.com/about/license/
+// https://benalman.com/about/license/
//
// About: Examples
//
// These working examples, complete with fully commented code, illustrate a few
// ways in which this plugin can be used.
//
-// Basic AJAX - http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/
-// Advanced AJAX - http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/
-// jQuery UI Tabs - http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/
-// Deparam - http://benalman.com/code/projects/jquery-bbq/examples/deparam/
+// Basic AJAX - https://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/
+// Advanced AJAX - https://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/
+// jQuery UI Tabs - https://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/
+// Deparam - https://benalman.com/code/projects/jquery-bbq/examples/deparam/
//
// About: Support and Testing
//
@@ -41,7 +41,7 @@
// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
// Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
-// Unit Tests - http://benalman.com/code/projects/jquery-bbq/unit/
+// Unit Tests - https://benalman.com/code/projects/jquery-bbq/unit/
//
// About: Release History
//
@@ -342,7 +342,7 @@
//
// obj - (Object) An object to be serialized.
// traditional - (Boolean) Params deep/shallow serialization mode. See the
- // documentation at http://api.jquery.com/jQuery.param/ for more detail.
+ // documentation at https://api.jquery.com/jQuery.param/ for more detail.
//
// Returns:
//
@@ -988,36 +988,36 @@
/*!
* jQuery hashchange event - v1.3 - 7/21/2010
- * http://benalman.com/projects/jquery-hashchange-plugin/
+ * https://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
+ * https://benalman.com/about/license/
*/
// Script: jQuery hashchange event
//
// *Version: 1.3, Last updated: 7/21/2010*
//
-// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
-// GitHub - http://github.com/cowboy/jquery-hashchange/
-// Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
-// (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
+// Project Home - https://benalman.com/projects/jquery-hashchange-plugin/
+// GitHub - https://github.com/cowboy/jquery-hashchange/
+// Source - https://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
+// (Minified) - https://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
//
// About: License
//
// Copyright (c) 2010 "Cowboy" Ben Alman,
// Dual licensed under the MIT and GPL licenses.
-// http://benalman.com/about/license/
+// https://benalman.com/about/license/
//
// About: Examples
//
// These working examples, complete with fully commented code, illustrate a few
// ways in which this plugin can be used.
//
-// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
-// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
-//
+// hashchange event - https://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
+// document.domain - https://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
+//
// About: Support and Testing
//
// Information about what version or versions of jQuery this plugin has been
@@ -1027,7 +1027,7 @@
// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
// Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
-// Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
+// Unit Tests - https://benalman.com/code/projects/jquery-hashchange/unit/
//
// About: Known issues
//
@@ -1037,10 +1037,10 @@
// window.onhashchange abstraction. See the following examples for more
// information:
//
-// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
-// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
-// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
-// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
+// Chrome: Back Button - https://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
+// Firefox: Remote XMLHttpRequest - https://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
+// WebKit: Back Button in an Iframe - https://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
+// Safari: Back Button from a different domain - https://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
//
// Also note that should a browser natively support the window.onhashchange
// event, but not report that it does, the fallback polling loop will be used.
@@ -1050,7 +1050,7 @@
// 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
// "removable" for mobile-only development. Added IE6/7 document.title
// support. Attempted to make Iframe as hidden as possible by using
-// techniques from http://www.paciellogroup.com/blog/?p=604. Added
+// techniques from https://www.paciellogroup.com/blog/?p=604. Added
// support for the "shortcut" format $(window).hashchange( fn ) and
// $(window).hashchange() like jQuery provides for built-in events.
// Renamed jQuery.hashchangeDelay to and
@@ -1300,7 +1300,7 @@
iframe_src = iframe_src && iframe_src + get_fragment();
// Create hidden Iframe. Attempt to make Iframe as hidden as possible
- // by using techniques from http://www.paciellogroup.com/blog/?p=604.
+ // by using techniques from https://www.paciellogroup.com/blog/?p=604.
iframe = $('').hide()
// When Iframe has completely loaded, initialize the history and
diff --git a/yii/framework/web/js/source/jquery.ba-bbq.min.js b/yii/framework/web/js/source/jquery.ba-bbq.min.js
index 60a71e03..e576da28 100644
--- a/yii/framework/web/js/source/jquery.ba-bbq.min.js
+++ b/yii/framework/web/js/source/jquery.ba-bbq.min.js
@@ -1,18 +1,18 @@
/*
* jQuery BBQ: Back Button & Query Library - v1.3pre - 8/26/2010
- * http://benalman.com/projects/jquery-bbq-plugin/
+ * https://benalman.com/projects/jquery-bbq-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
+ * https://benalman.com/about/license/
*/
(function($,r){var h,n=Array.prototype.slice,t=decodeURIComponent,a=$.param,j,c,m,y,b=$.bbq=$.bbq||{},s,x,k,e=$.event.special,d="hashchange",B="querystring",F="fragment",z="elemUrlAttr",l="href",w="src",p=/^.*\?|#.*$/g,u,H,g,i,C,E={};function G(I){return typeof I==="string"}function D(J){var I=n.call(arguments,1);return function(){return J.apply(this,I.concat(n.call(arguments)))}}function o(I){return I.replace(H,"$2")}function q(I){return I.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(K,P,I,L,J){var R,O,N,Q,M;if(L!==h){N=I.match(K?H:/^([^#?]*)\??([^#]*)(#?.*)/);M=N[3]||"";if(J===2&&G(L)){O=L.replace(K?u:p,"")}else{Q=m(N[2]);L=G(L)?m[K?F:B](L):L;O=J===2?L:J===1?$.extend({},L,Q):$.extend({},Q,L);O=j(O);if(K){O=O.replace(g,t)}}R=N[1]+(K?C:O||!N[1]?"?":"")+O+M}else{R=P(I!==h?I:location.href)}return R}a[B]=D(f,0,q);a[F]=c=D(f,1,o);a.sorted=j=function(J,K){var I=[],L={};$.each(a(J,K).split("&"),function(P,M){var O=M.replace(/(?:%5B|=).*$/,""),N=L[O];if(!N){N=L[O]=[];I.push(O)}N.push(M)});return $.map(I.sort(),function(M){return L[M]}).join("&")};c.noEscape=function(J){J=J||"";var I=$.map(J.split(""),encodeURIComponent);g=new RegExp(I.join("|"),"g")};c.noEscape(",/");c.ajaxCrawlable=function(I){if(I!==h){if(I){u=/^.*(?:#!|#)/;H=/^([^#]*)(?:#!|#)?(.*)$/;C="#!"}else{u=/^.*#/;H=/^([^#]*)#?(.*)$/;C="#"}i=!!I}return i};c.ajaxCrawlable(0);$.deparam=m=function(L,I){var K={},J={"true":!0,"false":!1,"null":null};$.each(L.replace(/\+/g," ").split("&"),function(O,T){var N=T.split("="),S=t(N[0]),M,R=K,P=0,U=S.split("]["),Q=U.length-1;if(/\[/.test(U[0])&&/\]$/.test(U[Q])){U[Q]=U[Q].replace(/\]$/,"");U=U.shift().split("[").concat(U);Q=U.length-1}else{Q=0}if(N.length===2){M=t(N[1]);if(I){M=M&&!isNaN(M)?+M:M==="undefined"?h:J[M]!==h?J[M]:M}if(Q){for(;P<=Q;P++){S=U[P]===""?R.length:U[P];R=R[S]=P7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('