Publish pending FNA themes, article layouts, tutorials and branding
This commit is contained in:
1 parent
ec5b5f2ae5
commit
e6256f68fd
152 files changed
+1656
-170
No files matched your search
@@ -58,8 +58,6 @@ public function receive(Request $oRequest)
|
||||
$aPutField = [
|
||||
"iCategoryId" => $oCategory->id,
|
||||
"iLikeCount" => $aOpt["iLikeCount"] ?? "skip",
|
||||
"i7like" => $aOpt["i7like"] ?? "skip",
|
||||
"i365like" => $aOpt["i365like"] ?? "skip",
|
||||
"iIsTop" => $aOpt["iIsTop"] ?? "skip",
|
||||
"sThumb" => $aOpt["sThumb"] ?? "skip",
|
||||
];
|
||||
@@ -72,6 +70,13 @@ public function receive(Request $oRequest)
|
||||
if (!$oArticle) {
|
||||
$oArticle = new Articles();
|
||||
$oArticle->sSlug = $sSlug;
|
||||
$overrides = [];
|
||||
foreach (['i7like' => 'seven_day', 'i365like' => 'yearly'] as $field => $key) {
|
||||
if (isset($aOpt[$field]) && $aOpt[$field] !== 'skip') $overrides[$key] = $aOpt[$field];
|
||||
}
|
||||
foreach (app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('legacy_other', $overrides) as $field => $value) {
|
||||
$oArticle->{$field} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($aPutField as $k => $v) {
|
||||
@@ -113,7 +118,6 @@ public function receiveShadowrocketids(Request $oRequest)
|
||||
$sSlug = 'ssi'.date("Ymd");
|
||||
// $sImgAuthor = "tg_xiuren_a";
|
||||
$sSubKey = $_ENV['site_code_short'].'::ssi';
|
||||
$i7like = $aData["7like"] ?? 0;
|
||||
|
||||
$oThumbNum = ArticleThumbNum::firstOrCreate(["author_code" => $sSubKey, "type" => "shadowrocketids"]);
|
||||
$iThumbNum = $oThumbNum->num;
|
||||
@@ -156,7 +160,8 @@ public function receiveShadowrocketids(Request $oRequest)
|
||||
|
||||
// 只有新创建时才写入初始点赞数
|
||||
if (!$oArticle) {
|
||||
$aAttributes['i7like'] = $i7like;
|
||||
$overrides = isset($aData['7like']) ? ['seven_day' => $aData['7like']] : [];
|
||||
$aAttributes += app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('shadowrocketids', $overrides);
|
||||
}
|
||||
|
||||
$oArticle = Articles::updateOrCreate(
|
||||
@@ -192,7 +197,6 @@ public function receiveFreenode(Request $oRequest)
|
||||
$sSlug = 'fn'.date("Ymd");
|
||||
// $sImgAuthor = "tg_xiuren_a";
|
||||
$sSubKey = $_ENV['site_code_short'].'::fn';
|
||||
$i7like = $aArticle["7like"] ?? 0;
|
||||
|
||||
$oThumbNum = ArticleFreenodeThumbNum::firstOrCreate(["author_code" => $sSubKey]);
|
||||
$iThumbNum = $oThumbNum->num;
|
||||
@@ -235,7 +239,8 @@ public function receiveFreenode(Request $oRequest)
|
||||
|
||||
// 只有新创建时才写入初始点赞数
|
||||
if (!$oArticle) {
|
||||
$aAttributes['i7like'] = $i7like;
|
||||
$overrides = isset($aArticle['7like']) ? ['seven_day' => $aArticle['7like']] : [];
|
||||
$aAttributes += app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('freenode', $overrides);
|
||||
}
|
||||
|
||||
$oArticle = Articles::updateOrCreate(
|
||||
|
||||
Reference in new issue
Block a user