|
|
|
@ -87,7 +87,7 @@ Class FrontApiController extends SiteController {
@@ -87,7 +87,7 @@ Class FrontApiController extends SiteController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//分享内容来源平台检查 |
|
|
|
|
$shareUrl = $this->getShareUrlFromContent($content); |
|
|
|
|
$shareUrl = Common::getShareUrlFromContent($content); |
|
|
|
|
$platform = Html::getShareVideosPlatform($shareUrl); |
|
|
|
|
if (!in_array($platform, FSC::$app['config']['tajian']['supportedPlatforms'])) { |
|
|
|
|
$code = 0; |
|
|
|
@ -147,17 +147,6 @@ Class FrontApiController extends SiteController {
@@ -147,17 +147,6 @@ Class FrontApiController extends SiteController {
|
|
|
|
|
return md5($url); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected function getShareUrlFromContent($content) { |
|
|
|
|
$url = ''; |
|
|
|
|
|
|
|
|
|
preg_match("/https:\/\/[\w\.]+(\/\w+){1,}\/?/i", $content, $matches); |
|
|
|
|
if (!empty($matches)) { |
|
|
|
|
$url = $matches[0]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $url; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//保存分享视频 |
|
|
|
|
protected function saveShareVideo($shareUrl, $title, $tagName) { |
|
|
|
|
$done = true; |
|
|
|
|