|
@@ -38,7 +38,7 @@ class brand_helper
|
|
|
{
|
|
|
$brand_id = intval($brand_id);
|
|
|
if(array_key_exists($brand_id,$this->mBaseInfo)) {
|
|
|
- return $this->mBaseInfo[$brand_id]['country'];
|
|
|
+ return $this->mBaseInfo[$brand_id]['brand_country'];
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
@@ -47,7 +47,7 @@ class brand_helper
|
|
|
{
|
|
|
$brand_id = intval($brand_id);
|
|
|
if(array_key_exists($brand_id,$this->mBaseInfo)) {
|
|
|
- return $this->mBaseInfo[$brand_id]['country_logo'];
|
|
|
+ return $this->mBaseInfo[$brand_id]['brand_country_logo'];
|
|
|
} else {
|
|
|
return '';
|
|
|
}
|
|
@@ -86,28 +86,27 @@ class brand_helper
|
|
|
|
|
|
foreach ($items as $brand)
|
|
|
{
|
|
|
- if(empty($brand['brand_logo'])) continue;
|
|
|
-
|
|
|
$image = UPLOAD_SITE_URL . $brand['brand_logo'];
|
|
|
$ret = util::imgsize($image);
|
|
|
if ($ret != false) {
|
|
|
$brand['brand_logo'] = $image;
|
|
|
} else {
|
|
|
- Log::record("cant getimagesize {$image}." ,Log::ERR);
|
|
|
+ $brand['brand_logo'] = "";
|
|
|
+ Log::record("cant get {$brand['brand_name']}." ,Log::ERR);
|
|
|
+ continue;
|
|
|
}
|
|
|
- $brand_id = intval($brand['brand_country_logo']);
|
|
|
|
|
|
- if(empty($brand['brand_logo'])) {
|
|
|
- $base_info[$brand_id]['country_logo'] = '';
|
|
|
+ if(empty($brand['brand_country_logo'])) {
|
|
|
+ $conuntry_logo = '';
|
|
|
} else {
|
|
|
- $base_info[$brand_id]['country_logo'] = UPLOAD_SITE_URL . $brand['brand_country_logo'];
|
|
|
- $brand['country_logo'] = UPLOAD_SITE_URL . $brand['brand_country_logo'];
|
|
|
+ $conuntry_logo = UPLOAD_SITE_URL . $brand['brand_country_logo'];
|
|
|
+ Log::record("cant get {$brand['brand_name']} brand_country_logo." ,Log::ERR);
|
|
|
}
|
|
|
+ $brand['brand_country_logo'] = $conuntry_logo;
|
|
|
|
|
|
- if($ret != false) $brands[] = $brand;
|
|
|
-
|
|
|
- $base_info[$brand_id]['country'] = $brand['brand_country'];
|
|
|
- $base_info[$brand_id]['author_desc'] = $brand['author_desc'];
|
|
|
+ $brand_id = intval($brand['brand_id']);
|
|
|
+ $brands[] = $brand;
|
|
|
+ $base_info[$brand_id] = $brand;
|
|
|
}
|
|
|
|
|
|
$block = special_formater::format_grid_brands($brands);
|