Commit 5e970cff23629bd5a65a103beaa05bd1926a4f61
1 parent
f9849059
06.09.16
Showing
2 changed files
with
35 additions
and
6 deletions
Show diff stats
common/modules/product/CatalogUrlManager.php
| ... | ... | @@ -29,12 +29,6 @@ class CatalogUrlManager implements UrlRuleInterface { |
| 29 | 29 | $pathInfo = $request->getPathInfo(); |
| 30 | 30 | $paths = explode('/', $pathInfo); |
| 31 | 31 | |
| 32 | - if(isset($paths[1])) { | |
| 33 | - if(strripos($request->url,'catalog/'.$paths[1].'?') && (!strripos($request->url,'?page')) && (!strripos($request->url,'?sort'))){ | |
| 34 | - throw new HttpException(404 ,'Page not found'); | |
| 35 | - } | |
| 36 | - | |
| 37 | - } | |
| 38 | 32 | |
| 39 | 33 | |
| 40 | 34 | if (!array_key_exists($paths[0], $this->route_map)) { | ... | ... |
console/migrations/m160907_101042_events_to_products.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +use yii\db\Migration; | |
| 4 | + | |
| 5 | +class m160907_101042_events_to_products extends Migration | |
| 6 | +{ | |
| 7 | + public function up() | |
| 8 | + { | |
| 9 | + $this->createTable('events_to_products', [ | |
| 10 | + 'events_to_products_id' => $this->primaryKey(), | |
| 11 | + 'event_id' => $this->integer()->notNull(), | |
| 12 | + 'product_id' => $this->integer()->notNull(), | |
| 13 | + ]); | |
| 14 | + $this->addForeignKey('events_to_products_to_event_fk', 'events_to_products', 'event_id', 'event', 'event_id', 'CASCADE', 'CASCADE'); | |
| 15 | + $this->addForeignKey('events_to_products_to_product_fk', 'events_to_products', 'product_id', 'product', 'product_id', 'CASCADE', 'CASCADE'); | |
| 16 | + } | |
| 17 | + | |
| 18 | + public function down() | |
| 19 | + { | |
| 20 | + $this->dropForeignKey('events_to_products_to_event_fk', 'events_to_products'); | |
| 21 | + $this->dropForeignKey('events_to_products_to_product_fk', 'events_to_products'); | |
| 22 | + $this->dropTable('events_to_products'); | |
| 23 | + } | |
| 24 | + | |
| 25 | + /* | |
| 26 | + // Use safeUp/safeDown to run migration code within a transaction | |
| 27 | + public function safeUp() | |
| 28 | + { | |
| 29 | + } | |
| 30 | + | |
| 31 | + public function safeDown() | |
| 32 | + { | |
| 33 | + } | |
| 34 | + */ | |
| 35 | +} | ... | ... |