File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CHANGELOG
22==============
33
4+ 2.1.6.2
5+ -----------------
6+ * Canurl only for urlManager->enablePrettyUrl
7+
482.1.6.1
59-----------------
610 * Update logs
Original file line number Diff line number Diff line change @@ -276,7 +276,10 @@ public function bootstrap($application)
276276 * Стандартная инициализация canurl
277277 */
278278 Event::on (Controller::class, Controller::EVENT_BEFORE_ACTION , function (ActionEvent $ e ) {
279- $ this ->_initDefaultCanUrl ();
279+ if (\Yii::$ app ->urlManager ->enablePrettyUrl ) {
280+ $ this ->_initDefaultCanUrl ();
281+ }
282+
280283
281284 /**
282285 * Редирект 404 ошибок
@@ -312,7 +315,6 @@ public function bootstrap($application)
312315
313316 protected function _initDefaultCanUrl ()
314317 {
315-
316318 /**
317319 * Канурл может быть отключен вовсе
318320 */
@@ -412,7 +414,7 @@ public function _addCanurlParams(WidgetEvent $e)
412414
413415 public function _isTrigerEventCanUrl ()
414416 {
415- if (\Yii::$ app ->controller && in_array (\Yii::$ app ->controller ->uniqueId , [
417+ if (\Yii::$ app ->urlManager -> enablePrettyUrl && \Yii:: $ app -> controller && in_array (\Yii::$ app ->controller ->uniqueId , [
416418 'cms/tree ' ,
417419 'cms/content-element ' ,
418420 'savedFilters/saved-filters ' ,
You can’t perform that action at this time.
0 commit comments