@@ 101-112 (lines=12) @@ | ||
98 | return str_replace('product_', '', $field).'_id'; |
|
99 | } |
|
100 | ||
101 | private function checkLocation($location) |
|
102 | { |
|
103 | if( !self::$locations ) |
|
104 | { |
|
105 | Yii::import('backend.modules.product.modules.assignmentContent.AssignmentContentModule'); |
|
106 | ||
107 | self::$locations = AssignmentContentModule::$locations; |
|
108 | } |
|
109 | ||
110 | if( !isset(self::$locations[$location]) ) |
|
111 | throw new CHttpException(500, 'Location '.$location.' не указан в свойстве $locations класса AssignmentContentModule'); |
|
112 | } |
|
113 | } |
@@ 153-163 (lines=11) @@ | ||
150 | return preg_replace('/\?.*/', '', $url); |
|
151 | } |
|
152 | ||
153 | private function checkLocation($location) |
|
154 | { |
|
155 | if( !self::$bannerLocations ) |
|
156 | { |
|
157 | Yii::import('backend.modules.banner.BannerModule'); |
|
158 | self::$bannerLocations = BannerModule::$bannerLocations; |
|
159 | } |
|
160 | ||
161 | if( !isset(self::$bannerLocations[$location]) ) |
|
162 | throw new CHttpException(500, 'Location '.$location.' не указан в свойстве $bannerLocations класса BannerModule'); |
|
163 | } |
|
164 | } |