WIP: bring participo back - consistent use of bootstrap - formatting -

phpstan level 0 error free - fixes for kyu subpage - move mams into
participo framework - remove legacy `lib/db.php` usage - add attributer
admin function - add newsposter - fixing apiKey creation
This commit is contained in:
marko
2025-11-07 10:37:25 +01:00
parent 672eaccfc9
commit f28fa7b51b
96 changed files with 6152 additions and 6053 deletions

View File

@@ -1,26 +1,25 @@
<?php
/// @file common settings and includes for the participo api
/// - set locale to german
/// - set locale to german
setlocale(LC_ALL, "de_DE@euro", "de_DE", "de", "ge");
/// - extend the include search path for
set_include_path(implode(
PATH_SEPARATOR,
[
/// - extend the include search path for
set_include_path(
implode(PATH_SEPARATOR, [
get_include_path(),
/// - user defined libs (e.g. participo)
/// - user defined libs (e.g. participo)
"../lib",
/// - config files (we reuse the participo-wide configuration)
".."
]
));
/// - config files (we reuse the participo-wide configuration)
"..",
]),
);
/// - participo configuration
require_once("config/participo.php");
require_once "config/participo.php";
/// - data base credentials
require_once("local/cwsvJudo.php");
require_once "local/cwsvJudo.php";
/// - since this is a rest api implementation we can assume each endpoint needs dbAccess
require_once("participoLib/dbConnector.php");
require_once "participoLib/dbConnector.php";
function authorize()
{
@@ -44,9 +43,13 @@ function authorize()
}
/// - initialize the database connection
dbConnector::setOptions([
"dbCharset" => $cwsvJudoConfig["dbCharset"] ?? "UTF-8",
"outCharset" => $cwsvJudoConfig["outCharset"] ?? "UTF-8",
]);
dbConnector::connect(
$cwsvJudoConfig["db"]["host"],
$cwsvJudoConfig["db"]["name"],
$cwsvJudoConfig["db"]["user"],
$cwsvJudoConfig["db"]["password"]
$cwsvJudoConfig["db"]["password"],
);