Commit 5b6a988d2d07c9550224f277f695d96aefa053f0

Authored by Dima
2 parents 2036ef98 3269b8a0

Merge branch 'remote_work' into 'master'

Remote work

New merge request
From Alex:remote_work into Alex:master

See merge request !20
Showing 1 changed file with 24 additions and 12 deletions   Show diff stats
www/index.php
... ... @@ -1789,18 +1789,30 @@ try
1789 1789 'action' => 'please_return',]
1790 1790 )
1791 1791 ->setName( 'please_return' );
1792   - $router->add
1793   - ('/nasinnja_ovochiv_1c0/koshiki_1c1',
1794   - ['controller' => 'page',
1795   - 'action' => 'basket_ua',]
1796   - )
1797   - ->setName( 'basket_ua' );
1798   - $router->add
1799   - ('/semena_ovoshchey_1c_20/koshiki_1c_21{language:([/][a-z]{2})?}',
1800   - ['controller' => 'page',
1801   - 'action' => 'basket_ru',]
1802   - )
1803   - ->setName( 'basket_ru' );
  1792 + $router->add
  1793 + ('/nasinnja_ovochiv_1c0/koshiki_1c1',
  1794 + ['controller' => 'page']
  1795 + )->beforeMatch(function($matchedRoute, $routeObject) {
  1796 + return \Phalcon\DI::getDefault()->getResponse()->redirect("/koshiki_1c0/koshiki_ovochevi_1c1", true, 301);
  1797 + });
  1798 + $router->add
  1799 + ('/semena_ovoshchey_1c_20/koshiki_1c_21{language:([/][a-z]{2})?}',
  1800 + ['controller' => 'page'])->beforeMatch(function($matchedRoute, $routeObject){
  1801 + return \Phalcon\DI::getDefault()->getResponse()->redirect("/koshiki_1c_20/koshiki_ovochevi_1c_21/ru", true, 301);
  1802 + });
  1803 +
  1804 + $router->add
  1805 + ('/koshiki_1c0/koshiki_ovochevi_1c1',
  1806 + ['controller' => 'page',
  1807 + 'action' => 'basket_ua',]
  1808 + )
  1809 + ->setName( 'basket_ua' );
  1810 + $router->add
  1811 + ('/koshiki_1c_20/koshiki_ovochevi_1c_21{language:([/][a-z]{2})?}',
  1812 + ['controller' => 'page',
  1813 + 'action' => 'basket_ru',]
  1814 + )
  1815 + ->setName( 'basket_ru' );
1804 1816 return $router;
1805 1817 }, true );
1806 1818  
... ...