Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8de9fd3027 |
4 changed files with 34 additions and 3 deletions
|
@ -4,11 +4,16 @@ class Config {
|
||||||
public static $base_url = 'http://quill.dev/';
|
public static $base_url = 'http://quill.dev/';
|
||||||
public static $gaid = '';
|
public static $gaid = '';
|
||||||
|
|
||||||
|
// MySQL (default)
|
||||||
public static $dbHost = '127.0.0.1';
|
public static $dbHost = '127.0.0.1';
|
||||||
public static $dbName = 'quill';
|
public static $dbName = 'quill';
|
||||||
public static $dbUsername = 'quill';
|
public static $dbUsername = 'quill';
|
||||||
public static $dbPassword = '';
|
public static $dbPassword = '';
|
||||||
|
|
||||||
|
// Sqlite
|
||||||
|
// public static $dbType = 'sqlite';
|
||||||
|
// public static $dbFilePath = './example.db';
|
||||||
|
|
||||||
public static $jwtSecret = 'xxx';
|
public static $jwtSecret = 'xxx';
|
||||||
|
|
||||||
public static $fbClientID = '';
|
public static $fbClientID = '';
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
ORM::configure('mysql:host=' . Config::$dbHost . ';dbname=' . Config::$dbName);
|
if(Config::$dbType == 'sqlite') {
|
||||||
ORM::configure('username', Config::$dbUsername);
|
ORM::configure('sqlite:' . Config::$dbFilePath);
|
||||||
ORM::configure('password', Config::$dbPassword);
|
} else {
|
||||||
|
ORM::configure('mysql:host=' . Config::$dbHost . ';dbname=' . Config::$dbName);
|
||||||
|
ORM::configure('username', Config::$dbUsername);
|
||||||
|
ORM::configure('password', Config::$dbPassword);
|
||||||
|
}
|
||||||
|
|
||||||
function render($page, $data) {
|
function render($page, $data) {
|
||||||
global $app;
|
global $app;
|
||||||
|
|
22
schema/sqlite.sql
Normal file
22
schema/sqlite.sql
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
CREATE TABLE users (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
url TEXT,
|
||||||
|
authorization_endpoint TEXT,
|
||||||
|
token_endpoint TEXT,
|
||||||
|
micropub_endpoint TEXT,
|
||||||
|
micropub_access_token TEXT,
|
||||||
|
micropub_scope TEXT,
|
||||||
|
micropub_response TEXT,
|
||||||
|
micropub_success INTEGER default 0,
|
||||||
|
date_created datetime,
|
||||||
|
last_login datetime,
|
||||||
|
last_micropub_response TEXT,
|
||||||
|
last_micropub_response_date datetime,
|
||||||
|
location_enabled INTEGER NOT NULL default 0,
|
||||||
|
syndication_targets TEXT,
|
||||||
|
facebook_access_token TEXT,
|
||||||
|
twitter_access_token TEXT,
|
||||||
|
twitter_token_secret TEXT,
|
||||||
|
twitter_username TEXT,
|
||||||
|
instagram_access_token TEXT
|
||||||
|
);
|
Loading…
Add table
Add a link
Reference in a new issue