Moved TLDs fetching after configuration check
This commit is contained in:
parent
be8a18897e
commit
a3e9c3966d
1 changed files with 2 additions and 1 deletions
3
gancioff
3
gancioff
|
@ -21,7 +21,6 @@ $ENAME=strtolower($SNAME);
|
|||
$SVERS='0.1';
|
||||
|
||||
require __DIR__.'/lib/gettlds.php';
|
||||
$tldsregex=gettlds(__DIR__.'/storage/tlds.txt',true);
|
||||
require __DIR__.'/lib/mastodon-postLength.php';
|
||||
require __DIR__.'/lib/hashtag.php';
|
||||
require __DIR__.'/lib/html2text.php';
|
||||
|
@ -233,6 +232,8 @@ if (!is_null($conf['max_post_length'])) {
|
|||
echo "Info: got «{$conf['max_post_length']}» as «max_post_length» from configuration file.\n";
|
||||
}
|
||||
|
||||
$tldsregex=gettlds(__DIR__.'/storage/tlds.txt',true);
|
||||
|
||||
$url="https://{$conf['fedi_hostname']}/api/v2/instance";
|
||||
echo "Info: trying to fetch instance info from «{$url}».\n";
|
||||
$res=curl($url,null,["Authorization: Bearer {$conf['fedi_token']}", 'Accept: application/json']);
|
||||
|
|
Loading…
Reference in a new issue