Authored by hf

code review by fei.hong : fixes bugs to go boys

@@ -71,13 +71,7 @@ class Bootstrap extends Bootstrap_Abstract @@ -71,13 +71,7 @@ class Bootstrap extends Bootstrap_Abstract
71 $controller = 'Index'; 71 $controller = 'Index';
72 $action = 'Index'; 72 $action = 'Index';
73 // 二级域名 73 // 二级域名
74 - if (3 === $level) {  
75 - $url = strtolower($dispatcher->getRequest()->getRequestUri());  
76 - if(empty($url) || $url == '/index' || $url == '/') {  
77 - $urlAction = '/index';  
78 - } else {  
79 - $urlAction = $url;  
80 - } 74 + if (2 === $level) {
81 $subDomain = strval($hostParts[0]); 75 $subDomain = strval($hostParts[0]);
82 switch (strtolower($subDomain)) { 76 switch (strtolower($subDomain)) {
83 case 'www': // 主站 77 case 'www': // 主站
@@ -87,27 +81,16 @@ class Bootstrap extends Bootstrap_Abstract @@ -87,27 +81,16 @@ class Bootstrap extends Bootstrap_Abstract
87 break; 81 break;
88 case 'search': // 搜索 82 case 'search': // 搜索
89 $module = 'Product'; 83 $module = 'Product';
90 - if($urlAction == '/index') {  
91 - $searchRequest = new Yaf\Request\Http('/product/search/index');  
92 - $dispatcher->setRequest($searchRequest);  
93 - }  
94 break; 84 break;
95 case 'guang': // 逛 85 case 'guang': // 逛
96 $module = 'Guang'; 86 $module = 'Guang';
97 break; 87 break;
98 case 'list': // 商品列表 88 case 'list': // 商品列表
99 $module = 'Product'; 89 $module = 'Product';
100 - //list列表的index  
101 - if($urlAction == '/index') {  
102 - $listRequest = new Yaf\Request\Http('/product/list/index');  
103 - $dispatcher->setRequest($listRequest);  
104 - }  
105 break; 90 break;
106 case 'sale'://促销 91 case 'sale'://促销
107 $module = 'Product'; 92 $module = 'Product';
108 $controller = 'sale'; 93 $controller = 'sale';
109 - $saleRequest = new Yaf\Request\Http('/product/sale/index');  
110 - $dispatcher->setRequest($saleRequest);  
111 break; 94 break;
112 default: // 其它(识别为品牌) 95 default: // 其它(识别为品牌)
113 $module = 'Product'; 96 $module = 'Product';