|
|
@ -1011,25 +1011,25 @@ function get_cover($cover_id, $field = null, $root = 1, $flag = true)
|
|
|
|
if (!empty($picture['oss_url'])) {
|
|
|
|
if (!empty($picture['oss_url'])) {
|
|
|
|
return $picture['oss_url'];
|
|
|
|
return $picture['oss_url'];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
return '//' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elseif (get_tool_status("qiniu_storage") == 1) {
|
|
|
|
} elseif (get_tool_status("qiniu_storage") == 1) {
|
|
|
|
if (!empty($picture['url'])) {
|
|
|
|
if (!empty($picture['url'])) {
|
|
|
|
return $picture['url'];
|
|
|
|
return $picture['url'];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
return '//' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elseif (get_tool_status("cos_storage") == 1) {
|
|
|
|
} elseif (get_tool_status("cos_storage") == 1) {
|
|
|
|
if (!empty($picture['url'])) {
|
|
|
|
if (!empty($picture['url'])) {
|
|
|
|
return $picture['url'];
|
|
|
|
return $picture['url'];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
return '//' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elseif (get_tool_status("bos_storage") == 1) {
|
|
|
|
} elseif (get_tool_status("bos_storage") == 1) {
|
|
|
|
if (!empty($picture['bos_url'])) {
|
|
|
|
if (!empty($picture['bos_url'])) {
|
|
|
|
return $picture['bos_url'];
|
|
|
|
return $picture['bos_url'];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
return '//' . $_SERVER['HTTP_HOST'] . __ROOT__ . $picture['path'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ($field == 'path') {
|
|
|
|
if ($field == 'path') {
|
|
|
|