blob: 113d598ea698cc654d1498af27401595fb7daee4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
use mystic\forum\Database;
use mystic\forum\exceptions\DatabaseConnectionException;
function get_db(): Database {
return new Database(Database::getConnectionString("db", getenv("POSTGRES_USER"), getenv("POSTGRES_PASSWORD"), getenv("POSTGRES_DBNAME")));
}
function quote_message(string $message): string {
return implode("\n", array_map(fn($ln) => "> $ln", preg_split('~(*BSR_ANYCRLF)\R~', trim($message))));
}
|