X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FNoScrape.php;h=c4138ed709db5c2c0191a3bd2b3134993f4ffe3d;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=8e5850ac0b4ad30efbfef9a67378054121eeffad;hpb=32a9f39768569b6c1407b815a3044fc181ced535;p=friendica.git diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index 8e5850ac0b..c4138ed709 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -1,6 +1,6 @@ getLoggedInUserNickname(); } else { - System::jsonError(403, 'Authentication required'); + $this->jsonError(403, 'Authentication required'); } $owner = User::getOwnerDataByNick($which); if (empty($owner['uid'])) { - System::jsonError(404, 'Profile not found'); + $this->jsonError(404, 'Profile not found'); } $json_info = [ @@ -71,7 +71,7 @@ class NoScrape extends BaseModule if (!$owner['net-publish']) { $json_info['hide'] = true; - System::jsonExit($json_info); + $this->jsonExit($json_info); } $keywords = $owner['pub_keywords'] ?? ''; @@ -94,7 +94,7 @@ class NoScrape extends BaseModule // We display the last activity (post or login), reduced to year and week number $last_active = strtotime($owner['last-item']); - if ($last_active < strtotime($owner['last-activity'])) { + if ($owner['last-activity'] && $last_active < strtotime($owner['last-activity'])) { $last_active = strtotime($owner['last-activity']); } $json_info['last-activity'] = date('o-W', $last_active); @@ -107,6 +107,6 @@ class NoScrape extends BaseModule } } - System::jsonExit($json_info); + $this->jsonExit($json_info); } }