Commit a153750e by Qiang Xue

Fixes #5745: Gii and debug modules may cause 404 exception when the route contains dashes

parent 2544e86d
...@@ -5,6 +5,7 @@ Yii Framework 2 debug extension Change Log ...@@ -5,6 +5,7 @@ Yii Framework 2 debug extension Change Log
----------------------- -----------------------
- Bug #5402: Debugger was not loading when there were closures in asset classes (samdark) - Bug #5402: Debugger was not loading when there were closures in asset classes (samdark)
- Bug #5745: Gii and debug modules may cause 404 exception when the route contains dashes (qiangxue)
- Enh #5600: Allow configuring debug panels in `yii\debug\Module::panels` as panel class name strings (qiangxue) - Enh #5600: Allow configuring debug panels in `yii\debug\Module::panels` as panel class name strings (qiangxue)
......
...@@ -124,7 +124,7 @@ class Module extends \yii\base\Module implements BootstrapInterface ...@@ -124,7 +124,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
$app->getUrlManager()->addRules([ $app->getUrlManager()->addRules([
$this->id => $this->id, $this->id => $this->id,
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>', $this->id . '/<controller:[\w\-]+>/<action:[\w\-]+>' => $this->id . '/<controller>/<action>',
], false); ], false);
} }
......
...@@ -4,8 +4,9 @@ Yii Framework 2 gii extension Change Log ...@@ -4,8 +4,9 @@ Yii Framework 2 gii extension Change Log
2.0.1 under development 2.0.1 under development
----------------------- -----------------------
- Enh #5613: Added `--overwrite` option to Gii console command to support overwriting all files (motin, qiangxue) - Bug #5745: Gii and debug modules may cause 404 exception when the route contains dashes (qiangxue)
- Bug: Gii console command help information does not contain global options (qiangxue) - Bug: Gii console command help information does not contain global options (qiangxue)
- Enh #5613: Added `--overwrite` option to Gii console command to support overwriting all files (motin, qiangxue)
2.0.0 October 12, 2014 2.0.0 October 12, 2014
......
...@@ -88,7 +88,7 @@ class Module extends \yii\base\Module implements BootstrapInterface ...@@ -88,7 +88,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
$app->getUrlManager()->addRules([ $app->getUrlManager()->addRules([
$this->id => $this->id . '/default/index', $this->id => $this->id . '/default/index',
$this->id . '/<id:\w+>' => $this->id . '/default/view', $this->id . '/<id:\w+>' => $this->id . '/default/view',
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>', $this->id . '/<controller:[\w\-]+>/<action:[\w\-]+>' => $this->id . '/<controller>/<action>',
], false); ], false);
} elseif ($app instanceof \yii\console\Application) { } elseif ($app instanceof \yii\console\Application) {
$app->controllerMap[$this->id] = [ $app->controllerMap[$this->id] = [
......
...@@ -13,6 +13,7 @@ Yii Framework 2 Change Log ...@@ -13,6 +13,7 @@ Yii Framework 2 Change Log
- Bug #5665: The `currentPage` meta data in the RESTful result should be 1-based, similar to that in HTTP headers (qiangxue) - Bug #5665: The `currentPage` meta data in the RESTful result should be 1-based, similar to that in HTTP headers (qiangxue)
- Bug #5682: The `asset` command would incorrectly combine CSS files when `UrlManager::linkAssets` is true (dmvslv) - Bug #5682: The `asset` command would incorrectly combine CSS files when `UrlManager::linkAssets` is true (dmvslv)
- Bug #5702: Parenthesis should be automatically added to `Validator::whenClient` to avoid js error (mdmunir, qiangxue) - Bug #5702: Parenthesis should be automatically added to `Validator::whenClient` to avoid js error (mdmunir, qiangxue)
- Bug #5745: Gii and debug modules may cause 404 exception when the route contains dashes (qiangxue)
- Bug: Gii console command help information does not contain global options (qiangxue) - Bug: Gii console command help information does not contain global options (qiangxue)
- Bug: `yii\web\UrlRule` was unable to create URLs for rules containing unicode characters (samdark) - Bug: `yii\web\UrlRule` was unable to create URLs for rules containing unicode characters (samdark)
- Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue) - Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
......
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