Core/Compat

* create namespace Aowow to avoid naming conflicts
 * inclues/libs/ is outside of the Aowow namespace
This commit is contained in:
Sarjuuk
2025-03-31 14:44:44 +02:00
parent 4ccf917707
commit 3a6c86092b
317 changed files with 898 additions and 243 deletions

View File

@@ -1,5 +1,7 @@
<?php
namespace Aowow;
require 'includes/kernel.php';
if (CLI)
@@ -98,7 +100,7 @@ switch ($pageCall)
try // can it be handled as ajax?
{
$out = '';
$class = 'Ajax'.$cleanName;
$class = __NAMESPACE__.'\\'.'Ajax'.$cleanName;
$ajax = new $class(explode('.', $pageParam));
if ($ajax->handle($out))
@@ -114,11 +116,11 @@ switch ($pageCall)
}
}
else
throw new Exception('not handled as ajax');
throw new \Exception('not handled as ajax');
}
catch (Exception $e) // no, apparently not..
catch (\Exception $e) // no, apparently not..
{
$class = $cleanName.'Page';
$class = __NAMESPACE__.'\\'.$cleanName.'Page';
$classInstance = new $class($pageCall, $pageParam);
if (is_callable([$classInstance, 'display']))