diff --git a/common/modules/product/CatalogUrlManager.php b/common/modules/product/CatalogUrlManager.php index 68145c8..2bee6f7 100755 --- a/common/modules/product/CatalogUrlManager.php +++ b/common/modules/product/CatalogUrlManager.php @@ -29,12 +29,6 @@ class CatalogUrlManager implements UrlRuleInterface { $pathInfo = $request->getPathInfo(); $paths = explode('/', $pathInfo); - if(isset($paths[1])) { - if(strripos($request->url,'catalog/'.$paths[1].'?') && (!strripos($request->url,'?page')) && (!strripos($request->url,'?sort'))){ - throw new HttpException(404 ,'Page not found'); - } - - } if (!array_key_exists($paths[0], $this->route_map)) { diff --git a/console/migrations/m160907_101042_events_to_products.php b/console/migrations/m160907_101042_events_to_products.php new file mode 100644 index 0000000..462a141 --- /dev/null +++ b/console/migrations/m160907_101042_events_to_products.php @@ -0,0 +1,35 @@ +createTable('events_to_products', [ + 'events_to_products_id' => $this->primaryKey(), + 'event_id' => $this->integer()->notNull(), + 'product_id' => $this->integer()->notNull(), + ]); + $this->addForeignKey('events_to_products_to_event_fk', 'events_to_products', 'event_id', 'event', 'event_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('events_to_products_to_product_fk', 'events_to_products', 'product_id', 'product', 'product_id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropForeignKey('events_to_products_to_event_fk', 'events_to_products'); + $this->dropForeignKey('events_to_products_to_product_fk', 'events_to_products'); + $this->dropTable('events_to_products'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} -- libgit2 0.21.4