mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 06:04:53 +00:00
Improved UA String
• Added version constant in bootstrap • Made the user agent string output information in a format similar to a web browser with software version along with OS information and architecture
This commit is contained in:
parent
6b2be0a877
commit
9338219a68
2 changed files with 9 additions and 1 deletions
|
@ -4,6 +4,7 @@ namespace JKingWeb\Arsse;
|
||||||
|
|
||||||
const BASE = __DIR__.DIRECTORY_SEPARATOR;
|
const BASE = __DIR__.DIRECTORY_SEPARATOR;
|
||||||
const NS_BASE = __NAMESPACE__."\\";
|
const NS_BASE = __NAMESPACE__."\\";
|
||||||
|
const VERSION = "0.0.0";
|
||||||
|
|
||||||
if(!defined(NS_BASE."INSTALL")) define(NS_BASE."INSTALL", false);
|
if(!defined(NS_BASE."INSTALL")) define(NS_BASE."INSTALL", false);
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,16 @@ class Conf {
|
||||||
public $userComposeNames = true;
|
public $userComposeNames = true;
|
||||||
public $userTempPasswordLength = 20;
|
public $userTempPasswordLength = 20;
|
||||||
|
|
||||||
public $userAgentString = 'Arsse (https://code.jkingweb.ca/jking/arsse)';
|
public $userAgentString;
|
||||||
|
|
||||||
public function __construct(string $import_file = "") {
|
public function __construct(string $import_file = "") {
|
||||||
|
$this->userAgentString = sprintf('Arsse/%s (%s %s; %s; https://code.jkingweb.ca/jking/arsse) PicoFeed (https://github.com/fguillot/picoFeed)',
|
||||||
|
VERSION, // Arsse version
|
||||||
|
php_uname('s'), // OS
|
||||||
|
php_uname('r'), // OS version
|
||||||
|
php_uname('m') // platform architecture
|
||||||
|
);
|
||||||
|
|
||||||
if($import_file != "") $this->importFile($import_file);
|
if($import_file != "") $this->importFile($import_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue