Fixed admin panel user registration.

Now including start.sh to start a php server using the router.php so no webserver is needed.
This commit is contained in:
2025-12-03 08:10:38 +01:00
parent 3a99bd6683
commit 1a30c45d62
9 changed files with 49 additions and 94 deletions

View File

@@ -2,29 +2,16 @@
class Text
{
private static $texts;
public static $texts;
public static function get($key, $data = null)
public static function get($key)
{
// if not $key
if (!$key) {
return null;
}
if ($data) {
foreach ($data as $var => $value) {
${$var} = $value;
}
}
// load config file (this is only done once per application lifecycle)
if (!self::$texts) {
self::$texts = require(__DIR__ . '/../config/texts.php');
}
// check if array key exists
if (!array_key_exists($key, self::$texts)) {
return null;
return "TEXT NOT FOUND";
}
return self::$texts[$key];