Add (badge)
This commit is contained in:
@@ -11,7 +11,6 @@ public static function handleMulti($hours = 3)
|
||||
{
|
||||
$rss_urls = config('platform.global.rss');
|
||||
|
||||
|
||||
$raw_posts = [];
|
||||
|
||||
foreach ($rss_urls as $rss_url) {
|
||||
@@ -29,7 +28,6 @@ public static function handleSingle($rss_url, $hours = 3)
|
||||
{
|
||||
$blacklist_rss_post_domain = config('platform.global.blacklist_rss_post_domain');
|
||||
|
||||
|
||||
$f = FeedReader::read($rss_url);
|
||||
|
||||
$raw_posts = [];
|
||||
@@ -44,17 +42,12 @@ public static function handleSingle($rss_url, $hours = 3)
|
||||
$title = trim($item->get_title());
|
||||
$description = trim($item->get_content());
|
||||
|
||||
|
||||
$domain = get_domain_from_url($item->get_link());
|
||||
|
||||
if (in_array($domain, $blacklist_rss_post_domain))
|
||||
{
|
||||
continue ;
|
||||
if (in_array($domain, $blacklist_rss_post_domain)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$raw_posts[] = (object) [
|
||||
'source' => $f->get_title(),
|
||||
'source_url' => $rss_url,
|
||||
|
||||
@@ -141,22 +141,15 @@ public static function handle(int $rss_post_id)
|
||||
|
||||
$rss_post->keyword_list = implode(',', $words_to_add_in_keyword_list);
|
||||
|
||||
|
||||
if (is_empty($rss_post->bites))
|
||||
{
|
||||
$rss_post->status = 'blocked';
|
||||
if (is_empty($rss_post->bites)) {
|
||||
$rss_post->status = 'blocked';
|
||||
} else {
|
||||
$rss_post->status = 'published';
|
||||
}
|
||||
else
|
||||
{
|
||||
$rss_post->status = 'published';
|
||||
}
|
||||
|
||||
|
||||
if ($rss_post->save()) {
|
||||
|
||||
|
||||
if ($rss_post->status == 'published')
|
||||
{
|
||||
if ($rss_post->status == 'published') {
|
||||
|
||||
$has_saved_keyword = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user