Browse Source

Tweaks

microsub
J. King 7 years ago
parent
commit
387b40829b
  1. 19
      lib/Conf.php
  2. 1
      lib/Misc/DateFormatter.php
  3. 13
      sql/SQLite3/0.sql

19
lib/Conf.php

@ -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 {

1
lib/Misc/DateFormatter.php

@ -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)) {

13
sql/SQLite3/0.sql

@ -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

Loading…
Cancel
Save