diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 14ed7b0b28..ecff7218dd 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -1,7 +1,7 @@ #!/usr/bin/env php Contact::TYPE_COMMUNITY, 'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB], - 'uid' => $uid, + 'uid' => $uid, 'blocked' => false, 'pending' => false, - 'archive' => false, + 'archive' => false, ]; $condition = DBA::mergeConditions($condition, ["`platform` != ?", 'peertube']); diff --git a/src/Content/Item.php b/src/Content/Item.php index 4fb1f85d62..2cccf722ad 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -1,6 +1,6 @@ t('The detection of TLS to secure the communication between the browser and the new Friendica server failed.'); $help .= ' ' . DI::l10n()->t('It is highly encouraged to use Friendica only over a secure connection as sensitive information like passwords will be transmitted.'); diff --git a/src/Core/KeyValueStorage/Capabilities/IManageKeyValuePairs.php b/src/Core/KeyValueStorage/Capabilities/IManageKeyValuePairs.php index 64b317bf1a..c9d215c49c 100644 --- a/src/Core/KeyValueStorage/Capabilities/IManageKeyValuePairs.php +++ b/src/Core/KeyValueStorage/Capabilities/IManageKeyValuePairs.php @@ -1,6 +1,6 @@ 0) { $condition_string = " WHERE (" . array_shift($condition) . ")"; diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 7de6799cfd..645084a96f 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -1,6 +1,6 @@ ['last-item' => true], 'limit' => $totallimit] ); @@ -451,7 +451,7 @@ class Relation ["NOT `nurl` IN (SELECT `nurl` FROM `contact` WHERE `uid` = ? AND `rel` IN (?, ?) AND `nurl` = `nurl`) AND NOT `hidden` AND `uid` = ? AND `network` IN (?, ?, ?, ?) AND NOT `uri-id` IN (SELECT `uri-id` FROM `account-suggestion` WHERE `uri-id` = `contact`.`uri-id` AND `uid` = ?)", - $uid, Contact::FRIEND, Contact::SHARING, 0, + $uid, Contact::FRIEND, Contact::SHARING, 0, Protocol::ACTIVITYPUB, Protocol::DFRN, $diaspora, $ostatus, $uid], ['order' => ['last-item' => true], 'limit' => $totallimit] ); @@ -477,7 +477,7 @@ class Relation public static function countFollows(int $cid, array $condition = []): int { $condition = DBA::mergeConditions($condition, [ - '`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', + '`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', $cid, ]); @@ -498,7 +498,7 @@ class Relation public static function listFollows(int $cid, array $condition = [], int $count = 30, int $offset = 0, bool $shuffle = false) { $condition = DBA::mergeConditions($condition, - ['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', + ['`id` IN (SELECT `relation-cid` FROM `contact-relation` WHERE `cid` = ? AND `follows`)', $cid] ); diff --git a/src/Model/Contact/User.php b/src/Model/Contact/User.php index 1452369e5e..a3091f7d83 100644 --- a/src/Model/Contact/User.php +++ b/src/Model/Contact/User.php @@ -1,6 +1,6 @@ $cid, 'private' => [Item::PUBLIC, Item::UNLISTED], 'deleted' => false, 'type' => $type]); } diff --git a/src/Model/Post/Content.php b/src/Model/Post/Content.php index 63ea9b8cd1..0694b3a377 100644 --- a/src/Model/Post/Content.php +++ b/src/Model/Post/Content.php @@ -1,6 +1,6 @@ $id, 'uri-id' => $uriId, 'url' => $url]); - } else { + } else { $fields = self::fetchMimeType($url); $fields['uri-id'] = $uriId; $fields['url'] = $url; diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index 28526b5b04..074cee5221 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -1,6 +1,6 @@ selectPublicFieldsByUserId($uid); $profile = self::formatProfile($profile, $profileFields); diff --git a/src/Module/Api/GNUSocial/GNUSocial/Config.php b/src/Module/Api/GNUSocial/GNUSocial/Config.php index ed27b8ef3a..94d155cda4 100644 --- a/src/Module/Api/GNUSocial/GNUSocial/Config.php +++ b/src/Module/Api/GNUSocial/GNUSocial/Config.php @@ -1,6 +1,6 @@ ['pid' => true], 'limit' => $request['limit']]; $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; - + if (!empty($request['max_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $request['max_id']]); } - + if (!empty($request['since_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['since_id']]); } - + if (!empty($request['min_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['min_id']]); - + $params['order'] = ['pid']; } - + $accounts = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $accounts[] = DI::mstdnAccount()->createFromContactId($follower['pid'], $uid); @@ -85,23 +85,23 @@ class Followers extends BaseApi $params = ['order' => ['relation-cid' => true], 'limit' => $request['limit']]; $condition = ['cid' => $id, 'follows' => true]; - + if (!empty($request['max_id'])) { $condition = DBA::mergeConditions($condition, ["`relation-cid` < ?", $request['max_id']]); } - + if (!empty($request['since_id'])) { $condition = DBA::mergeConditions($condition, ["`relation-cid` > ?", $request['since_id']]); } - + if (!empty($request['min_id'])) { $condition = DBA::mergeConditions($condition, ["`relation-cid` > ?", $request['min_id']]); - + $params['order'] = ['relation-cid']; } - + $accounts = []; - + $followers = DBA::select('contact-relation', ['relation-cid'], $condition, $params); while ($follower = DBA::fetch($followers)) { self::setBoundaries($follower['relation-cid']); diff --git a/src/Module/Api/Mastodon/Accounts/Following.php b/src/Module/Api/Mastodon/Accounts/Following.php index aca6bd5a88..2aa0cad057 100644 --- a/src/Module/Api/Mastodon/Accounts/Following.php +++ b/src/Module/Api/Mastodon/Accounts/Following.php @@ -1,6 +1,6 @@ getRequest([ 'max_id' => 0, // Return results older than this id 'since_id' => 0, // Return results newer than this id - 'min_id' => 0, // Return results immediately newer than id + 'min_id' => 0, // Return results immediately newer than id 'limit' => 40, // Maximum number of results to return. Defaults to 40. ], $request); @@ -60,23 +60,23 @@ class Following extends BaseApi $params = ['order' => ['pid' => true], 'limit' => $request['limit']]; $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]]; - + if (!empty($request['max_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $request['max_id']]); } - + if (!empty($request['since_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['since_id']]); } - + if (!empty($request['min_id'])) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['min_id']]); - + $params['order'] = ['pid']; } - + $accounts = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $accounts[] = DI::mstdnAccount()->createFromContactId($follower['pid'], $uid); diff --git a/src/Module/Api/Mastodon/Accounts/IdentityProofs.php b/src/Module/Api/Mastodon/Accounts/IdentityProofs.php index a924808229..8e2e7292b0 100644 --- a/src/Module/Api/Mastodon/Accounts/IdentityProofs.php +++ b/src/Module/Api/Mastodon/Accounts/IdentityProofs.php @@ -1,6 +1,6 @@ UnprocessableEntity(DI::l10n()->t('Missing parameters')); } diff --git a/src/Module/Api/Mastodon/Apps/VerifyCredentials.php b/src/Module/Api/Mastodon/Apps/VerifyCredentials.php index 286bb695a9..ef9c775c10 100644 --- a/src/Module/Api/Mastodon/Apps/VerifyCredentials.php +++ b/src/Module/Api/Mastodon/Apps/VerifyCredentials.php @@ -1,6 +1,6 @@ getRequest([ 'max_id' => 0, // Return results older than this id 'since_id' => 0, // Return results newer than this id - 'min_id' => 0, // Return results immediately newer than id + 'min_id' => 0, // Return results immediately newer than id 'limit' => 40, // Maximum number of results. Defaults to 40. Max 40. Set to 0 in order to get all accounts without pagination. ], $request); diff --git a/src/Module/Api/Mastodon/Markers.php b/src/Module/Api/Mastodon/Markers.php index 0121acf246..a00b0f8317 100644 --- a/src/Module/Api/Mastodon/Markers.php +++ b/src/Module/Api/Mastodon/Markers.php @@ -1,6 +1,6 @@ UnprocessableEntity(); } - + $media = Photo::upload($uid, $_FILES['file']); if (empty($media)) { DI::mstdnError()->UnprocessableEntity(); diff --git a/src/Module/Api/Mastodon/Mutes.php b/src/Module/Api/Mastodon/Mutes.php index 72fdb25f22..2190c397cc 100644 --- a/src/Module/Api/Mastodon/Mutes.php +++ b/src/Module/Api/Mastodon/Mutes.php @@ -1,6 +1,6 @@ RecordNotFound(); } - + if (!Item::markForDeletionById($item['id'])) { DI::mstdnError()->RecordNotFound(); } diff --git a/src/Module/Api/Mastodon/Suggestions.php b/src/Module/Api/Mastodon/Suggestions.php index f25b4cacfd..9645d39a2e 100644 --- a/src/Module/Api/Mastodon/Suggestions.php +++ b/src/Module/Api/Mastodon/Suggestions.php @@ -1,6 +1,6 @@ ['pid' => true], 'limit' => $count]; $condition = ['uid' => $uid, 'self' => false, 'pending' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; - + $total_count = (int)DBA::count('contact', $condition); if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } - + if (!empty($since_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $since_id]); } - + if (!empty($min_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $min_id]); - + $params['order'] = ['pid']; } - + $ids = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $ids[] = $follower['pid']; diff --git a/src/Module/Api/Twitter/Followers/Lists.php b/src/Module/Api/Twitter/Followers/Lists.php index 04bddf83cd..4a141f1401 100644 --- a/src/Module/Api/Twitter/Followers/Lists.php +++ b/src/Module/Api/Twitter/Followers/Lists.php @@ -1,6 +1,6 @@ ['pid' => true], 'limit' => $count]; $condition = ['uid' => $uid, 'self' => false, 'pending' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; - + $total_count = (int)DBA::count('contact', $condition); if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } - + if (!empty($since_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $since_id]); } - + if (!empty($min_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $min_id]); - + $params['order'] = ['pid']; } - + $ids = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $ids[] = $follower['pid']; @@ -112,7 +112,7 @@ class Lists extends ContactEndpoint $return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities); - $this->response->setHeader(self::getLinkHeader()); + $this->response->setHeader(self::getLinkHeader()); $this->response->exit('lists', ['lists' => $return]); } diff --git a/src/Module/Api/Twitter/Friends/Ids.php b/src/Module/Api/Twitter/Friends/Ids.php index d12e082cfa..0f0523e120 100644 --- a/src/Module/Api/Twitter/Friends/Ids.php +++ b/src/Module/Api/Twitter/Friends/Ids.php @@ -1,6 +1,6 @@ ['pid' => true], 'limit' => $count]; $condition = ['uid' => $uid, 'self' => false, 'pending' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]]; - + $total_count = (int)DBA::count('contact', $condition); if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } - + if (!empty($since_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $since_id]); } - + if (!empty($min_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $min_id]); - + $params['order'] = ['pid']; } - + $ids = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $ids[] = $follower['pid']; diff --git a/src/Module/Api/Twitter/Friends/Lists.php b/src/Module/Api/Twitter/Friends/Lists.php index 1abce53646..534a30aac1 100644 --- a/src/Module/Api/Twitter/Friends/Lists.php +++ b/src/Module/Api/Twitter/Friends/Lists.php @@ -1,6 +1,6 @@ ['pid' => true], 'limit' => $count]; $condition = ['uid' => $uid, 'self' => false, 'pending' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]]; - + $total_count = (int)DBA::count('contact', $condition); if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } - + if (!empty($since_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $since_id]); } - + if (!empty($min_id)) { $condition = DBA::mergeConditions($condition, ["`pid` > ?", $min_id]); - + $params['order'] = ['pid']; } - + $ids = []; - + foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) { self::setBoundaries($follower['pid']); $ids[] = $follower['pid']; @@ -112,7 +112,7 @@ class Lists extends ContactEndpoint $return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities); - $this->response->setHeader(self::getLinkHeader()); + $this->response->setHeader(self::getLinkHeader()); $this->response->exit('lists', ['lists' => $return]); } diff --git a/src/Module/Api/Twitter/Friendships/Destroy.php b/src/Module/Api/Twitter/Friendships/Destroy.php index d324fc6be4..bf769bace5 100644 --- a/src/Module/Api/Twitter/Friendships/Destroy.php +++ b/src/Module/Api/Twitter/Friendships/Destroy.php @@ -1,6 +1,6 @@ response->setHeader(self::getLinkHeader()); + $this->response->setHeader(self::getLinkHeader()); $this->response->exit('incoming', ['incoming' => $return]); } diff --git a/src/Module/Api/Twitter/Friendships/Show.php b/src/Module/Api/Twitter/Friendships/Show.php index c05dc09023..5e9656a719 100644 --- a/src/Module/Api/Twitter/Friendships/Show.php +++ b/src/Module/Api/Twitter/Friendships/Show.php @@ -1,6 +1,6 @@ t('Permission denied.')); } break; - } + } } return parent::run($httpException, $request); diff --git a/src/Module/BaseModeration.php b/src/Module/BaseModeration.php index 1261eebb1c..3de46b319c 100644 --- a/src/Module/BaseModeration.php +++ b/src/Module/BaseModeration.php @@ -1,6 +1,6 @@ getLocalUserId()]); } diff --git a/src/Module/Credits.php b/src/Module/Credits.php index d0b902a517..d16879f7d8 100644 --- a/src/Module/Credits.php +++ b/src/Module/Credits.php @@ -1,6 +1,6 @@ installer->installDatabase(); - + // install allowed themes to register theme hooks // this is same as "Reload active theme" in /admin/themes $allowed_themes = Theme::getAllowedList(); diff --git a/src/Module/Invite.php b/src/Module/Invite.php index 19519938d3..deefc44bbb 100644 --- a/src/Module/Invite.php +++ b/src/Module/Invite.php @@ -1,6 +1,6 @@ $starred], ['id' => $itemId]); diff --git a/src/Module/Magic.php b/src/Module/Magic.php index c300e5971e..8fa67ec979 100644 --- a/src/Module/Magic.php +++ b/src/Module/Magic.php @@ -1,6 +1,6 @@ getLocalUserId()); - + // Loop through all introduction notifications.This creates an array with the output html for each // introduction /** @var Introduction $Introduction */ @@ -152,7 +152,7 @@ class Introductions extends BaseNotifications $helptext = $this->t('Shall your connection be bidirectional or not?'); $helptext2 = $this->t('Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed.', $convertedName, $convertedName); $helptext3 = $this->t('Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $convertedName); - + $friend = ['duplex', $this->t('Friend'), '1', $helptext2, true]; $follower = ['duplex', $this->t('Subscriber'), '0', $helptext3, false]; diff --git a/src/Module/Notifications/Notification.php b/src/Module/Notifications/Notification.php index ff33dd41a2..70590c01fe 100644 --- a/src/Module/Notifications/Notification.php +++ b/src/Module/Notifications/Notification.php @@ -1,6 +1,6 @@ baseUrl->redirect('profile/' . $this->parameters['nickname']); } - + if (empty($this->owner)) { $this->systemMessages->addNotice($this->t('Profile unavailable.')); return; diff --git a/src/Module/Profile/Restricted.php b/src/Module/Profile/Restricted.php index 31ce69fbd4..c4f972077f 100644 --- a/src/Module/Profile/Restricted.php +++ b/src/Module/Profile/Restricted.php @@ -1,6 +1,6 @@ [ '@attributes' => [ 'rel' => 'http://oexchange.org/spec/0.8/rel/resident-target', - 'type' => 'application/xrd+xml', + 'type' => 'application/xrd+xml', 'href' => $domain . '/oexchange/xrd' ] ], @@ -97,7 +97,7 @@ class HostMeta extends BaseModule ] ], ], $xml, false, ['hm' => 'http://host-meta.net/xrd/1.0', 'mk' => 'http://salmon-protocol.org/ns/magic-key']); - + System::httpExit($xml->saveXML(), Response::TYPE_XML, 'application/xrd+xml'); } } diff --git a/src/Module/WellKnown/NodeInfo.php b/src/Module/WellKnown/NodeInfo.php index 0feb5e3792..e1c486c2eb 100644 --- a/src/Module/WellKnown/NodeInfo.php +++ b/src/Module/WellKnown/NodeInfo.php @@ -1,6 +1,6 @@ uid, ['language']); $l10n = $this->l10n->withLang($user['language']); - + $causer = $author = Contact::getById($Notification->actorId, ['id', 'name', 'url', 'contact-type', 'pending']); if (empty($causer)) { $this->logger->info('Causer not found', ['contact' => $Notification->actorId]); diff --git a/src/Navigation/Notifications/Factory/Notify.php b/src/Navigation/Notifications/Factory/Notify.php index d6c777e6f2..c180d4121a 100644 --- a/src/Navigation/Notifications/Factory/Notify.php +++ b/src/Navigation/Notifications/Factory/Notify.php @@ -1,6 +1,6 @@ $approfile['generator']['url'] . '/receive/public', 'notify' => $owner['notify'], 'poll' => $owner['poll'], - 'poco' => $owner['poco'], + 'poco' => $owner['poco'], 'network' => Protocol::DIASPORA, 'pubkey' => $owner['upubkey'], ] diff --git a/src/Object/Api/Friendica/Group.php b/src/Object/Api/Friendica/Group.php index 36dd6df6c9..ce75f9eec1 100644 --- a/src/Object/Api/Friendica/Group.php +++ b/src/Object/Api/Friendica/Group.php @@ -1,6 +1,6 @@ appendChild($author); } diff --git a/src/Protocol/Relay.php b/src/Protocol/Relay.php index 4b7eb16d46..028a7885bb 100644 --- a/src/Protocol/Relay.php +++ b/src/Protocol/Relay.php @@ -1,6 +1,6 @@ $server['url'], 'success' => $success]); - } + } } } diff --git a/src/Protocol/Salmon.php b/src/Protocol/Salmon.php index 7e91b0e3e0..7685c1dd97 100644 --- a/src/Protocol/Salmon.php +++ b/src/Protocol/Salmon.php @@ -1,6 +1,6 @@ 'view/' . self::SMARTY3_TEMPLATE_FOLDER . '/']; $this->setTemplateDir($template_dirs); - + $work_dir = rtrim($work_dir, '/'); $this->setCompileDir($work_dir . '/compiled'); diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php index 201d99f822..5d7ed6c0c9 100644 --- a/src/Render/FriendicaSmartyEngine.php +++ b/src/Render/FriendicaSmartyEngine.php @@ -1,6 +1,6 @@ 'text/plain', 'htm' => 'text/html', 'html' => 'text/html', @@ -44,7 +44,7 @@ class Mimetype 'xml' => 'application/xml', 'swf' => 'application/x-shockwave-flash', 'flv' => 'video/x-flv', - + // images 'png' => 'image/png', 'jpe' => 'image/jpeg', @@ -57,14 +57,14 @@ class Mimetype 'tif' => 'image/tiff', 'svg' => 'image/svg+xml', 'svgz' => 'image/svg+xml', - + // archives 'zip' => 'application/zip', 'rar' => 'application/x-rar-compressed', 'exe' => 'application/x-msdownload', 'msi' => 'application/x-msdownload', 'cab' => 'application/vnd.ms-cab-compressed', - + // audio/video 'mp3' => 'audio/mpeg', 'wav' => 'audio/wav', @@ -75,14 +75,14 @@ class Mimetype 'avi' => 'video/x-msvideo', 'wmv' => 'video/x-ms-wmv', 'wma' => 'audio/x-ms-wma', - + // adobe 'pdf' => 'application/pdf', 'psd' => 'image/vnd.adobe.photoshop', 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' => 'application/postscript', - + // ms office 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', @@ -91,12 +91,12 @@ class Mimetype 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - - + + // open office 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',*/ - + // Assembled from the original Friendica list and // lists from http://www.freeformatter.com/mime-types-list.html // and http://www.webmaster-toolkit.com/mime-types.shtml @@ -1088,7 +1088,7 @@ class Mimetype 'zoo' => 'application/octet-stream', 'zsh' => 'text/x-script.zsh' ]; - + $dot = strrpos($filename, '.'); if ($dot !== false) { $ext = strtolower(substr($filename, $dot + 1)); diff --git a/src/Util/Network.php b/src/Util/Network.php index 5a06a0056e..b7954d8e4d 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -1,6 +1,6 @@ true, HttpClientOptions::TIMEOUT => $xrd_timeout]; $curlResult = DI::httpClient()->head($url, $options); - + // Workaround for systems that can't handle a HEAD request. Don't retry on timeouts. if (!$curlResult->isSuccess() && ($curlResult->getReturnCode() >= 400) && !in_array($curlResult->getReturnCode(), [408, 504])) { $curlResult = DI::httpClient()->get($url, HttpClientAccept::DEFAULT, $options); } - + if (!$curlResult->isSuccess()) { Logger::notice('Url not reachable', ['host' => $host, 'url' => $url]); return false; @@ -481,7 +481,7 @@ class Network $scheme = $get('scheme'); $query = $get('query'); $fragment = $get('fragment'); - $authority = ($userinfo !== null ? $userinfo . '@' : '') . + $authority = ($userinfo !== null ? $userinfo . '@' : '') . $get('host') . ($port ? ":$port" : ''); diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index 5b0bf6a5ca..f21528353d 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -1,6 +1,6 @@ $photo['id']]); diff --git a/src/Worker/RemoveUnusedContacts.php b/src/Worker/RemoveUnusedContacts.php index 1cbb3775cd..4187ed0057 100644 --- a/src/Worker/RemoveUnusedContacts.php +++ b/src/Worker/RemoveUnusedContacts.php @@ -1,6 +1,6 @@ $contact['id']]); DBA::delete('post', ['author-id' => $contact['id']]); DBA::delete('post', ['causer-id' => $contact['id']]); - + DBA::delete('post-thread', ['owner-id' => $contact['id']]); DBA::delete('post-thread', ['author-id' => $contact['id']]); DBA::delete('post-thread', ['causer-id' => $contact['id']]); diff --git a/src/Worker/RemoveUnusedTags.php b/src/Worker/RemoveUnusedTags.php index ecb724c381..2090effdd3 100644 --- a/src/Worker/RemoveUnusedTags.php +++ b/src/Worker/RemoveUnusedTags.php @@ -1,6 +1,6 @@ fetch($gserver['url'] . '/api/v1/directory?order=new&local=true&limit=200&offset=0', HttpClientAccept::JSON); if (empty($result)) { Logger::info('Empty result', ['url' => $gserver['url']]); diff --git a/src/Worker/UpdateServerPeers.php b/src/Worker/UpdateServerPeers.php index 9ddbdcd56c..681c1a2314 100644 --- a/src/Worker/UpdateServerPeers.php +++ b/src/Worker/UpdateServerPeers.php @@ -1,6 +1,6 @@ expectException(\Exception::class); $this->expectExceptionMessageMatches("/(.*) is not a valid basepath/"); - + $basepath = new BasePath('/now23452sgfgas', []); $basepath->getPath(); } diff --git a/tests/src/Util/BaseURLTest.php b/tests/src/Util/BaseURLTest.php index 0702f88b49..0be83be0a7 100644 --- a/tests/src/Util/BaseURLTest.php +++ b/tests/src/Util/BaseURLTest.php @@ -1,6 +1,6 @@ . * * The site template for pure content (e.g. (modals) - * + * * This themplate is used e.g for bs modals. So outputs * only the pure content */ diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index a64f6f5fed..5f86976b98 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -1,6 +1,6 @@