|
@@ -202,9 +202,7 @@ class Api extends Core
|
|
|
$data['code'] = $this->getInfoCode();
|
|
|
|
|
|
# 获取合集分享信息
|
|
|
- if ($this->uid && $this->uid > 0) {
|
|
|
- $data['share'] = $this->getInfoShare($data['info']);
|
|
|
- }
|
|
|
+ $data['share'] = $this->getInfoShare($data['info']);
|
|
|
|
|
|
$data['share_user'] = array();
|
|
|
if ($this->uid && $this->uid > 0 && $this->share_uid && $this->share_uid > 0) {
|
|
@@ -233,10 +231,14 @@ class Api extends Core
|
|
|
|
|
|
private function getInfoShare($info)
|
|
|
{
|
|
|
- $data['title'] = $info['share_title'] ? $info['share_title'] : '{username}邀请你看{name}';
|
|
|
+ if ($this->uid && $this->uid > 0) {
|
|
|
+ $data['title'] = $info['share_title'] ? $info['share_title'] : '{username}邀请你看{name}';
|
|
|
|
|
|
- $data['title'] = str_replace('{username}', $this->user['username'], $data['title']);
|
|
|
- $data['title'] = str_replace('{name}', $info['name'], $data['title']);
|
|
|
+ $data['title'] = str_replace('{username}', $this->user['username'], $data['title']);
|
|
|
+ $data['title'] = str_replace('{name}', $info['name'], $data['title']);
|
|
|
+ } else {
|
|
|
+ $data['title'] = $info['name'];
|
|
|
+ }
|
|
|
|
|
|
$data['content'] = $info['share_content'] ? $info['share_content'] : $info['desc'];
|
|
|
|