minor updates

This commit is contained in:
2026-06-16 19:00:30 -07:00
parent ad6e07c76d
commit d5871ed8e7
5 changed files with 17 additions and 13 deletions

View File

@@ -31,9 +31,9 @@ docker run --rm --interactive --tty --volume ./novaconium/:/app composer:latest
cp -R novaconium/vendor/4lt/novaconium/skeleton/. .; cp -R novaconium/vendor/4lt/novaconium/skeleton/. .;
# Edit .env # Edit .env
# pwgen -cnsB1v 12 root password # pwgen -cnsB1v 12 # root password
# pwgen -cnsB1v 12 mysql user password (need in both config and env) # pwgen -cnsB1v 12 # mysql user password (need in both config and env)
# pwgen -cnsB1v 64 framework key (need in config) # pwgen -cnsB1v 64 # framework key (need in config)
# Edit novaconium/App/config.php # Edit novaconium/App/config.php
docker compose up -d docker compose up -d

View File

@@ -1,7 +1,7 @@
# Sample Docker Compose # Sample Docker Compose
services: services:
corxn: corxn:
image: 4lights/corxn:6.0.0 image: 4lights/corxn:8.5.3
ports: ports:
- "8000:80" - "8000:80"
volumes: volumes:

View File

@@ -4,7 +4,7 @@
// ini_set('display_errors', 1); // ini_set('display_errors', 1);
// Define the base path where the website is running from // Define the base path where the website is running from
define('BASEPATH', dirname(__DIR__, 1)); define('BASEPATH', dirname(__DIR__));
// Load Composer's autoload file to handle class autoloading // Load Composer's autoload file to handle class autoloading
require BASEPATH . '/vendor/autoload.php'; require BASEPATH . '/vendor/autoload.php';

View File

@@ -56,7 +56,7 @@ class Router {
} }
private function getRequestType() { private function getRequestType() {
// is the requewst a get or post? // is the request a get or post?
if (empty($_POST)) { if (empty($_POST)) {
return 'get'; return 'get';
} else { } else {

View File

@@ -1,5 +1,16 @@
<?php <?php
use Novaconium\Logger;
use Novaconium\Session;
use Novaconium\MessageHandler;
use Novaconium\Database;
use Novaconium\Post;
use Novaconium\Redirect;
use Novaconium\Router;
$db = null;
$post = null;
// --- Load Config --- // --- Load Config ---
if (file_exists(\BASEPATH . '/App/config.php')) { if (file_exists(\BASEPATH . '/App/config.php')) {
require_once \BASEPATH . '/App/config.php'; require_once \BASEPATH . '/App/config.php';
@@ -11,7 +22,6 @@ require_once \FRAMEWORKPATH . '/src/functions.php';
require_once \FRAMEWORKPATH . '/src/twig.php'; require_once \FRAMEWORKPATH . '/src/twig.php';
// --- Logging --- // --- Logging ---
use Novaconium\Logger;
$log = new Logger(\BASEPATH . $config['logfile'], $config['loglevel']); $log = new Logger(\BASEPATH . $config['logfile'], $config['loglevel']);
// --- Twig Data Array --- // --- Twig Data Array ---
@@ -21,35 +31,29 @@ $data['matomo_url'] = $config['matomo_url'] ?? '';
$data['matomo_id'] = $config['matomo_id'] ?? '0'; $data['matomo_id'] = $config['matomo_id'] ?? '0';
// --- Session --- // --- Session ---
use Novaconium\Session;
$session = new Session(); $session = new Session();
$data['token'] = $session->get('token'); $data['token'] = $session->get('token');
$data['username'] = $session->get('username'); $data['username'] = $session->get('username');
// --- Messages --- // --- Messages ---
use Novaconium\MessageHandler;
$messages = new MessageHandler($session->flash('messages')); $messages = new MessageHandler($session->flash('messages'));
foreach (['error', 'notice'] as $key) { foreach (['error', 'notice'] as $key) {
$data[$key] = $messages->showMessages($key); $data[$key] = $messages->showMessages($key);
} }
// --- Database --- // --- Database ---
use Novaconium\Database;
if (!empty($config['database']['host'])) { if (!empty($config['database']['host'])) {
$db = new Database($config['database']); $db = new Database($config['database']);
} }
// --- POST Wrapper --- // --- POST Wrapper ---
use Novaconium\Post;
if (!empty($_POST)) { if (!empty($_POST)) {
$post = new Post($_POST); $post = new Post($_POST);
} }
// --- Redirect Handler --- // --- Redirect Handler ---
use Novaconium\Redirect;
$redirect = new Redirect(); $redirect = new Redirect();
// --- Router --- // --- Router ---
use Novaconium\Router;
$router = new Router(); $router = new Router();
require_once $router->controllerPath; require_once $router->controllerPath;