1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
This commit is contained in:
J. King 2017-07-11 09:15:44 -04:00
parent eacada3982
commit 387b40829b
3 changed files with 21 additions and 12 deletions

View file

@ -16,13 +16,13 @@ class Conf {
public $dbPostgreSQLPort = 5432;
public $dbPostgreSQLDb = "arsse";
public $dbPostgreSQLSchema = "";
public $dbPostgreSQLAutoUpd = false;
public $dbPostgreSQLAutoUpd = true;
public $dbMySQLHost = "localhost";
public $dbMySQLUser = "arsse";
public $dbMySQLPass = "";
public $dbMySQLPort = 3306;
public $dbMySQLDb = "arsse";
public $dbMySQLAutoUpd = false;
public $dbMySQLAutoUpd = true;
public $userDriver = User\Internal\Driver::class;
public $userComposeNames = true;
@ -33,14 +33,15 @@ class Conf {
public $fetchUserAgentString;
public function __construct(string $import_file = "") {
$this->fetchUserAgentString = 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(is_null($this->fetchUserAgentString)) {
$this->fetchUserAgentString = 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
);
}
}
public function importFile(string $file): self {

View file

@ -21,7 +21,6 @@ trait DateFormatter {
}
protected function dateNormalize($date, string $inFormat = null, bool $inLocal = false) {
// convert input to a Unix timestamp
if($date instanceof \DateTimeInterface) {
return $date;
} else if(is_numeric($date)) {

View file

@ -11,10 +11,19 @@ create table arsse_users(
name text, -- display name
avatar_type text, -- internal avatar image's MIME content type
avatar_data blob, -- internal avatar image's binary data
rights integer not null default 0 -- any administrative rights the user may have
admin boolean default 0, -- whether the user is a member of the special "admin" group
rights integer not null default 0 -- temporary admin-rights marker FIXME: remove reliance on this
);
-- NextCloud folders
-- extra user metadata
create table arsse_users_meta(
owner text not null references arsse_users(id) on delete cascade on update cascade,
key text not null,
value text,
primary key(owner,key)
);
-- NextCloud News folders
create table arsse_folders(
id integer primary key, -- sequence number
owner text not null references arsse_users(id) on delete cascade on update cascade, -- owner of folder