Commit da81f8da by Qiang Xue

Merge branch 'master' of github.com:yiisoft/yii2

parents 4ac501f4 0cde54bc
...@@ -50,6 +50,9 @@ If controller is located inside a module its action internal route will be `modu ...@@ -50,6 +50,9 @@ If controller is located inside a module its action internal route will be `modu
In case module, controller or action specified isn't found Yii will return "not found" page and HTTP status code 404. In case module, controller or action specified isn't found Yii will return "not found" page and HTTP status code 404.
> Note: If controller name or action name contains camelCased words, internal route will use dashes i.e. for
`DateTimeController::actionFastForward` route will be `date-time/fast-forward`.
### Defaults ### Defaults
If user isn't specifying any route i.e. using URL like `http://example.com/`, Yii assumes that default route should be If user isn't specifying any route i.e. using URL like `http://example.com/`, Yii assumes that default route should be
......
...@@ -41,7 +41,7 @@ return array( ...@@ -41,7 +41,7 @@ return array(
array( array(
'name' => 'Intl extension', 'name' => 'Intl extension',
'mandatory' => false, 'mandatory' => false,
'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2'), 'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='),
'by' => '<a href="http://www.php.net/manual/en/book.intl.php">Internationalization</a> support', 'by' => '<a href="http://www.php.net/manual/en/book.intl.php">Internationalization</a> support',
'memo' => 'PHP Intl extension 1.0.2 or higher is required when you want to use <abbr title="Internationalized domain names">IDN</abbr>-feature of EmailValidator or UrlValidator or the <code>yii\i18n\Formatter</code> class.' 'memo' => 'PHP Intl extension 1.0.2 or higher is required when you want to use <abbr title="Internationalized domain names">IDN</abbr>-feature of EmailValidator or UrlValidator or the <code>yii\i18n\Formatter</code> class.'
), ),
......
...@@ -189,15 +189,15 @@ class CaptchaAction extends Action ...@@ -189,15 +189,15 @@ class CaptchaAction extends Action
*/ */
protected function generateVerifyCode() protected function generateVerifyCode()
{ {
if ($this->minLength > $this->maxLength) {
$this->maxLength = $this->minLength;
}
if ($this->minLength < 3) { if ($this->minLength < 3) {
$this->minLength = 3; $this->minLength = 3;
} }
if ($this->maxLength > 20) { if ($this->maxLength > 20) {
$this->maxLength = 20; $this->maxLength = 20;
} }
if ($this->minLength > $this->maxLength) {
$this->maxLength = $this->minLength;
}
$length = mt_rand($this->minLength, $this->maxLength); $length = mt_rand($this->minLength, $this->maxLength);
$letters = 'bcdfghjklmnpqrstvwxyz'; $letters = 'bcdfghjklmnpqrstvwxyz';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment