Code standards

This commit is contained in:
Michael 2020-04-22 15:22:39 +00:00
parent e19b1800a4
commit 1f7993acad
2 changed files with 3 additions and 3 deletions

View file

@ -144,7 +144,7 @@ function query_page_info($url, $photo = "", $keywords = false, $keyword_blacklis
function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blacklist = "")
{
$data = query_page_info($url, $photo, $keywords, $keyword_blacklist);
if (empty($data['keywords']) || !is_array($data['keywords'])) {
if (empty($data["keywords"]) || !is_array($data["keywords"])) {
return '';
}
@ -166,7 +166,7 @@ function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blackl
function get_page_keywords($url, $photo = "", $keywords = false, $keyword_blacklist = "")
{
$data = query_page_info($url, $photo, $keywords, $keyword_blacklist);
if (empty($data['keywords']) || !is_array($data['keywords'])) {
if (empty($data["keywords"]) || !is_array($data["keywords"])) {
return [];
}

View file

@ -207,7 +207,7 @@ class UserItem
}
// Or the contact is a mentioned forum
$tags = DBA::select('term', ['url'], ['otype' => term::OBJECT_TYPE_POST, 'oid' => $item['id'], 'type' => Term::MENTION, 'uid' => $uid]);
$tags = DBA::select('term', ['url'], ['otype' => Term::OBJECT_TYPE_POST, 'oid' => $item['id'], 'type' => Term::MENTION, 'uid' => $uid]);
while ($tag = DBA::fetch($tags)) {
$condition = ['nurl' => Strings::normaliseLink($tag['url']), 'uid' => $uid, 'notify_new_posts' => true, 'contact-type' => Contact::TYPE_COMMUNITY];
if (DBA::exists('contact', $condition)) {